summaryrefslogtreecommitdiff
path: root/mach_dep.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2011-07-26 15:20:24 +0400
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 15:20:24 +0400
commitc521d2cf164f9d7e1fa8be9c0b21d223e265fa64 (patch)
tree82fbd7e60e6be39fbabd946717cf065a698cd038 /mach_dep.c
parent7d3768dbd2a1cd4d5c14f773f23aec43bc0651a5 (diff)
downloadbdwgc-c521d2cf164f9d7e1fa8be9c0b21d223e265fa64.tar.gz
gc4.13 tarball importgc4_13
Diffstat (limited to 'mach_dep.c')
-rw-r--r--mach_dep.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/mach_dep.c b/mach_dep.c
index 06463d16..20931c2b 100644
--- a/mach_dep.c
+++ b/mach_dep.c
@@ -169,7 +169,9 @@ void GC_push_regs()
# endif /* MACOS */
# if defined(I386) &&!defined(OS2) &&!defined(SVR4) &&!defined(MSWIN32) \
- && !defined(SCO) && !(defined(LINUX) && defined(__ELF__)) \
+ && !defined(SCO) && !defined(SCO_ELF) \
+ && !(defined(LINUX) && defined(__ELF__)) \
+ && !(defined(__FreeBSD__) && defined(__ELF__)) \
&& !defined(DOS4GW)
/* I386 code, generic code does not appear to work */
/* It does appear to work under OS2, and asms dont */
@@ -183,8 +185,11 @@ void GC_push_regs()
asm("pushl %ebx"); asm("call _GC_push_one"); asm("addl $4,%esp");
# endif
-# if defined(I386) && defined(LINUX) && defined(__ELF__)
+# if ( defined(I386) && defined(LINUX) && defined(__ELF__) ) \
+ || ( defined(I386) && defined(__FreeBSD__) && defined(__ELF__) )
+
/* This is modified for Linux with ELF (Note: _ELF_ only) */
+ /* This section handles FreeBSD with ELF. */
asm("pushl %eax"); asm("call GC_push_one"); asm("addl $4,%esp");
asm("pushl %ecx"); asm("call GC_push_one"); asm("addl $4,%esp");
asm("pushl %edx"); asm("call GC_push_one"); asm("addl $4,%esp");
@@ -219,7 +224,7 @@ void GC_push_regs()
__asm add esp,4
# endif
-# if defined(I386) && (defined(SVR4) || defined(SCO))
+# if defined(I386) && (defined(SVR4) || defined(SCO) || defined(SCO_ELF))
/* I386 code, SVR4 variant, generic code does not appear to work */
asm("pushl %eax"); asm("call GC_push_one"); asm("addl $4,%esp");
asm("pushl %ebx"); asm("call GC_push_one"); asm("addl $4,%esp");