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

Unified Diff: src/trusted/service_runtime/posix/nacl_signal.c

Issue 10919162: [MIPS] Implementation of sel_ldr for MIPS architecture. (Closed) Base URL: http://src.chromium.org/native_client/trunk/src/native_client/
Patch Set: Rebase (Saturday morning). Created 8 years, 3 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 | « src/trusted/service_runtime/nacl_syscall_handlers_gen.py ('k') | src/trusted/service_runtime/sel_ldr-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/trusted/service_runtime/nacl_syscall_handlers_gen.py ('k') | src/trusted/service_runtime/sel_ldr-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698