diff options
author | Zoltan Varga <vargaz@gmail.com> | 2013-05-25 01:41:39 +0400 |
---|---|---|
committer | Zoltan Varga <vargaz@gmail.com> | 2013-05-25 01:41:50 +0400 |
commit | bab31bcb5831e5d8480e1f84d389402e5bd6c6ac (patch) | |
tree | 5a554b9730a923aec417c9a96bbefea0f4594016 /libgc/pthread_stop_world.c | |
parent | a6d12819a7223aa352a7ec63afb84865bc09d48a (diff) |
Merge some Nacl/ARM changes from https://github.com/igotti-google/mono/commit/65d8d68e8c81cf6adb1076de7a9425c84cab86a3.
Diffstat (limited to 'libgc/pthread_stop_world.c')
-rw-r--r-- | libgc/pthread_stop_world.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/libgc/pthread_stop_world.c b/libgc/pthread_stop_world.c index fe2ba1a3810..334ff1de219 100644 --- a/libgc/pthread_stop_world.c +++ b/libgc/pthread_stop_world.c @@ -540,14 +540,17 @@ static void pthread_stop_world() #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");\ + do { \ + __asm__ __volatile__ ( \ + ".align 4\n\t" \ + "bic %0, %0, #0xc0000000\n\t" \ + "str sp, [%0]\n\t" \ + "bic %1, %1, #0xc0000000\n\t" \ + "stm %1, {r4-r8,r10-r12,lr}\n\t" \ + : \ + : "r" (&nacl_gc_thread_self->stop_info.stack_ptr), \ + "r"(nacl_gc_thread_self->stop_info.reg_storage) \ + : "memory"); \ } while (0) #else |