Index: tests/exception_test/exception_crash_test.c |
diff --git a/tests/exception_test/exception_crash_test.c b/tests/exception_test/exception_crash_test.c |
index 8445f751640c2e4311973731062097139b342dae..ae7092df651cd8984d25a12fde7bbe0609caa78b 100644 |
--- a/tests/exception_test/exception_crash_test.c |
+++ b/tests/exception_test/exception_crash_test.c |
@@ -75,7 +75,22 @@ asm(".pushsection .text, \"ax\", @progbits\n" |
void error_exit(void) { |
_exit(1); |
} |
+#elif NACL_ARCH(NACL_BUILD_ARCH) == NACL_mips |
+char recovery_stack[0x1000] __attribute__((aligned(8))); |
+ |
+void bad_stack_exception_handler(); |
Mark Seaborn
2013/02/13 22:14:09
This probably fails to compile due to -Wstrict-pro
petarj
2013/03/05 17:50:04
Done.
|
+ __asm__("bad_stack_exception_handler:\n" |
Mark Seaborn
2013/02/13 22:14:09
Nit: remove indentation
petarj
2013/03/05 17:50:04
Done.
|
+ ".text\n" |
Mark Seaborn
2013/02/13 22:14:09
Use pushsection+popsection instead of .text
petarj
2013/03/05 17:50:04
Done.
|
+ "lui $t9, %hi(recovery_stack)\n" |
+ "addiu $sp, $t9, %lo(recovery_stack)\n" |
+ "and $sp, $sp, $t7\n" |
+ "j error_exit\n" |
+ "nop\n"); |
+ |
+void error_exit() { |
+ _exit(1); |
+} |
#else |
/* TODO(mseaborn): Implement a stack switcher, like the one above, for ARM. */ |