diff options
author | andreast <andreast@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-11 20:06:45 +0000 |
---|---|---|
committer | andreast <andreast@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-11 20:06:45 +0000 |
commit | 886a341f3ff7c1a2dec9207e1a68d1ea18e50e73 (patch) | |
tree | 702d33aaf045d9f70bceb0e22f3ef4a3727a2ddf /boehm-gc/os_dep.c | |
parent | bb3141cba23451798460261ff54c1805179e1646 (diff) | |
download | gcc-886a341f3ff7c1a2dec9207e1a68d1ea18e50e73.tar.gz |
2007-01-11 Andreas Tobler <a.tobler@schweiz.org>
* configure.ac: Replaced HAS_I386_THREAD_STATE_* with
HAS_X86_THREAD_STATE32_* and HAS_X86_THREAD_STATE64_* respectively.
* configure: Regenerated.
* include/private/gcconfig.h (DARWIN): Added X86_64 define for Darwin.
Added base definitions for the X86_64 Darwin port.
* include/private/gc_priv.h: Added definitions for Darwin MACH thread
operations. Moved existing THREAD_STATE info from darwin_stop_world.c.
* darwin_stop_world.c: Removed THREAD_STATE info. Added
HAS_X86_THREAD_STATE64___RAX. And replaced HAS_I386_THREAD_STATE___EAX
with HAS_X86_THREAD_STATE32___EAX.
(GC_push_all_stacks): Use GC_MACH_THREAD_STATE_COUNT. Add code for
X86_64 Darwin.
* dyn_load.c (GC_dyld_name_for_hdr): Use GC_MACH_HEADER.
(GC_dyld_image_add): Use GC_MACH_HEADER and GC_MACH_SECTION.
Distinguish between getsectbynamefromheader_64 and
getsectbynamefromheader.
(GC_dyld_image_remove): Likewise.
* os_dep.c (GC_dirty_init): Use GC_MACH_THREAD_STATE.
(catch_exception_raise): Introduce exception information for I386 and
X86_64 Darwin. Add X86_64 for exc_state.faultvaddr.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120684 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc/os_dep.c')
-rw-r--r-- | boehm-gc/os_dep.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/boehm-gc/os_dep.c b/boehm-gc/os_dep.c index 98ab6be5356..5a0e59fefb7 100644 --- a/boehm-gc/os_dep.c +++ b/boehm-gc/os_dep.c @@ -3683,7 +3683,7 @@ void GC_dirty_init() { mask, GC_ports.exception, EXCEPTION_DEFAULT, - MACHINE_THREAD_STATE + GC_MACH_THREAD_STATE ); if(r != KERN_SUCCESS) ABORT("task_set_exception_ports failed"); @@ -3802,10 +3802,16 @@ catch_exception_raise( mach_msg_type_number_t exc_state_count = PPC_EXCEPTION_STATE64_COUNT; ppc_exception_state64_t exc_state; # endif -# elif defined(I386) - thread_state_flavor_t flavor = i386_EXCEPTION_STATE; - mach_msg_type_number_t exc_state_count = i386_EXCEPTION_STATE_COUNT; - i386_exception_state_t exc_state; +# elif defined(I386) || defined(X86_64) +# if CPP_WORDSZ == 32 + thread_state_flavor_t flavor = x86_EXCEPTION_STATE32; + mach_msg_type_number_t exc_state_count = x86_EXCEPTION_STATE32_COUNT; + x86_exception_state_t exc_state; +# else + thread_state_flavor_t flavor = x86_EXCEPTION_STATE64; + mach_msg_type_number_t exc_state_count = x86_EXCEPTION_STATE64_COUNT; + x86_exception_state64_t exc_state; +# endif # else # error FIXME for non-ppc darwin # endif @@ -3839,7 +3845,7 @@ catch_exception_raise( /* This is the address that caused the fault */ #if defined(POWERPC) addr = (char*) exc_state.dar; -#elif defined (I386) +#elif defined (I386) || defined (X86_64) addr = (char*) exc_state.faultvaddr; #else # error FIXME for non POWERPC/I386 |