| 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 | 6 |
| 7 #include "native_client/src/trusted/service_runtime/arch/mips/sel_ldr_mips.h" | 7 #include "native_client/src/trusted/service_runtime/arch/mips/sel_ldr_mips.h" |
| 8 #include "native_client/src/trusted/service_runtime/arch/mips/sel_rt.h" | 8 #include "native_client/src/trusted/service_runtime/arch/mips/sel_rt.h" |
| 9 #include "native_client/src/trusted/service_runtime/nacl_config.h" | 9 #include "native_client/src/trusted/service_runtime/nacl_config.h" |
| 10 | 10 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 sw $s1, NACL_THREAD_CONTEXT_OFFSET_S1($a0) | 101 sw $s1, NACL_THREAD_CONTEXT_OFFSET_S1($a0) |
| 102 sw $s2, NACL_THREAD_CONTEXT_OFFSET_S2($a0) | 102 sw $s2, NACL_THREAD_CONTEXT_OFFSET_S2($a0) |
| 103 sw $s3, NACL_THREAD_CONTEXT_OFFSET_S3($a0) | 103 sw $s3, NACL_THREAD_CONTEXT_OFFSET_S3($a0) |
| 104 sw $s4, NACL_THREAD_CONTEXT_OFFSET_S4($a0) | 104 sw $s4, NACL_THREAD_CONTEXT_OFFSET_S4($a0) |
| 105 sw $s5, NACL_THREAD_CONTEXT_OFFSET_S5($a0) | 105 sw $s5, NACL_THREAD_CONTEXT_OFFSET_S5($a0) |
| 106 sw $s6, NACL_THREAD_CONTEXT_OFFSET_S6($a0) | 106 sw $s6, NACL_THREAD_CONTEXT_OFFSET_S6($a0) |
| 107 sw $s7, NACL_THREAD_CONTEXT_OFFSET_S7($a0) | 107 sw $s7, NACL_THREAD_CONTEXT_OFFSET_S7($a0) |
| 108 sw $t8, NACL_THREAD_CONTEXT_OFFSET_T8($a0) | 108 sw $t8, NACL_THREAD_CONTEXT_OFFSET_T8($a0) |
| 109 sw $sp, NACL_THREAD_CONTEXT_OFFSET_STACK_PTR($a0) | 109 sw $sp, NACL_THREAD_CONTEXT_OFFSET_STACK_PTR($a0) |
| 110 sw $fp, NACL_THREAD_CONTEXT_OFFSET_FRAME_PTR($a0) | 110 sw $fp, NACL_THREAD_CONTEXT_OFFSET_FRAME_PTR($a0) |
| 111 DEFINE_GLOBAL_HIDDEN_IDENTIFIER(NaClSyscallSegRegsSaved): |
| 111 | 112 |
| 112 /* Restore the trusted stack */ | 113 /* Restore the trusted stack */ |
| 113 lw $sp, NACL_THREAD_CONTEXT_OFFSET_TRUSTED_STACK_PTR($a0) | 114 lw $sp, NACL_THREAD_CONTEXT_OFFSET_TRUSTED_STACK_PTR($a0) |
| 114 | 115 |
| 115 lw $t9,%call16(NaClSyscallCSegHook)($gp) | 116 lw $t9,%call16(NaClSyscallCSegHook)($gp) |
| 116 jalr $t9 | 117 jalr $t9 |
| 117 nop | 118 nop |
| 118 | 119 |
| 119 /* | 120 /* |
| 120 * NaClSyscallCSegHook returned the NaClThreadContext pointer in $v0. | 121 * NaClSyscallCSegHook returned the NaClThreadContext pointer in $v0. |
| 121 * Make that the argument (in $a0) to NaClSwitch. | 122 * Make that the argument (in $a0) to NaClSwitch. |
| 122 */ | 123 */ |
| 123 lw $t9,%call16(NaClSwitch)($gp) | 124 lw $t9,%call16(NaClSwitch)($gp) |
| 124 jr $t9 | 125 jr $t9 |
| 125 move $a0, $v0 /* delay slot */ | 126 move $a0, $v0 /* delay slot */ |
| 126 | 127 |
| 127 /* NOTREACHED */ | 128 /* NOTREACHED */ |
| 128 | 129 |
| 129 /* | 130 /* |
| 130 * If the thread returns, which must not happen, it will be halted | 131 * If the thread returns, which must not happen, it will be halted |
| 131 * by the following instruction. | 132 * by the following instruction. |
| 132 */ | 133 */ |
| 133 | 134 |
| 134 .word NACL_HALT_WORD | 135 .word NACL_HALT_WORD |
| OLD | NEW |