Index: src/trusted/service_runtime/posix/nacl_signal.c |
diff --git a/src/trusted/service_runtime/posix/nacl_signal.c b/src/trusted/service_runtime/posix/nacl_signal.c |
index eb083b5e9a37bb500d71e41a760e24b5faa9d0ea..9961f6166352ca7bd1750eeed473bc08811b7bb1 100644 |
--- a/src/trusted/service_runtime/posix/nacl_signal.c |
+++ b/src/trusted/service_runtime/posix/nacl_signal.c |
@@ -46,7 +46,10 @@ |
static int s_Signals[] = { |
#if NACL_LINUX |
+# if NACL_ARCH(NACL_BUILD_ARCH) != NACL_mips |
+ /* This signal does not exist on MIPS. */ |
SIGSTKFLT, |
+# endif |
NACL_THREAD_SUSPEND_SIGNAL, |
#endif |
SIGINT, SIGQUIT, SIGILL, SIGTRAP, SIGBUS, SIGFPE, SIGSEGV |
@@ -260,6 +263,12 @@ static int DispatchToUntrustedHandler(struct NaClAppThread *natp, |
regs->r0 = context_user_addr; /* Argument 1 */ |
regs->prog_ctr = NaClUserToSys(nap, nap->exception_handler); |
regs->stack_ptr = NaClUserToSys(nap, new_stack_ptr); |
+#elif NACL_ARCH(NACL_BUILD_ARCH) == NACL_mips |
+ frame->context.frame_ptr = regs->frame_ptr; |
+ regs->return_addr = kReturnAddr; |
+ regs->a0 = context_user_addr; |
+ regs->prog_ctr = NaClUserToSys(nap, nap->exception_handler); |
+ regs->stack_ptr = NaClUserToSys(nap, new_stack_ptr); |
#else |
# error Unsupported architecture |
#endif |