This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH ARM] Fix eabi floating point comparison regression
- From: Richard Earnshaw <Richard dot Earnshaw at buzzard dot freeserve dot co dot uk>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Richard dot Earnshaw at buzzard dot freeserve dot co dot uk, drow at false dot org
- Date: Sun, 12 Jun 2005 09:35:51 +0100
- Subject: [PATCH ARM] Fix eabi floating point comparison regression
Daniel's recent change to the ARM RETLDM macro in the assembler support
functions caused a regression on arm-eabi builds because the prologue code
had not been adjusted to compensate for the change. This patch fixes that
and hence all the testsuite failures associate with it (a lot).
2005-06-12 Richard Earnshaw <richard.earnshaw@arm.com>
* arm/ieee754-df.s (aeabi_dcmpeq, aeabi_dcmplt, aeabi_dcmple)
(aeabi_dcmpge, aeabi_dcmpgt): Maintain 8-byte stack alignment.
* arm/ieee754-sf.s (aeabi_l2f, aeabi_fcmpeq, aeabi_fcmplt)
(aeabi_fcmple, aeabi_fcmpge, aeabi_fcmpgt): Likewise.
Index: ieee754-df.S
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/ieee754-df.S,v
retrieving revision 1.11
diff -p -p -r1.11 ieee754-df.S
*** ieee754-df.S 9 May 2005 16:26:22 -0000 1.11
--- ieee754-df.S 12 Jun 2005 08:27:26 -0000
*************** ARM_FUNC_ALIAS aeabi_cdcmple aeabi_cdcmp
*** 1115,1121 ****
ARM_FUNC_START aeabi_dcmpeq
! str lr, [sp, #-4]!
ARM_CALL aeabi_cdcmple
moveq r0, #1 @ Equal to.
movne r0, #0 @ Less than, greater than, or unordered.
--- 1115,1121 ----
ARM_FUNC_START aeabi_dcmpeq
! str lr, [sp, #-8]!
ARM_CALL aeabi_cdcmple
moveq r0, #1 @ Equal to.
movne r0, #0 @ Less than, greater than, or unordered.
*************** ARM_FUNC_START aeabi_dcmpeq
*** 1125,1131 ****
ARM_FUNC_START aeabi_dcmplt
! str lr, [sp, #-4]!
ARM_CALL aeabi_cdcmple
movcc r0, #1 @ Less than.
movcs r0, #0 @ Equal to, greater than, or unordered.
--- 1125,1131 ----
ARM_FUNC_START aeabi_dcmplt
! str lr, [sp, #-8]!
ARM_CALL aeabi_cdcmple
movcc r0, #1 @ Less than.
movcs r0, #0 @ Equal to, greater than, or unordered.
*************** ARM_FUNC_START aeabi_dcmplt
*** 1135,1141 ****
ARM_FUNC_START aeabi_dcmple
! str lr, [sp, #-4]!
ARM_CALL aeabi_cdcmple
movls r0, #1 @ Less than or equal to.
movhi r0, #0 @ Greater than or unordered.
--- 1135,1141 ----
ARM_FUNC_START aeabi_dcmple
! str lr, [sp, #-8]!
ARM_CALL aeabi_cdcmple
movls r0, #1 @ Less than or equal to.
movhi r0, #0 @ Greater than or unordered.
*************** ARM_FUNC_START aeabi_dcmple
*** 1145,1151 ****
ARM_FUNC_START aeabi_dcmpge
! str lr, [sp, #-4]!
ARM_CALL aeabi_cdrcmple
movls r0, #1 @ Operand 2 is less than or equal to operand 1.
movhi r0, #0 @ Operand 2 greater than operand 1, or unordered.
--- 1145,1151 ----
ARM_FUNC_START aeabi_dcmpge
! str lr, [sp, #-8]!
ARM_CALL aeabi_cdrcmple
movls r0, #1 @ Operand 2 is less than or equal to operand 1.
movhi r0, #0 @ Operand 2 greater than operand 1, or unordered.
*************** ARM_FUNC_START aeabi_dcmpge
*** 1155,1161 ****
ARM_FUNC_START aeabi_dcmpgt
! str lr, [sp, #-4]!
ARM_CALL aeabi_cdrcmple
movcc r0, #1 @ Operand 2 is less than operand 1.
movcs r0, #0 @ Operand 2 is greater than or equal to operand 1,
--- 1155,1161 ----
ARM_FUNC_START aeabi_dcmpgt
! str lr, [sp, #-8]!
ARM_CALL aeabi_cdrcmple
movcc r0, #1 @ Operand 2 is less than operand 1.
movcs r0, #0 @ Operand 2 is greater than or equal to operand 1,
Index: ieee754-sf.S
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/ieee754-sf.S,v
retrieving revision 1.11
diff -p -p -r1.11 ieee754-sf.S
*** ieee754-sf.S 9 May 2005 16:26:23 -0000 1.11
--- ieee754-sf.S 12 Jun 2005 08:27:26 -0000
*************** ARM_FUNC_ALIAS aeabi_l2f floatdisf
*** 327,333 ****
@ For hard FPA code we want to return via the tail below so that
@ we can return the result in f0 as well as in r0 for backwards
@ compatibility.
! str lr, [sp, #-4]!
adr lr, LSYM(f0_ret)
#endif
--- 327,333 ----
@ For hard FPA code we want to return via the tail below so that
@ we can return the result in f0 as well as in r0 for backwards
@ compatibility.
! str lr, [sp, #-8]!
adr lr, LSYM(f0_ret)
#endif
*************** ARM_FUNC_ALIAS aeabi_cfcmple aeabi_cfcmp
*** 821,827 ****
ARM_FUNC_START aeabi_fcmpeq
! str lr, [sp, #-4]!
ARM_CALL aeabi_cfcmple
moveq r0, #1 @ Equal to.
movne r0, #0 @ Less than, greater than, or unordered.
--- 821,827 ----
ARM_FUNC_START aeabi_fcmpeq
! str lr, [sp, #-8]!
ARM_CALL aeabi_cfcmple
moveq r0, #1 @ Equal to.
movne r0, #0 @ Less than, greater than, or unordered.
*************** ARM_FUNC_START aeabi_fcmpeq
*** 831,837 ****
ARM_FUNC_START aeabi_fcmplt
! str lr, [sp, #-4]!
ARM_CALL aeabi_cfcmple
movcc r0, #1 @ Less than.
movcs r0, #0 @ Equal to, greater than, or unordered.
--- 831,837 ----
ARM_FUNC_START aeabi_fcmplt
! str lr, [sp, #-8]!
ARM_CALL aeabi_cfcmple
movcc r0, #1 @ Less than.
movcs r0, #0 @ Equal to, greater than, or unordered.
*************** ARM_FUNC_START aeabi_fcmplt
*** 841,847 ****
ARM_FUNC_START aeabi_fcmple
! str lr, [sp, #-4]!
ARM_CALL aeabi_cfcmple
movls r0, #1 @ Less than or equal to.
movhi r0, #0 @ Greater than or unordered.
--- 841,847 ----
ARM_FUNC_START aeabi_fcmple
! str lr, [sp, #-8]!
ARM_CALL aeabi_cfcmple
movls r0, #1 @ Less than or equal to.
movhi r0, #0 @ Greater than or unordered.
*************** ARM_FUNC_START aeabi_fcmple
*** 851,857 ****
ARM_FUNC_START aeabi_fcmpge
! str lr, [sp, #-4]!
ARM_CALL aeabi_cfrcmple
movls r0, #1 @ Operand 2 is less than or equal to operand 1.
movhi r0, #0 @ Operand 2 greater than operand 1, or unordered.
--- 851,857 ----
ARM_FUNC_START aeabi_fcmpge
! str lr, [sp, #-8]!
ARM_CALL aeabi_cfrcmple
movls r0, #1 @ Operand 2 is less than or equal to operand 1.
movhi r0, #0 @ Operand 2 greater than operand 1, or unordered.
*************** ARM_FUNC_START aeabi_fcmpge
*** 861,867 ****
ARM_FUNC_START aeabi_fcmpgt
! str lr, [sp, #-4]!
ARM_CALL aeabi_cfrcmple
movcc r0, #1 @ Operand 2 is less than operand 1.
movcs r0, #0 @ Operand 2 is greater than or equal to operand 1,
--- 861,867 ----
ARM_FUNC_START aeabi_fcmpgt
! str lr, [sp, #-8]!
ARM_CALL aeabi_cfrcmple
movcc r0, #1 @ Operand 2 is less than operand 1.
movcs r0, #0 @ Operand 2 is greater than or equal to operand 1,