summaryrefslogtreecommitdiff
path: root/mach_dep.c
diff options
context:
space:
mode:
Diffstat (limited to 'mach_dep.c')
-rw-r--r--mach_dep.c37
1 files changed, 27 insertions, 10 deletions
diff --git a/mach_dep.c b/mach_dep.c
index 776bf69..da5db3f 100644
--- a/mach_dep.c
+++ b/mach_dep.c
@@ -245,7 +245,8 @@ void GC_push_regs()
|| ( defined(I386) && defined(FREEBSD) && defined(__ELF__) ) \
|| ( defined(I386) && defined(NETBSD) && defined(__ELF__) ) \
|| ( defined(I386) && defined(OPENBSD) && defined(__ELF__) ) \
- || ( defined(I386) && defined(HURD) && defined(__ELF__) )
+ || ( defined(I386) && defined(HURD) && defined(__ELF__) ) \
+ || ( defined(I386) && defined(DGUX) )
/* This is modified for Linux with ELF (Note: _ELF_ only) */
/* This section handles FreeBSD with ELF. */
@@ -429,7 +430,7 @@ ptr_t cold_gc_frame;
*i = 0;
}
# if defined(POWERPC) || defined(MSWIN32) || defined(MSWINCE) \
- || defined(UTS4) || defined(LINUX)
+ || defined(UTS4) || defined(LINUX) || defined(EWS4800)
(void) setjmp(regs);
# else
(void) _setjmp(regs);
@@ -492,8 +493,11 @@ ptr_t cold_gc_frame;
/* On IA64, we also need to flush register windows. But they end */
/* up on the other side of the stack segment. */
/* Returns the backing store pointer for the register stack. */
-# ifdef IA64
-# ifdef __GNUC__
+/* We now implement this as a separate assembly file, since inline */
+/* assembly code here doesn't work with either the Intel or HP */
+/* compilers. */
+# if 0
+# ifdef LINUX
asm(" .text");
asm(" .psr abi64");
asm(" .psr lsb");
@@ -510,12 +514,25 @@ ptr_t cold_gc_frame;
asm(" mov r8=ar.bsp");
asm(" br.ret.sptk.few rp");
asm(" .endp GC_save_regs_in_stack");
-# else
- void GC_save_regs_in_stack() {
- asm(" flushrs");
- asm(" ;;");
- asm(" mov r8=ar.bsp");
- asm(" br.ret.sptk.few rp");
+# endif /* LINUX */
+# if 0 /* Other alternatives that don't work on HP/UX */
+ word GC_save_regs_in_stack() {
+# if USE_BUILTINS
+ __builtin_ia64_flushrs();
+ return __builtin_ia64_bsp();
+# else
+# ifdef HPUX
+ _asm(" flushrs");
+ _asm(" ;;");
+ _asm(" mov r8=ar.bsp");
+ _asm(" br.ret.sptk.few rp");
+# else
+ asm(" flushrs");
+ asm(" ;;");
+ asm(" mov r8=ar.bsp");
+ asm(" br.ret.sptk.few rp");
+# endif
+# endif
}
# endif
# endif