(part of commit 9379c66 from Unity-Technologies/bdwgc)
Issue #173 (bdwgc).
* darwin_stop_world.c [!DARWIN_DONT_PARSE_STACK && (ARM32 || AARCH64)]
(GC_FindTopOfStack): Set proper frame value (using asm instruction)
if stack_start is zero (instead of ABORT).
# else
__asm__ __volatile__ ("ld %0,0(r1)" : "=r" (frame));
# endif
+# elif defined(ARM32)
+ volatile ptr_t sp_reg;
+ __asm__ __volatile__ ("mov %0, r7\n" : "=r" (sp_reg));
+ frame = (StackFrame *)sp_reg;
+# elif defined(AARCH64)
+ volatile ptr_t sp_reg;
+ __asm__ __volatile__ ("mov %0, x29\n" : "=r" (sp_reg));
+ frame = (StackFrame *)sp_reg;
# else
ABORT("GC_FindTopOfStack(0) is not implemented");
# endif