summaryrefslogtreecommitdiffstats
path: root/gcc/libgcc2.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-01-26 22:54:52 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-01-26 22:54:52 +0000
commitaaa36d7cead5de11c84cb2ea57807beaac76062e (patch)
treeceb6aa6d7c4e146161912b7b8bc3967f50829426 /gcc/libgcc2.c
parent2c5b29ac56e14dc7b22340b3389c9b8fc7d3e0d0 (diff)
downloadppe42-gcc-aaa36d7cead5de11c84cb2ea57807beaac76062e.tar.gz
ppe42-gcc-aaa36d7cead5de11c84cb2ea57807beaac76062e.zip
* libgcc2.c (__clear_insn_cache): On sysV68 enable the memctl
stuff only if MCT_TEXT is #define'd. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17496 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/libgcc2.c')
-rw-r--r--gcc/libgcc2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c
index 21301f52cdc..673d2f316d1 100644
--- a/gcc/libgcc2.c
+++ b/gcc/libgcc2.c
@@ -2724,7 +2724,10 @@ __enable_execute_stack ()
/* 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 */
+/* On older versions of this OS, no memctl or MCT_TEXT are defined;
+ hence we enable this stuff only if MCT_TEXT is #define'd. */
+#ifdef MCT_TEXT
asm("\n\
global memctl\n\
memctl:\n\
@@ -2735,6 +2738,7 @@ memctl:\n\
noerror:\n\
movq &0,%d0\n\
rts");
+#endif
/* Clear instruction cache so we can call trampolines on stack.
This is called from FINALIZE_TRAMPOLINE in mot3300.h. */
@@ -2742,6 +2746,7 @@ noerror:\n\
void
__clear_insn_cache ()
{
+#ifdef MCT_TEXT
int save_errno;
/* Preserve errno, because users would be surprised to have
@@ -2752,6 +2757,7 @@ __clear_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
}
#endif /* __sysV68__ */
OpenPOWER on IntegriCloud