Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: src/trusted/service_runtime/arch/mips/nacl_switch.S

Issue 13454020: [MIPS] Small updates after LLVM merge (Closed) Base URL: http://git.chromium.org/native_client/src/native_client.git@master
Patch Set: Fix license header. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/include/elf_constants.h ('k') | src/trusted/service_runtime/elf_util.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 11 matching lines...) Expand all
22 22
23 DEFINE_GLOBAL_HIDDEN_IDENTIFIER(NaClSwitch): 23 DEFINE_GLOBAL_HIDDEN_IDENTIFIER(NaClSwitch):
24 24
25 .set noreorder 25 .set noreorder
26 26
27 /* 27 /*
28 * We clear the following registers to avoid information leaks. The 28 * We clear the following registers to avoid information leaks. The
29 * remaining registers are overwritten by the code that follows 29 * remaining registers are overwritten by the code that follows
30 * after. 30 * after.
31 */ 31 */
32 addu $at, $zero, $zero
32 addu $v1, $zero, $zero 33 addu $v1, $zero, $zero
33 addu $a1, $zero, $zero 34 addu $a1, $zero, $zero
34 addu $a2, $zero, $zero 35 addu $a2, $zero, $zero
35 addu $a3, $zero, $zero 36 addu $a3, $zero, $zero
36 addu $t0, $zero, $zero 37 addu $t0, $zero, $zero
37 addu $t1, $zero, $zero 38 addu $t1, $zero, $zero
38 addu $t2, $zero, $zero 39 addu $t2, $zero, $zero
39 addu $t3, $zero, $zero 40 addu $t3, $zero, $zero
40 addu $t4, $zero, $zero 41 addu $t4, $zero, $zero
41 addu $t5, $zero, $zero 42 addu $t5, $zero, $zero
43 addu $gp, $zero, $zero
42 addu $ra, $zero, $zero 44 addu $ra, $zero, $zero
43 45
44 /* NACL_CALLEE_SAVE_LIST BEGIN */ 46 /* NACL_CALLEE_SAVE_LIST BEGIN */
45 47
46 lui $t6, %hi(NACL_CONTROL_FLOW_MASK) 48 lui $t6, %hi(NACL_CONTROL_FLOW_MASK)
47 addiu $t6, $t6, %lo(NACL_CONTROL_FLOW_MASK) 49 addiu $t6, $t6, %lo(NACL_CONTROL_FLOW_MASK)
48 lui $t7, %hi(NACL_DATA_FLOW_MASK) 50 lui $t7, %hi(NACL_DATA_FLOW_MASK)
49 addiu $t7, $t7, %lo(NACL_DATA_FLOW_MASK) 51 addiu $t7, $t7, %lo(NACL_DATA_FLOW_MASK)
50 lw $s0, NACL_THREAD_CONTEXT_OFFSET_S0($a0) 52 lw $s0, NACL_THREAD_CONTEXT_OFFSET_S0($a0)
51 lw $s1, NACL_THREAD_CONTEXT_OFFSET_S1($a0) 53 lw $s1, NACL_THREAD_CONTEXT_OFFSET_S1($a0)
(...skipping 20 matching lines...) Expand all
72 * Transfer control to untrusted code. 74 * Transfer control to untrusted code.
73 * 75 *
74 * We leave $t9 containing the address of the function being called, 76 * We leave $t9 containing the address of the function being called,
75 * as required by the MIPS ABI. 77 * as required by the MIPS ABI.
76 */ 78 */
77 jr $t9 79 jr $t9
78 nop 80 nop
79 81
80 .set reorder 82 .set reorder
81 83
OLDNEW
« no previous file with comments | « src/include/elf_constants.h ('k') | src/trusted/service_runtime/elf_util.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698