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

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: Update per codereview. Created 7 years, 10 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
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..6376d560976e4a59d43f099877730f68a6e8196f 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, -32767(%0)\n"
Mark Seaborn 2013/03/11 15:54:38 Can you write -0x7fff instead for readability? Sa
petarj 2013/03/14 01:13:03 Done.
+ : "=r" (scratch) : "0" (sp + 32767));
#endif
NACL_SYSCALL(exit)(0);
}

Powered by Google App Engine
This is Rietveld 408576698