aboutsummaryrefslogtreecommitdiffstats
path: root/gc/mach_dep.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2001-12-20 00:37:29 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2001-12-20 00:37:29 +0000
commit548b9dd8dbfa0dbe5247d9b4af7e388855beb506 (patch)
tree81b92ab0e12a687937e7948736fcb280dbc8d6c6 /gc/mach_dep.c
parent[w3m-dev 02655] print version and compile options (diff)
downloadw3m-548b9dd8dbfa0dbe5247d9b4af7e388855beb506.tar.gz
w3m-548b9dd8dbfa0dbe5247d9b4af7e388855beb506.zip
sync with w3m-0.2.2-inu-1.1/gc
Diffstat (limited to 'gc/mach_dep.c')
-rw-r--r--gc/mach_dep.c34
1 files changed, 25 insertions, 9 deletions
diff --git a/gc/mach_dep.c b/gc/mach_dep.c
index 776bf69..b582db0 100644
--- a/gc/mach_dep.c
+++ b/gc/mach_dep.c
@@ -429,7 +429,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 +492,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 +513,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