spu overlay manager infinite loop
Alan Modra
amodra@bigpond.net.au
Thu Jun 14 08:41:00 GMT 2007
More information about the Binutils mailing list
Thu Jun 14 08:41:00 GMT 2007
- Previous message (by thread): Add target "cr16" to Binutils
- Next message (by thread): spu overlay manager infinite loop
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Fixes an infinite loop in the overlay manager. The overlay manager munges lr so that overlay functions return via __ovly_return. If we make a tail call from an overlay function, then the tail call pops a frame off the stack, setting lr to the __ovly_return value. If the tail call is to another overlay, the overlay manager will munge lr as usual so we go via __ovly_return to, you guessed it, __ovly_return. * emultempl/spu_ovl.S: Don't trash lr on tail call from one overlay to another. * emultempl/spu_ovl.o: Regenerate. Index: ld/emultempl/spu_ovl.S =================================================================== RCS file: /cvs/src/src/ld/emultempl/spu_ovl.S,v retrieving revision 1.4 diff -u -p -r1.4 spu_ovl.S --- ld/emultempl/spu_ovl.S 29 May 2007 12:54:29 -0000 1.4 +++ ld/emultempl/spu_ovl.S 14 Jun 2007 08:15:11 -0000 @@ -166,7 +166,12 @@ __ovly_backchain_loop: shufb rv2, retval, lnkr, rv1 shufb rv3, $lr, $78, rv1 fsmbi rv1, 0xff - selb $lr, rv2, rv3, rv1 + selb rv2, rv2, rv3, rv1 +/* If we have a tail call from one overlay function to another overlay, + then lr is already set up. Don't change it. */ + ceq rv1, $lr, retval + fsmb rv1, rv1 + selb $lr, rv2, $lr, rv1 /* Branch to $79 if non-overlay */ brz $78, __ovly_load_restore -- Alan Modra IBM OzLabs - Linux Technology Centre
- Previous message (by thread): Add target "cr16" to Binutils
- Next message (by thread): spu overlay manager infinite loop
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list