]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
lib1funcs.asm (modsi): P1/P2 can be call-clobbered even if the calling function doesn...
authorBernd Schmidt <bernd.schmidt@analog.com>
Wed, 5 Apr 2006 22:03:30 +0000 (22:03 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Wed, 5 Apr 2006 22:03:30 +0000 (22:03 +0000)
* config/bfin/lib1funcs.asm (modsi): P1/P2 can be call-clobbered
even if the calling function doesn't modify them.

From-SVN: r112720

gcc/ChangeLog
gcc/config/bfin/lib1funcs.asm

index 460217491bf40c9968614092a2e1342e9787706f..c630968caaf40e7e006ff0e59824278c1a367c23 100644 (file)
@@ -3,6 +3,9 @@
        * config/bfin/bfin.c (bfin_legitimate_address_p): Disallow
        got-relative addressing for anything but SImode.
 
+       * config/bfin/lib1funcs.asm (modsi): P1/P2 can be call-clobbered
+       even if the calling function doesn't modify them.
+
 2006-04-05  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/26919
index 22e8a02a33ade707ed6eb57a6df2e74c1d51ef69..77d4fff069bf78b9d976aec7a48a617d3614ecc7 100644 (file)
@@ -64,17 +64,16 @@ ___divsi3:
 .type ___modsi3, STT_FUNC;
 
 ___modsi3:
-        [--SP] = RETS;
-       /* P1 and P2 are preserved by divsi3 and udivsi3.  */
-       P1 = R0;
-       P2 = R1;
-        CALL ___divsi3;
-       R1 = P1;
-       R2 = P2;
+       [--SP] = RETS;
+       [--SP] = R0;
+       [--SP] = R1;
+       CALL ___divsi3;
+       R2 = [SP++];
+       R1 = [SP++];
        R2 *= R0;
        R0 = R1 - R2;
        RETS = [SP++];
-        RTS; 
+       RTS; 
 #endif
 
 #ifdef L_udivsi3