aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2007-06-14 08:41:41 +0000
committerAlan Modra <amodra@gmail.com>2007-06-14 08:41:41 +0000
commit107eb3fc405825a147b9b3d7a176040b65f1f757 (patch)
tree549ed78ff66682b73ce171a9a51b43464581b9f3 /ld/emultempl
parenta104c397e762939248436df5128bf6d6a6f04edc (diff)
downloadgdb-107eb3fc405825a147b9b3d7a176040b65f1f757.zip
gdb-107eb3fc405825a147b9b3d7a176040b65f1f757.tar.gz
gdb-107eb3fc405825a147b9b3d7a176040b65f1f757.tar.bz2
* emultempl/spu_ovl.S: Don't trash lr on tail call from one
overlay to another. * emultempl/spu_ovl.o: Regenerate.
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/spu_ovl.S7
-rw-r--r--ld/emultempl/spu_ovl.obin1416 -> 1432 bytes
2 files changed, 6 insertions, 1 deletions
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 51a9bbd..a68eea3 100644
--- a/ld/emultempl/spu_ovl.o
+++ b/ld/emultempl/spu_ovl.o
Binary files differ