Kaffe on CRIS/Etrax

Edouard G. Parmelan egp at free.fr
Thu Aug 30 13:16:02 PDT 2001


On Wed, Aug 29, 2001 at 10:42:53 +0200, Mikael Pahmp wrote:

> 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?

Yep, when Garbadge Collector walks thread stack.
kaffe/kaffevm/mem/gc-incremental.c: gcWalkConservative() 

Did alignment of local variable differ from alignement of fields in
structure ?

-- 
Edouard G. Parmelan
http://egp.free.fr


More information about the kaffe mailing list