aboutsummaryrefslogtreecommitdiff
path: root/boehm-gc/mach_dep.c
diff options
context:
space:
mode:
authorBryce McKinlay <bryce@waitaki.otago.ac.nz>2001-10-16 09:01:40 +0000
committerBryce McKinlay <bryce@gcc.gnu.org>2001-10-16 10:01:40 +0100
commit4c7726b172c35bd078bb0f88025670ffddd94a92 (patch)
tree483dc5098530e605b23e445c94fcdfdfec0d9b23 /boehm-gc/mach_dep.c
parent107abb2f61f6e53ebb7aa05b78fdd9234ee7877c (diff)
downloadgcc-4c7726b172c35bd078bb0f88025670ffddd94a92.zip
gcc-4c7726b172c35bd078bb0f88025670ffddd94a92.tar.gz
gcc-4c7726b172c35bd078bb0f88025670ffddd94a92.tar.bz2
Makefile.am, [...]: Imported GC 6.1 Alpha 1 and merged local changes.
* Makefile.am, acinclude.m4, configure.in: Imported GC 6.1 Alpha 1 and merged local changes. From-SVN: r46283
Diffstat (limited to 'boehm-gc/mach_dep.c')
-rw-r--r--boehm-gc/mach_dep.c28
1 files changed, 21 insertions, 7 deletions
diff --git a/boehm-gc/mach_dep.c b/boehm-gc/mach_dep.c
index 776bf69..35e9264 100644
--- a/boehm-gc/mach_dep.c
+++ b/boehm-gc/mach_dep.c
@@ -492,8 +492,9 @@ 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. */
+/* We implement this as a separate file in HP/UX. */
# ifdef IA64
-# ifdef __GNUC__
+# ifdef LINUX
asm(" .text");
asm(" .psr abi64");
asm(" .psr lsb");
@@ -510,12 +511,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