Re: cross-compile error
Robert Schuster <[email protected]> Mon, 21 Jan 2008 01:00:57 +0100
| Newsgroups | gmane.comp.java.vm.kaffe.general |
|---|---|
| Message-ID | <[email protected]> |
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 > [email protected] > http://kaffe.org/cgi-bin/mailman/listinfo/kaffe _______________________________________________ kaffe mailing list [email protected] http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
kaffe-linux-md.c-fix.patch
(text/x-patch, 996 B)
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
(application/pgp-signature, 252 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHk+C7G9cfwmwwEtoRCLNoAJ9FKIozi8cjkga99N9IBwMIU2qvggCfZ7nk rkcoF82c2WecAfwIBwHpQIM= =P2DU -----END PGP SIGNATURE-----