From 107eb3fc405825a147b9b3d7a176040b65f1f757 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 14 Jun 2007 08:41:41 +0000 Subject: [PATCH] * emultempl/spu_ovl.S: Don't trash lr on tail call from one overlay to another. * emultempl/spu_ovl.o: Regenerate. --- ld/ChangeLog | 6 ++++++ ld/emultempl/spu_ovl.S | 7 ++++++- ld/emultempl/spu_ovl.o | Bin 1416 -> 1432 bytes 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index d31157e..2d44638 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 0f1064b..adc6ab2 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 51a9bbd1121d56dabf9ac1b11a24dfb72dae6686..a68eea3970aaced86a5b5358c14636987aebaffa 100644 GIT binary patch delta 198 zcmeC+p20mqneod+m2AdS6DL^kcTP_8u3%#DHanntx`9D$;^~Jh4hjqmlh-hoGd4_C zVNzxcnC!u%&Uj#Q0hAPHgbV$o(iF#LUg2^UK%8U+^Bbd|~H%xATlH!y1 zGYJ6s7l3?~$v=Q($YcfPZpMtsYnbH~eHb8s5lE#1@eL$?83O}j#N;>3%8WLX1z5Bh z_e{27k!SSS9K*uTs5^y$fsgh7|NkF=8Wu1x@UucSUSVJmWP-361Aqnq#Tg?27MLl> -- 2.7.4