Kaffe on CRIS/Etrax
mikael.pahmp at axis.com
Wed Aug 29 01:42:53 PDT 2001
I'm working on porting Kaffe to Axis' Etrax CPU. It uses an RISC architecture called CRIS. More info can be found at http://developer.axis.com.
The CRIS ABI breaks some assumptions made in Kaffe about memory alignment. More specifically, Kaffe expects local function variables to be aligned on even 32-bit addresses, e.g. the 'where' pointers in kaffe/kaffevm/locks.c. This is not true when compiled with gcc for CRIS which doesn't align local variables at all.
To work around this my idea is to simply align the 'where' pointers by clearing their two lowest bits before using them in the functions in locks.c. Does anyone see a problem with that?
Identifying this problem wasn't easy. Does anyone know any more places within Kaffe where a certain local variable alignment is assumed?
More information about the kaffe