aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/arm/ieee754-df.S7
-rw-r--r--gcc/config/arm/ieee754-sf.S7
3 files changed, 13 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ebeaf29..e7731bc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/arm/ieee754-df.S b/gcc/config/arm/ieee754-df.S
index 19a6f2c..eb0c386 100644
--- a/gcc/config/arm/ieee754-df.S
+++ b/gcc/config/arm/ieee754-df.S
@@ -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
diff --git a/gcc/config/arm/ieee754-sf.S b/gcc/config/arm/ieee754-sf.S
index 38df203..c93f66d 100644
--- a/gcc/config/arm/ieee754-sf.S
+++ b/gcc/config/arm/ieee754-sf.S
@@ -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