diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-01-14 20:57:58 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-01-14 20:57:58 +0000 |
commit | 220345e0620e402f170696f15570e3f47a1bec43 (patch) | |
tree | 028c0425d9847ebff16ca9566dcf696998e902b9 /gcc/libgcc2.c | |
parent | 4b2eb5772fc4730e07ae4881d2deca5cc50331b6 (diff) | |
download | ppe42-gcc-220345e0620e402f170696f15570e3f47a1bec43.tar.gz ppe42-gcc-220345e0620e402f170696f15570e3f47a1bec43.zip |
Bring in final gcc-2.8.0 changes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17355 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/libgcc2.c')
-rw-r--r-- | gcc/libgcc2.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c index cd656760d16..21301f52cdc 100644 --- a/gcc/libgcc2.c +++ b/gcc/libgcc2.c @@ -2717,6 +2717,45 @@ __enable_execute_stack () #endif /* __sysV88__ */ +#ifdef __sysV68__ + +#include <sys/signal.h> +#include <errno.h> + +/* Motorola forgot to put memctl.o in the libp version of libc881.a, + so define it here, because we need it in __clear_insn_cache below */ + +asm("\n\ + global memctl\n\ +memctl:\n\ + movq &75,%d0\n\ + trap &0\n\ + bcc.b noerror\n\ + jmp cerror%\n\ +noerror:\n\ + movq &0,%d0\n\ + rts"); + +/* Clear instruction cache so we can call trampolines on stack. + This is called from FINALIZE_TRAMPOLINE in mot3300.h. */ + +void +__clear_insn_cache () +{ + int save_errno; + + /* Preserve errno, because users would be surprised to have + errno changing without explicitly calling any system-call. */ + save_errno = errno; + + /* Keep it simple : memctl (MCT_TEXT) always fully clears the insn cache. + No need to use an address derived from _start or %sp, as 0 works also. */ + memctl(0, 4096, MCT_TEXT); + errno = save_errno; +} + +#endif /* __sysV68__ */ + #ifdef __pyr__ #undef NULL /* Avoid errors if stdio.h and our stddef.h mismatch. */ @@ -3634,6 +3673,7 @@ label: #endif /* DWARF2_UNWIND_INFO */ #endif /* L_eh */ + #ifdef L_pure #ifndef inhibit_libc |