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

Unified Diff: tests/barebones/top_of_sandbox.c

Issue 12256018: [MIPS] Add remaining parts for building tests for MIPS (Closed) Base URL: http://src.chromium.org/native_client/trunk/src/native_client/
Patch Set: Minor cleanup. Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « SConstruct ('k') | tests/data_not_executable/execute_data.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/barebones/top_of_sandbox.c
diff --git a/tests/barebones/top_of_sandbox.c b/tests/barebones/top_of_sandbox.c
index d360fda53dbd2fff322f074ce574c2590485225d..98b94784c36e631d1b4f920157c949ce61ae1f87 100644
--- a/tests/barebones/top_of_sandbox.c
+++ b/tests/barebones/top_of_sandbox.c
@@ -27,6 +27,14 @@ void _start(unsigned int info[]) {
"leal 4095(%%rsp), %k0\n"
"movl -4095(%%r15,%0), %k0"
: "=r" (scratch));
+#elif defined(__mips__)
+ char *sp, *scratch;
+ __asm__("move %0, $sp" : "=r" (sp));
+ __asm__ volatile(
+ ".p2align 4\n"
+ "and %0, %0, $t7\n"
+ "lw %0, -0x7fff(%0)\n"
+ : "=r" (scratch) : "0" (sp + 0x7fff));
#endif
NACL_SYSCALL(exit)(0);
}
« no previous file with comments | « SConstruct ('k') | tests/data_not_executable/execute_data.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698