Hi, Robert Schuster schrieb: > I now found a cacheflush implementation in libffi. I adjust this for > kaffe and report back. I took what was said here[0] as a base for an OABI- & EABI-compliant implementation of the cache flushing.
It compiles nicely (I can only test the EABI-variant here). Unfortunately it does not work at runtime. That means I get the same assertion failure as before: kaffe-bin: exception.c:100: vmExcept_setJNIFrame: Assertion `fp != (JNIFrameAddress)0' Now I dont know whether those two things are related. The only thing I know for sure is that I use the same cacheflush implementation for cacao and there it does its job (and fixes a real bug). Help! :) Regards Robert [0] - http://gcc.gnu.org/ml/java-patches/2007-q3/msg00112.html > Regards > Robert > > > > ------------------------------------------------------------------------ > > _______________________________________________ > kaffe mailing list > kaffe@kaffe.org > http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
Index: kaffe-cvs/config/arm/linux/md.c =================================================================== --- kaffe-cvs.orig/config/arm/linux/md.c 2008-01-21 00:04:12.000000000 +0100 +++ kaffe-cvs/config/arm/linux/md.c 2008-01-21 00:50:30.000000000 +0100 @@ -33,11 +33,25 @@ * for 2.6) should be okay. */ void flush_dcache(void *start, void *end) { - __asm __volatile ("mov r0, %0\n" +#if defined(__ARM_EABI__) + __asm __volatile ( + "mov r0, %0\n" "mov r1, %1\n" "mov r2, #0\n" - "swi " __sys1(__ARM_NR_cacheflush) "\n" + "mov r7, #0x0f0000\n" + "add r7, r7, #0x000002\n" + "swi 0x0\n" + : /* no return value */ + : "r" ((long)start), "r" ((long)end) + : "r0","r1","r2","r7"); +#else /* OABI */ + __asm __volatile ( + "mov r0, %0\n" + "mov r1, %1\n" + "mov r2, #0\n" + "swi sys_cacheflush\n" : /* no return value */ : "r" ((long)start), "r" ((long)end) : "r0","r1","r2"); +#endif }
signature.asc
Description: OpenPGP digital signature
_______________________________________________ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe