Chromium Code Reviews| 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); |
| } |