GC_push_one(state.THREAD_FLD(r31));
# elif defined(ARM32)
- lo = (void *)state.__sp;
+ lo = (void *)state.THREAD_FLD(sp);
# ifndef DARWIN_DONT_PARSE_STACK
- *phi = GC_FindTopOfStack(state.__sp);
+ *phi = GC_FindTopOfStack(state.THREAD_FLD(sp));
# endif
- GC_push_one(state.__r[0]);
- GC_push_one(state.__r[1]);
- GC_push_one(state.__r[2]);
- GC_push_one(state.__r[3]);
- GC_push_one(state.__r[4]);
- GC_push_one(state.__r[5]);
- GC_push_one(state.__r[6]);
- GC_push_one(state.__r[7]);
- GC_push_one(state.__r[8]);
- GC_push_one(state.__r[9]);
- GC_push_one(state.__r[10]);
- GC_push_one(state.__r[11]);
- GC_push_one(state.__r[12]);
- /* GC_push_one(state.__sp); */
- GC_push_one(state.__lr);
- /* GC_push_one(state.__pc); */
- GC_push_one(state.__cpsr);
+ GC_push_one(state.THREAD_FLD(r[0]));
+ GC_push_one(state.THREAD_FLD(r[1]));
+ GC_push_one(state.THREAD_FLD(r[2]));
+ GC_push_one(state.THREAD_FLD(r[3]));
+ GC_push_one(state.THREAD_FLD(r[4]));
+ GC_push_one(state.THREAD_FLD(r[5]));
+ GC_push_one(state.THREAD_FLD(r[6]));
+ GC_push_one(state.THREAD_FLD(r[7]));
+ GC_push_one(state.THREAD_FLD(r[8]));
+ GC_push_one(state.THREAD_FLD(r[9]));
+ GC_push_one(state.THREAD_FLD(r[10]));
+ GC_push_one(state.THREAD_FLD(r[11]));
+ GC_push_one(state.THREAD_FLD(r[12]));
+ /* GC_push_one(state.THREAD_FLD(sp)); */
+ GC_push_one(state.THREAD_FLD(lr));
+ /* GC_push_one(state.THREAD_FLD(pc)); */
+ GC_push_one(state.THREAD_FLD(cpsr));
# else
# error FIXME for non-x86 || ppc || arm architectures
#endif
#if defined(DARWIN)
+# include <mach/thread_status.h>
# ifndef MAC_OS_X_VERSION_MAX_ALLOWED
# include <AvailabilityMacros.h>
/* Include this header just to import the above macro. */
# define GC_MACH_THREAD_STATE_COUNT x86_THREAD_STATE64_COUNT
# endif
# else
-# if defined(ARM32)
+# if defined(ARM32) && defined(ARM_UNIFIED_THREAD_STATE)
+# define GC_THREAD_STATE_T arm_unified_thread_state_t
+# define GC_MACH_THREAD_STATE ARM_UNIFIED_THREAD_STATE
+# define GC_MACH_THREAD_STATE_COUNT ARM_UNIFIED_THREAD_STATE_COUNT
+# elif defined(ARM32)
# define GC_THREAD_STATE_T arm_thread_state_t
# ifdef ARM_MACHINE_THREAD_STATE_COUNT
# define GC_MACH_THREAD_STATE ARM_MACHINE_THREAD_STATE
/* without __, thus hopefully, not breaking any existing */
/* Makefile.direct builds. */
# if __DARWIN_UNIX03
-# define THREAD_FLD(x) __ ## x
+# if defined(ARM32) && defined(ARM_UNIFIED_THREAD_STATE)
+# define THREAD_FLD(x) ts_32.__ ## x
+# else
+# define THREAD_FLD(x) __ ## x
+# endif
# else
-# define THREAD_FLD(x) x
+# if defined(ARM32) && defined(ARM_UNIFIED_THREAD_STATE)
+# define THREAD_FLD(x) ts_32. ## x
+# else
+# define THREAD_FLD(x) x
+# endif
# endif
#endif /* DARWIN */