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

Unified Diff: src/trusted/service_runtime/arch/mips/nacl_syscall.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: Remove saving of $gp. 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 side-by-side diff with in-line comments
Download patch
Index: src/trusted/service_runtime/arch/mips/nacl_syscall.S
diff --git a/src/trusted/service_runtime/arch/mips/nacl_syscall.S b/src/trusted/service_runtime/arch/mips/nacl_syscall.S
index 9fc351f1970e73af89c17d9ba332a47d889f4b71..79d84d14e6bee3c6e9f49deea3c6899c7555eb8c 100644
--- a/src/trusted/service_runtime/arch/mips/nacl_syscall.S
+++ b/src/trusted/service_runtime/arch/mips/nacl_syscall.S
@@ -106,15 +106,15 @@ DEFINE_GLOBAL_HIDDEN_IDENTIFIER(NaClSyscallSeg):
sw $s6, NACL_THREAD_CONTEXT_OFFSET_S6($a1)
sw $s7, NACL_THREAD_CONTEXT_OFFSET_S7($a1)
sw $t8, NACL_THREAD_CONTEXT_OFFSET_T8($a1)
- sw $gp, NACL_THREAD_CONTEXT_OFFSET_GLOBAL_PTR($a1)
sw $sp, NACL_THREAD_CONTEXT_OFFSET_STACK_PTR($a1)
sw $fp, NACL_THREAD_CONTEXT_OFFSET_FRAME_PTR($a1)
/* Restore the thread index. */
srl $a0, $a0, 2
- /* Reserve 16-byte for arguments (o32 ABI) */
- addiu $sp, $sp, -16
+ /* Restore the trusted stack */
+ lw $sp, NACL_THREAD_CONTEXT_OFFSET_TRUSTED_STACK_PTR($a1)
+
lw $t9,%call16(NaClSyscallCSegHook)($gp)
jr $t9
nop

Powered by Google App Engine
This is Rietveld 408576698