Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Taylor <elijahtaylor@google.com>2013-02-01 02:00:58 +0400
committerZoltan Varga <vargaz@gmail.com>2013-04-07 11:47:16 +0400
commitab39b74267797f99f6abeb6a52bf0f3e187d9453 (patch)
tree00d52ff2d94fdd9b5ecc66eb615f9d8e15a595c2 /libgc/pthread_stop_world.c
parent1e726ce7a38a92860acab28f4427813d2ba14c13 (diff)
NaCl ARM work, first pass
Diffstat (limited to 'libgc/pthread_stop_world.c')
-rw-r--r--libgc/pthread_stop_world.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libgc/pthread_stop_world.c b/libgc/pthread_stop_world.c
index 8b25376b54a..fe2ba1a3810 100644
--- a/libgc/pthread_stop_world.c
+++ b/libgc/pthread_stop_world.c
@@ -537,6 +537,22 @@ static void pthread_stop_world()
__asm__ __volatile__ ("add $16, %esp");\
} while (0)
+#elif __arm__
+
+#define NACL_STORE_REGS() \
+ do { \
+ __asm__ __volatile__ ("push {r4-r12,lr}");\
+ __asm__ __volatile__ ("mov r0, %0" : : "r" (&nacl_gc_thread_self->stop_info.stack_ptr)); \
+ __asm__ __volatile__ ("bic r0, r0, #0xc0000000");\
+ __asm__ __volatile__ ("str sp, [r0]");\
+ memcpy(nacl_gc_thread_self->stop_info.reg_storage, nacl_gc_thread_self->stop_info.stack_ptr, NACL_GC_REG_STORAGE_SIZE * sizeof(ptr_t));\
+ __asm__ __volatile__ ("add sp, sp, #40");\
+ __asm__ __volatile__ ("bic sp, sp, #0xc0000000");\
+ } while (0)
+#else
+
+#error "Please port NACL_STORE_REGS"
+
#endif
void nacl_pre_syscall_hook()