diff options
Diffstat (limited to 'gc/mach_dep.c')
-rw-r--r-- | gc/mach_dep.c | 34 |
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 |