From: Alan Modra Date: Thu, 14 Jun 2007 08:41:41 +0000 (+0000) Subject: * emultempl/spu_ovl.S: Don't trash lr on tail call from one X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=107eb3fc405825a147b9b3d7a176040b65f1f757;p=binutils-gdb.git * emultempl/spu_ovl.S: Don't trash lr on tail call from one overlay to another. * emultempl/spu_ovl.o: Regenerate. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index d31157e8898..2d4463813bd 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2007-06-14 Alan Modra + + * emultempl/spu_ovl.S: Don't trash lr on tail call from one + overlay to another. + * emultempl/spu_ovl.o: Regenerate. + 2007-06-11 Bob Wilson * emulparams/elf32xtensa.sh (OTHER_READONLY_SECTIONS): Add ONLY_IF_RO diff --git a/ld/emultempl/spu_ovl.S b/ld/emultempl/spu_ovl.S index 0f1064bdaba..adc6ab22a77 100644 --- a/ld/emultempl/spu_ovl.S +++ b/ld/emultempl/spu_ovl.S @@ -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 diff --git a/ld/emultempl/spu_ovl.o b/ld/emultempl/spu_ovl.o index 51a9bbd1121..a68eea3970a 100644 Binary files a/ld/emultempl/spu_ovl.o and b/ld/emultempl/spu_ovl.o differ