Hi Kiyo,
Kiyo Inaba wrote:
For m68k/NetBSD, I found one fuzz which makes jit does not work.
In 'config/m68k/jit.h', the struct methodTrampoline looks like ------------------------------------------------------------------ typedef struct _methodTrampoline { unsigned short call; int fixup; struct _methods* meth; void** where; } methodTrampoline; ------------------------------------------------------------------
And this declaration is OK for (at least) woody but not good for recent versions of NetBSD. The gcc on NetBSD tries to keep 4 bytes alignment for 'short' values. # BTW, fixup is the argument of call and should not have any pads.
Trivial fix for this is something like, ------------------------------------------------------------------
typedef struct _methodTrampoline {
unsigned short call;
int fixup __attribute__ ((packed));
struct _methods* meth;
void** where;
} methodTrampoline;
------------------------------------------------------------------
Thanks a lot for spotting this one. I'll check in the fix.
I am wondering when the behavier was changed on NetBSD, since I remember at least once the original code worked.
the definition of fixup in jit.h has stayed the same since it was included, as far as I can see at http://www.kaffe.org/cgi-bin/viewcvs.cgi/kaffe/config/m68k/jit.h?annotate=1.13
cheers, dalibor topic
_______________________________________________ kaffe mailing list [EMAIL PROTECTED] http://kaffe.org/cgi-bin/mailman/listinfo/kaffe