Kaffe 0.84/JIT on netbsd-m68k (long)

Hauke Fath hauke at Espresso.Rhein-Neckar.DE
Thu Feb 5 14:16:34 PST 1998


At 23:11 Uhr +0100 04.02.1998, Ignatios Souvatzis wrote:

>> -- Is this always a no-op for NetBSD/m68k?
>
>The one I'm thinking of used to be up to NetBSD-1.2G, corresponding to
>up to gcc-2.7.2.1. Actually, it did some jmp tricks I never understood.
>gcc in the 1.3 release is fixed by importing the relevant parts of
>gcc-2.7.2.3.
>
>Note that flushing the D-cache is NOT enough. You need to invalidate the
>I-cache, too.  THe code actually used by gcc does this.

What I have done is copy the code snippet from the ld sources:

#define FLUSH_DCACHE(beg, end)                                  \
        __asm__ __volatile__(                                   \
                "movem%.l %/d0-%/d7/%/a0-%/a5,%-\n\t"           \
                "move%.l %0,%/a1\n\t"                           \
                "move%.l %1,%/d1\n\t"                           \
                "sub%.l %/d1,%/a1\n\t"                          \
                "movel  %#0x80000004,d0\n\t"                    \
                "trap   %#12\n\t"                               \
                "movem%.l %+,%/d0-%/d7/%/a0-%/a5"               \
                :                                               \
                : "g" (beg), "g" (end) )

With this, Kaffe 0.8.4 successfully builds and runs the included test suite
and the benchmarks (apart from AWT bugs). So I'd assume that trap 12 does
TRT?

>> Is the routine from
>> arch/m68k/mdprologue.S globally available?
>
>err... at least, it should be in dynamically loaded programs, as ld.so is
>using it when patching shared library references..

But it's not an "official" interface, exported by, say, a header?

>You should make sure to have 2.7.2.3, at least. 2.7.2.1 had NOT valid code
>for 68040 and 60. We imported those parts of 2.7.2.3 during the early
>1.3 release branch time, just to fix that bug.

What I have here is

[root at q700] ~ # cc -v
gcc version 2.7.2.2+myc1
[root at q700] ~ #

i.e. stock 1.3 userland and a 1.3B kernel.

	hauke


--
"It's never straight up and down"     (DEVO)




More information about the kaffe mailing list