(__lrint): Don't access stack below r1.
authordrepper <drepper>
Thu, 7 Sep 2006 13:46:45 +0000 (13:46 +0000)
committerdrepper <drepper>
Thu, 7 Sep 2006 13:46:45 +0000 (13:46 +0000)
sysdeps/powerpc/powerpc32/fpu/s_lrint.S

index 55e9de7..da0a1e5 100644 (file)
 #include <math_ldbl_opt.h>
 
 /* long int[r3] __lrint (double x[fp1])  */
-ENTRY (__lrint)        
+ENTRY (__lrint)
+       stwu    r1,-16(r1)
        fctiw   fp13,fp1
-       stfd    fp13,-8(r1)
+       stfd    fp13,8(r1)
        nop     /* Insure the following load is in a different dispatch group */
        nop     /* to avoid pipe stall on POWER4&5.  */
        nop
-       lwz     r3,-4(r1)       
+       lwz     r3,12(r1)
+       addi    r1,r1,16
        blr
        END (__lrint)