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

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

Issue 11368024: [MIPS] Restore the trusted stack in NaClSyscallSeg. (Closed) Base URL: http://git.chromium.org/native_client/src/native_client.git@master
Patch Set: Update Copyright headers. Remote presubmit complained about it. Created 8 years, 1 month 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 | « no previous file | src/trusted/service_runtime/arch/mips/nacl_switch_to_app_mips.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 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 3 * Use of this source code is governed by a BSD-style license that can be
4 * be 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
11 11
12 /* 12 /*
13 * This trusted code is linked into the service_runtime and 13 * This trusted code is linked into the service_runtime and
14 * executed when switching from the service runtime to a nacl 14 * executed when switching from the service runtime to a nacl
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 addiu $t7, $t7, %lo(NACL_DATA_FLOW_MASK) 49 addiu $t7, $t7, %lo(NACL_DATA_FLOW_MASK)
50 lw $s0, NACL_THREAD_CONTEXT_OFFSET_S0($a0) 50 lw $s0, NACL_THREAD_CONTEXT_OFFSET_S0($a0)
51 lw $s1, NACL_THREAD_CONTEXT_OFFSET_S1($a0) 51 lw $s1, NACL_THREAD_CONTEXT_OFFSET_S1($a0)
52 lw $s2, NACL_THREAD_CONTEXT_OFFSET_S2($a0) 52 lw $s2, NACL_THREAD_CONTEXT_OFFSET_S2($a0)
53 lw $s3, NACL_THREAD_CONTEXT_OFFSET_S3($a0) 53 lw $s3, NACL_THREAD_CONTEXT_OFFSET_S3($a0)
54 lw $s4, NACL_THREAD_CONTEXT_OFFSET_S4($a0) 54 lw $s4, NACL_THREAD_CONTEXT_OFFSET_S4($a0)
55 lw $s5, NACL_THREAD_CONTEXT_OFFSET_S5($a0) 55 lw $s5, NACL_THREAD_CONTEXT_OFFSET_S5($a0)
56 lw $s6, NACL_THREAD_CONTEXT_OFFSET_S6($a0) 56 lw $s6, NACL_THREAD_CONTEXT_OFFSET_S6($a0)
57 lw $s7, NACL_THREAD_CONTEXT_OFFSET_S7($a0) 57 lw $s7, NACL_THREAD_CONTEXT_OFFSET_S7($a0)
58 lw $t8, NACL_THREAD_CONTEXT_OFFSET_T8($a0) 58 lw $t8, NACL_THREAD_CONTEXT_OFFSET_T8($a0)
59 lw $gp, NACL_THREAD_CONTEXT_OFFSET_GLOBAL_PTR($a0)
60 lw $sp, NACL_THREAD_CONTEXT_OFFSET_STACK_PTR($a0) 59 lw $sp, NACL_THREAD_CONTEXT_OFFSET_STACK_PTR($a0)
61 lw $fp, NACL_THREAD_CONTEXT_OFFSET_FRAME_PTR($a0) 60 lw $fp, NACL_THREAD_CONTEXT_OFFSET_FRAME_PTR($a0)
62 61
63 /* NACL_CALLEE_SAVE_LIST END*/ 62 /* NACL_CALLEE_SAVE_LIST END*/
64 63
65 lw $v0, NACL_THREAD_CONTEXT_OFFSET_SYSRET($a0) 64 lw $v0, NACL_THREAD_CONTEXT_OFFSET_SYSRET($a0)
66 lw $v1, NACL_THREAD_CONTEXT_OFFSET_NEW_PROG_CTR($a0) 65 lw $v1, NACL_THREAD_CONTEXT_OFFSET_NEW_PROG_CTR($a0)
67 66
68 /* At startup, context->sysret contains not the the return value, but the 67 /* At startup, context->sysret contains not the the return value, but the
69 first argument. Put it in a0. */ 68 first argument. Put it in a0. */
70 addu $a0, $v0, $zero 69 addu $a0, $v0, $zero
71 70
72 /* Transfer control to untrusted code */ 71 /* Transfer control to untrusted code */
73 jr $v1 72 jr $v1
74 nop 73 nop
75 74
76 .set reorder 75 .set reorder
77 76
OLDNEW
« no previous file with comments | « no previous file | src/trusted/service_runtime/arch/mips/nacl_switch_to_app_mips.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698