How to compile "NOT JIT"?
Kars de Jong
jongk at prac.cs.utwente.nl
Fri Sep 5 04:17:15 PDT 1997
> > The total of 4 lines modification of machine.c seems good on my
> > NetBSD-1.2.1-i386 system, but on my Linux (ix86, debian-based,
> > kernel-2.0.29, libc-5.4.20, gcc-2.7.2.1, binutil-2.7) kaffe dies with
> > Segmentation fault.
There is a patch for the interpreter version of kaffe-0.9.1 in the mailing
list archives, why don't you just find it there? It can be accessed through
the web page on www.kaffe.org.
Kars.
Oh what the heck, I'll include it here again.
diff -c kaffe/kaffe/kaffevm/Makefile.in:1.1.1.1.2.1.2.2.2.1 kaffe/kaffe/kaffevm/Makefile.in:1.1.1.1.2.1.2.2.2.1.2.1
*** kaffe/kaffe/kaffevm/Makefile.in:1.1.1.1.2.1.2.2.2.1 Thu Jun 12 14:11:46 1997
--- kaffe/kaffe/kaffevm/Makefile.in Sun Jun 29 14:15:28 1997
***************
*** 90,96 ****
rm -f $(LIB) $(LLIB) $(OBJECT) lib.exp
distclean: clean
! rm -f md.c jit.def icode.h
rm -f thread-native.h locks-native.h
rm -f Makefile
--- 90,96 ----
rm -f $(LIB) $(LLIB) $(OBJECT) lib.exp
distclean: clean
! rm -f md.c jit.def icode.h trampoline.c
rm -f thread-native.h locks-native.h
rm -f Makefile
diff -c kaffe/kaffe/kaffevm/intrp/machine.c:1.1.1.1.2.1.4.2 kaffe/kaffe/kaffevm/intrp/machine.c:1.1.1.1.2.1.4.2.2.1
*** kaffe/kaffe/kaffevm/intrp/machine.c:1.1.1.1.2.1.4.2 Thu Jun 26 16:25:07 1997
--- kaffe/kaffe/kaffevm/intrp/machine.c Sun Jun 29 14:15:30 1997
***************
*** 74,79 ****
--- 74,80 ----
Hjava_lang_Object* mobj;
vmException mjbuf;
accessFlags methaccflags;
+ char* str;
/* If these can be kept in registers then things will go much
* better.
***************
*** 138,144 ****
mjbuf.prev = TCTX(currentThread)->exceptPtr;
TCTX(currentThread)->exceptPtr = &mjbuf;
}
! if (meth->exception_table_len > 0 || (methaccflags & ACC_SYNCHRONISED)) {
if (setjmp(mjbuf.jbuf) != 0) {
assert(TCTX(currentThread)->exceptPtr == &mjbuf);
npc = mjbuf.pc;
--- 139,145 ----
mjbuf.prev = TCTX(currentThread)->exceptPtr;
TCTX(currentThread)->exceptPtr = &mjbuf;
}
! if (meth->exception_table != 0 || (methaccflags & ACC_SYNCHRONISED)) {
if (setjmp(mjbuf.jbuf) != 0) {
assert(TCTX(currentThread)->exceptPtr == &mjbuf);
npc = mjbuf.pc;
***************
*** 149,155 ****
}
/* Calculate number of arguments */
! idx = meth->ins + (methaccflags & ACC_STATIC ? 0 : 1);
DBG( printf("Call to method %s.%s%s.\n", meth->class->name->data, meth->name->data, meth->signature->data); fflush(stdout); )
--- 150,157 ----
}
/* Calculate number of arguments */
! str = meth->signature->data;
! idx = sizeofSig(&str, false) + (methaccflags & ACC_STATIC ? 0 : 1);
DBG( printf("Call to method %s.%s%s.\n", meth->class->name->data, meth->name->data, meth->signature->data); fflush(stdout); )
***************
*** 175,185 ****
restart:
wide = 0;
! code = (bytecode*)meth->code;
/* Finally we get to actually execute the machine */
for (;;) {
! assert(npc < meth->codelen);
pc = npc;
mjbuf.pc = pc;
npc = pc + insnLen[code[pc]];
--- 177,187 ----
restart:
wide = 0;
! code = (bytecode*)meth->c.bcode.code;
/* Finally we get to actually execute the machine */
for (;;) {
! assert(npc < meth->c.bcode.codelen);
pc = npc;
mjbuf.pc = pc;
npc = pc + insnLen[code[pc]];
More information about the kaffe
mailing list