| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  * Copyright (c) 2012 The Native Client Authors. All rights reserved. |    2  * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 
|    3  * Use of this source code is governed by a BSD-style license that can be |    3  * Use of this source code is governed by a BSD-style license that can be | 
|    4  * found in the LICENSE file. |    4  * found in the LICENSE file. | 
|    5  */ |    5  */ | 
 |    6 #include "native_client/src/include/arm_sandbox.h" | 
|    6 #include "native_client/src/trusted/service_runtime/nacl_config.h" |    7 #include "native_client/src/trusted/service_runtime/nacl_config.h" | 
|    7 #include "templates.h" |    8 #include "templates.h" | 
|    8  |    9  | 
|    9 #define SANDBOX_MASK NACL_CONTROL_FLOW_MASK |   10 #define SANDBOX_MASK NACL_CONTROL_FLOW_MASK | 
|   10  |   11  | 
|   11         .global template_func |   12         .global template_func | 
|   12         .global template_func_end |   13         .global template_func_end | 
|   13         .p2align 4 |   14         .p2align 4 | 
|   14 template_func: |   15 template_func: | 
|   15         /* We start this function with few nops to make |   16         /* We start this function with few nops to make | 
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   49         mov r1, #MARKER_OLD & 0xff |   50         mov r1, #MARKER_OLD & 0xff | 
|   50         orr r1, #MARKER_OLD & 0xff00 |   51         orr r1, #MARKER_OLD & 0xff00 | 
|   51         bic lr, lr, #SANDBOX_MASK |   52         bic lr, lr, #SANDBOX_MASK | 
|   52         bx  lr |   53         bx  lr | 
|   53 template_func_nonreplacement_end: |   54 template_func_nonreplacement_end: | 
|   54  |   55  | 
|   55         .global hlts |   56         .global hlts | 
|   56         .global hlts_end |   57         .global hlts_end | 
|   57         .p2align 4 |   58         .p2align 4 | 
|   58 hlts: |   59 hlts: | 
|   59         bkpt 0x7777 |   60         .word NACL_INSTR_HALT_FILL | 
|   60         bkpt 0x7777 |   61         .word NACL_INSTR_HALT_FILL | 
|   61         bkpt 0x7777 |   62         .word NACL_INSTR_HALT_FILL | 
|   62         bkpt 0x7777 |   63         .word NACL_INSTR_HALT_FILL | 
|   63 hlts_end: |   64 hlts_end: | 
|   64  |   65  | 
|   65  |   66  | 
|   66         .global branch_forwards |   67         .global branch_forwards | 
|   67         .global branch_forwards_end |   68         .global branch_forwards_end | 
|   68         .global branch_backwards |   69         .global branch_backwards | 
|   69         .global branch_backwards_end |   70         .global branch_backwards_end | 
|   70         .p2align 4 |   71         .p2align 4 | 
|   71 branch_forwards: |   72 branch_forwards: | 
|   72         b branch_backwards |   73         b branch_backwards | 
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  187         b external_jump_replace_return |  188         b external_jump_replace_return | 
|  188         bl template_func_external_jump_target_replace |  189         bl template_func_external_jump_target_replace | 
|  189         mov r0, #MARKER_STABLE & 0xff |  190         mov r0, #MARKER_STABLE & 0xff | 
|  190         orr r0, #MARKER_STABLE & 0xff00 |  191         orr r0, #MARKER_STABLE & 0xff00 | 
|  191         nop |  192         nop | 
|  192         nop |  193         nop | 
|  193 external_jump_replace_return: |  194 external_jump_replace_return: | 
|  194         bic lr, lr, #SANDBOX_MASK |  195         bic lr, lr, #SANDBOX_MASK | 
|  195         bx  lr |  196         bx  lr | 
|  196 template_func_external_jump_target_replace_end: |  197 template_func_external_jump_target_replace_end: | 
| OLD | NEW |