Restore LR in case __eabi was called multiple times
authorMichael Meissner <meissner@cygnus.com>
Thu, 7 May 1998 14:39:02 +0000 (14:39 +0000)
committerMichael Meissner <meissner@gcc.gnu.org>
Thu, 7 May 1998 14:39:02 +0000 (14:39 +0000)
From-SVN: r19612

gcc/ChangeLog
gcc/config/rs6000/eabi.asm

index 36d43c037e2e282fec4a2041fb67f6a66e67ff8f..a772a8cbf513e5d121ef4a56a2bf4c6052aea5ca 100644 (file)
@@ -1,3 +1,8 @@
+Thu May  7 17:38:03 1998  Michael Meissner  <meissner@cygnus.com>
+
+       * r6000/eabi.asm (__eabi): Restore LR in case __eabi is called
+       multiple times.
+
 Thu May  7 14:26:05 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * aclocal.m4 (GCC_FUNC_VFPRINTF_DOPRNT): New macro.
index f7bbeb2205866ae06ce3a3a9a7f2244322abd052..60bcfe2e4a039f92bfc5277822aa9195b590699c 100644 (file)
@@ -152,6 +152,7 @@ FUNC_START(__eabi)
        subf.   12,12,11                        /* calculate difference */
        lwzx    9,10,12                         /* done flag */
        cmplwi  2,9,0                           /* init flag != 0? */
+       mtlr    0                               /* restore in case branch was taken */
        bnelr   2                               /* return now, if we've been called already */
        stwx    1,10,12                         /* store a non-zero value in the done flag */
        beq+    0,.Lsdata                       /* skip if we don't need to relocate */