Commit b89f8e3c by Julian Brown Committed by Julian Brown

ieee754-df.S (cmpdf2): Avoid writing below SP.

	gcc/
	* config/arm/ieee754-df.S (cmpdf2): Avoid writing below SP.
	* config/arm/ieee754-sf.S (cmpsf2): Likewise.

From-SVN: r148210
parent 56faec5e
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> 2009-06-05 Richard Guenther <rguenther@suse.de>
PR bootstrap/40350 PR bootstrap/40350
......
...@@ -1117,7 +1117,7 @@ ARM_FUNC_ALIAS nedf2 cmpdf2 ...@@ -1117,7 +1117,7 @@ ARM_FUNC_ALIAS nedf2 cmpdf2
ARM_FUNC_ALIAS eqdf2 cmpdf2 ARM_FUNC_ALIAS eqdf2 cmpdf2
mov ip, #1 @ how should we specify unordered here? mov ip, #1 @ how should we specify unordered here?
1: str ip, [sp, #-4] 1: str ip, [sp, #-4]!
@ Trap any INF/NAN first. @ Trap any INF/NAN first.
mov ip, xh, lsl #1 mov ip, xh, lsl #1
...@@ -1129,7 +1129,8 @@ ARM_FUNC_ALIAS eqdf2 cmpdf2 ...@@ -1129,7 +1129,8 @@ ARM_FUNC_ALIAS eqdf2 cmpdf2
@ Test for equality. @ Test for equality.
@ Note that 0.0 is equal to -0.0. @ 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 do_it eq, e
COND(orr,s,eq) ip, yl, yh, lsl #1 @ and y == 0.0 or -0.0 COND(orr,s,eq) ip, yl, yh, lsl #1 @ and y == 0.0 or -0.0
teqne xh, yh @ or xh == yh teqne xh, yh @ or xh == yh
...@@ -1168,7 +1169,7 @@ ARM_FUNC_ALIAS eqdf2 cmpdf2 ...@@ -1168,7 +1169,7 @@ ARM_FUNC_ALIAS eqdf2 cmpdf2
bne 2b bne 2b
orrs ip, yl, yh, lsl #12 orrs ip, yl, yh, lsl #12
beq 2b @ y is not NAN beq 2b @ y is not NAN
5: ldr r0, [sp, #-4] @ unordered return code 5: ldr r0, [sp], #4 @ unordered return code
RET RET
FUNC_END gedf2 FUNC_END gedf2
......
...@@ -822,7 +822,7 @@ ARM_FUNC_ALIAS nesf2 cmpsf2 ...@@ -822,7 +822,7 @@ ARM_FUNC_ALIAS nesf2 cmpsf2
ARM_FUNC_ALIAS eqsf2 cmpsf2 ARM_FUNC_ALIAS eqsf2 cmpsf2
mov ip, #1 @ how should we specify unordered here? mov ip, #1 @ how should we specify unordered here?
1: str ip, [sp, #-4] 1: str ip, [sp, #-4]!
@ Trap any INF/NAN first. @ Trap any INF/NAN first.
mov r2, r0, lsl #1 mov r2, r0, lsl #1
...@@ -834,7 +834,8 @@ ARM_FUNC_ALIAS eqsf2 cmpsf2 ...@@ -834,7 +834,8 @@ ARM_FUNC_ALIAS eqsf2 cmpsf2
@ Compare values. @ Compare values.
@ Note that 0.0 is equal to -0.0. @ 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 do_it ne
teqne r0, r1 @ if not 0 compare sign teqne r0, r1 @ if not 0 compare sign
do_it pl do_it pl
...@@ -858,7 +859,7 @@ ARM_FUNC_ALIAS eqsf2 cmpsf2 ...@@ -858,7 +859,7 @@ ARM_FUNC_ALIAS eqsf2 cmpsf2
bne 2b bne 2b
movs ip, r1, lsl #9 movs ip, r1, lsl #9
beq 2b @ r1 is not NAN beq 2b @ r1 is not NAN
5: ldr r0, [sp, #-4] @ return unordered code. 5: ldr r0, [sp], #4 @ return unordered code.
RET RET
FUNC_END gesf2 FUNC_END gesf2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment