Kaffe 0.84/JIT on netbsd-m68k (long)
Hauke Fath
hauke at Espresso.Rhein-Neckar.DE
Wed Feb 4 12:21:25 PST 1998
At 22:39 Uhr +0100 03.02.1998, Ignatios Souvatzis wrote:
>Ok. JIT compilation sound like creation of 68k code on-the-fly. Did you add
>the correct cachectl() pseudo-syscalls, to synchronize the I-cache with the
>D-cache? If no, look at
>
> src/gnu/usr.bin/ld/arch/m68k/mdprologue.S
>
>it should contain what you need.
*Bingo!*
I hacked the asm code snippet in (gcc inline assembler is ugly as hell) and
Kaffe 0.84 JIT compiles & runs "HelloWorldApp" now. =8)
On the other hand...
The JIT code (#define'd in jit.h) calls __clear_cache() from libgcc.a. The
comment says...
/* On the 68040 (and 060 I presume) we need to flush the instruction
cache before running new code. Stupidly, Motorola made cpush a
privledged instruction, so we have to get operating system help
for this. Naturally, there is no standard there.
We are partially rescued by gcc, which must be taught how to do this
in order to build bound-function trampolines. This works at least
for A/UX, Linux and NeXT. The rest of you with 040's should
consider fixing gcc, as you are broken there too.
For those with 020's and 030's, this is effectively a no-op. */
#define FLUSH_DCACHE(beg, end) __clear_cache((beg), (end))
-- Is this always a no-op for NetBSD/m68k? Is the routine from
arch/m68k/mdprologue.S globally available?
More information about the kaffe
mailing list