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_rt.h" | 7 #include "native_client/src/trusted/service_runtime/arch/mips/sel_rt.h" |
8 #include "native_client/src/trusted/service_runtime/nacl_config.h" | 8 #include "native_client/src/trusted/service_runtime/nacl_config.h" |
9 | 9 |
10 .text | 10 .text |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 97 |
98 /* | 98 /* |
99 * Load the nacl_user entry of this thread. | 99 * Load the nacl_user entry of this thread. |
100 * a1 = nacl_user[a0*4] | 100 * a1 = nacl_user[a0*4] |
101 */ | 101 */ |
102 lw $a1,%got(nacl_user)($28) | 102 lw $a1,%got(nacl_user)($28) |
103 sll $a0, $a0, 2 | 103 sll $a0, $a0, 2 |
104 addu $a1, $a1, $a0 | 104 addu $a1, $a1, $a0 |
105 lw $a1, 0($a1) | 105 lw $a1, 0($a1) |
106 | 106 |
| 107 DEFINE_GLOBAL_HIDDEN_IDENTIFIER(NaClSyscallThreadCaptureFault): |
107 sw $s0, NACL_THREAD_CONTEXT_OFFSET_S0($a1) | 108 sw $s0, NACL_THREAD_CONTEXT_OFFSET_S0($a1) |
108 sw $s1, NACL_THREAD_CONTEXT_OFFSET_S1($a1) | 109 sw $s1, NACL_THREAD_CONTEXT_OFFSET_S1($a1) |
109 sw $s2, NACL_THREAD_CONTEXT_OFFSET_S2($a1) | 110 sw $s2, NACL_THREAD_CONTEXT_OFFSET_S2($a1) |
110 sw $s3, NACL_THREAD_CONTEXT_OFFSET_S3($a1) | 111 sw $s3, NACL_THREAD_CONTEXT_OFFSET_S3($a1) |
111 sw $s4, NACL_THREAD_CONTEXT_OFFSET_S4($a1) | 112 sw $s4, NACL_THREAD_CONTEXT_OFFSET_S4($a1) |
112 sw $s5, NACL_THREAD_CONTEXT_OFFSET_S5($a1) | 113 sw $s5, NACL_THREAD_CONTEXT_OFFSET_S5($a1) |
113 sw $s6, NACL_THREAD_CONTEXT_OFFSET_S6($a1) | 114 sw $s6, NACL_THREAD_CONTEXT_OFFSET_S6($a1) |
114 sw $s7, NACL_THREAD_CONTEXT_OFFSET_S7($a1) | 115 sw $s7, NACL_THREAD_CONTEXT_OFFSET_S7($a1) |
115 sw $t8, NACL_THREAD_CONTEXT_OFFSET_T8($a1) | 116 sw $t8, NACL_THREAD_CONTEXT_OFFSET_T8($a1) |
116 sw $sp, NACL_THREAD_CONTEXT_OFFSET_STACK_PTR($a1) | 117 sw $sp, NACL_THREAD_CONTEXT_OFFSET_STACK_PTR($a1) |
(...skipping 11 matching lines...) Expand all Loading... |
128 | 129 |
129 /* NOTREACHED */ | 130 /* NOTREACHED */ |
130 | 131 |
131 /* | 132 /* |
132 * If the thread returns, which must not happen, it will be halted | 133 * If the thread returns, which must not happen, it will be halted |
133 * by the following instruction. | 134 * by the following instruction. |
134 */ | 135 */ |
135 | 136 |
136 NACL_HALT | 137 NACL_HALT |
137 | 138 |
OLD | NEW |