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

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: 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
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..6f8e649a368143d74216bcdadc9afa2be8fd80a6 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
Mark Seaborn 2012/09/08 02:43:14 Nit: indent the #if with one space as "# if"
petarj 2012/09/11 16:58:13 Done.
+/* This signal does not exist on mips */
Mark Seaborn 2012/09/08 02:43:14 Nit: indent the comment by 2 spaces to line up wit
petarj 2012/09/11 16:58:13 Done.
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

Powered by Google App Engine
This is Rietveld 408576698