+2006-12-08 Mike Stump <mrs@apple.com>
+
+ * configure.ac: Fix x86 darwin builds.
+ * darwin_stop_world.c: Likewise.
+ * include/private/gcconfig.h: Likewise.
+ * connfigure: Regenerate.
+
2006-09-26 Jack Howarth <howarth@bromo.med.uc.edu>
PR target/29180
#define THREAD_LOCAL_ALLOC 1
_ACEOF
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define USE_COMPILER_TLS 1
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+#include <sys/cdefs.h>
#include <mach/thread_status.h>
int
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+#include <sys/cdefs.h>
#include <mach/thread_status.h>
int
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+#include <sys/cdefs.h>
#include <mach/thread_status.h>
int
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+#include <sys/cdefs.h>
#include <mach/thread_status.h>
int
AC_CHECK_MEMBER(i386_thread_state_t.eax,
AC_DEFINE(HAS_I386_THREAD_STATE_EAX,,dnl
[i386_thread_state_t has field eax]),,
- [#include <mach/thread_status.h>])
+ [#include <sys/cdefs.h>
+#include <mach/thread_status.h>])
AC_CHECK_MEMBER(i386_thread_state_t.__eax,
AC_DEFINE(HAS_I386_THREAD_STATE___EAX,,dnl
[i386_thread_state_t has field __eax]),,
- [#include <mach/thread_status.h>])
+ [#include <sys/cdefs.h>
+#include <mach/thread_status.h>])
;;
*) ;;
esac
# else
# error can not work out how to access fields of i386_thread_state_t
# endif
+#elif defined(__x86_64__)
+# define THREAD_STATE i386_thread_state_t
+# if defined (HAS_I386_THREAD_STATE_EAX)
+# define THREAD_FLD(x) x
+# elif defined (HAS_I386_THREAD_STATE___EAX)
+# define THREAD_FLD(x) __ ## x
+# else
+# error can not work out how to access fields of i386_thread_state_t
+# endif
#else
# error unknown architecture
#endif
if(r != KERN_SUCCESS) ABORT("thread_get_state failed");
#if defined(I386)
- lo = state.esp;
-
- GC_push_one(state.eax);
- GC_push_one(state.ebx);
- GC_push_one(state.ecx);
- GC_push_one(state.edx);
- GC_push_one(state.edi);
- GC_push_one(state.esi);
- GC_push_one(state.ebp);
+ lo = (void*)state . THREAD_FLD (esp);
+
+ GC_push_one(state . THREAD_FLD (eax));
+ GC_push_one(state . THREAD_FLD (ebx));
+ GC_push_one(state . THREAD_FLD (ecx));
+ GC_push_one(state . THREAD_FLD (edx));
+ GC_push_one(state . THREAD_FLD (edi));
+ GC_push_one(state . THREAD_FLD (esi));
+ GC_push_one(state . THREAD_FLD (ebp));
#elif defined(POWERPC)
lo = (void*)(state . THREAD_FLD (r1) - PPC_RED_ZONE_SIZE);
# if defined(__ppc__) || defined(__ppc64__)
# define POWERPC
# define mach_type_known
-# elif defined(__i386__)
+# elif defined(__i386__) || defined(__x86_64)
# define I386
# define mach_type_known
# endif
# define DATAEND (_end)
# endif
# ifdef DARWIN
-# ifdef __ppc64__
+# if defined(__ppc64__) || defined(__x86_64)
# define ALIGNMENT 8
# define CPP_WORDSZ 64
# else