Commit 3698f44e by Manfred Hollstein Committed by Jeff Law

libgcc2.c (__clear_insn_cache): On sysV68 enable the memctl stuff only if MCT_TEXT is #define'd.

        * libgcc2.c (__clear_insn_cache): On sysV68 enable the memctl
        stuff only if MCT_TEXT is #define'd.

From-SVN: r17496
parent ac8a456a
Mon Jan 26 23:57:39 1998 Manfred Hollstein <manfred@s-direktnet.de>
* libgcc2.c (__clear_insn_cache): On sysV68 enable the memctl
stuff only if MCT_TEXT is #define'd.
Mon Jan 26 23:52:51 1998 Markus F.X.J. Oberhumer <k3040e4@c210.edvz.uni-linz.ac.at> Mon Jan 26 23:52:51 1998 Markus F.X.J. Oberhumer <k3040e4@c210.edvz.uni-linz.ac.at>
* configure.in (i*86-pc-msdosdjgpp): Treat like msdos & go32 * configure.in (i*86-pc-msdosdjgpp): Treat like msdos & go32
......
...@@ -2724,7 +2724,10 @@ __enable_execute_stack () ...@@ -2724,7 +2724,10 @@ __enable_execute_stack ()
/* Motorola forgot to put memctl.o in the libp version of libc881.a, /* 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 */ 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\ asm("\n\
global memctl\n\ global memctl\n\
memctl:\n\ memctl:\n\
...@@ -2735,6 +2738,7 @@ memctl:\n\ ...@@ -2735,6 +2738,7 @@ memctl:\n\
noerror:\n\ noerror:\n\
movq &0,%d0\n\ movq &0,%d0\n\
rts"); rts");
#endif
/* Clear instruction cache so we can call trampolines on stack. /* Clear instruction cache so we can call trampolines on stack.
This is called from FINALIZE_TRAMPOLINE in mot3300.h. */ This is called from FINALIZE_TRAMPOLINE in mot3300.h. */
...@@ -2742,6 +2746,7 @@ noerror:\n\ ...@@ -2742,6 +2746,7 @@ noerror:\n\
void void
__clear_insn_cache () __clear_insn_cache ()
{ {
#ifdef MCT_TEXT
int save_errno; int save_errno;
/* Preserve errno, because users would be surprised to have /* Preserve errno, because users would be surprised to have
...@@ -2752,6 +2757,7 @@ __clear_insn_cache () ...@@ -2752,6 +2757,7 @@ __clear_insn_cache ()
No need to use an address derived from _start or %sp, as 0 works also. */ No need to use an address derived from _start or %sp, as 0 works also. */
memctl(0, 4096, MCT_TEXT); memctl(0, 4096, MCT_TEXT);
errno = save_errno; errno = save_errno;
#endif
} }
#endif /* __sysV68__ */ #endif /* __sysV68__ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment