OSDN Git Service

gcc/
authorjules <jules@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 5 Jun 2009 13:52:36 +0000 (13:52 +0000)
committerjules <jules@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 5 Jun 2009 13:52:36 +0000 (13:52 +0000)
* config/arm/ieee754-df.S (cmpdf2): Avoid writing below SP.
* config/arm/ieee754-sf.S (cmpsf2): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148210 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/arm/ieee754-df.S
gcc/config/arm/ieee754-sf.S

index ebeaf29..e7731bc 100644 (file)
@@ -1,3 +1,8 @@
+2009-06-05  Julian Brown  <julian@codesourcery.com>
+
+       * config/arm/ieee754-df.S (cmpdf2): Avoid writing below SP.
+       * config/arm/ieee754-sf.S (cmpsf2): Likewise.
+
 2009-06-05  Richard Guenther  <rguenther@suse.de>
 
        PR bootstrap/40350
index 19a6f2c..eb0c386 100644 (file)
@@ -1117,7 +1117,7 @@ ARM_FUNC_ALIAS nedf2 cmpdf2
 ARM_FUNC_ALIAS eqdf2 cmpdf2
        mov     ip, #1                  @ how should we specify unordered here?
 
-1:     str     ip, [sp, #-4]
+1:     str     ip, [sp, #-4]!
 
        @ Trap any INF/NAN first.
        mov     ip, xh, lsl #1
@@ -1129,7 +1129,8 @@ ARM_FUNC_ALIAS eqdf2 cmpdf2
 
        @ Test for equality.
        @ Note that 0.0 is equal to -0.0.
-2:     orrs    ip, xl, xh, lsl #1      @ if x == 0.0 or -0.0
+2:     add     sp, sp, #4
+       orrs    ip, xl, xh, lsl #1      @ if x == 0.0 or -0.0
        do_it   eq, e
        COND(orr,s,eq)  ip, yl, yh, lsl #1      @ and y == 0.0 or -0.0
        teqne   xh, yh                  @ or xh == yh
@@ -1168,7 +1169,7 @@ ARM_FUNC_ALIAS eqdf2 cmpdf2
        bne     2b
        orrs    ip, yl, yh, lsl #12
        beq     2b                      @ y is not NAN
-5:     ldr     r0, [sp, #-4]           @ unordered return code
+5:     ldr     r0, [sp], #4            @ unordered return code
        RET
 
        FUNC_END gedf2
index 38df203..c93f66d 100644 (file)
@@ -822,7 +822,7 @@ ARM_FUNC_ALIAS nesf2 cmpsf2
 ARM_FUNC_ALIAS eqsf2 cmpsf2
        mov     ip, #1                  @ how should we specify unordered here?
 
-1:     str     ip, [sp, #-4]
+1:     str     ip, [sp, #-4]!
 
        @ Trap any INF/NAN first.
        mov     r2, r0, lsl #1
@@ -834,7 +834,8 @@ ARM_FUNC_ALIAS eqsf2 cmpsf2
 
        @ Compare values.
        @ Note that 0.0 is equal to -0.0.
-2:     orrs    ip, r2, r3, lsr #1      @ test if both are 0, clear C flag
+2:     add     sp, sp, #4
+       orrs    ip, r2, r3, lsr #1      @ test if both are 0, clear C flag
        do_it   ne
        teqne   r0, r1                  @ if not 0 compare sign
        do_it   pl
@@ -858,7 +859,7 @@ ARM_FUNC_ALIAS eqsf2 cmpsf2
        bne     2b
        movs    ip, r1, lsl #9
        beq     2b                      @ r1 is not NAN
-5:     ldr     r0, [sp, #-4]           @ return unordered code.
+5:     ldr     r0, [sp], #4            @ return unordered code.
        RET
 
        FUNC_END gesf2