This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, ARM] Fix target/30173: addition of 0 to a denormalized DFmode value
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: gcc patches <gcc-patches at gcc dot gnu dot org>
- Cc: Nicolas Pitre <nico at cam dot org>
- Date: Tue, 09 Jan 2007 10:28:56 +0000
- Subject: [PATCH, ARM] Fix target/30173: addition of 0 to a denormalized DFmode value
This patch fixes a bug when we add 0 to a denormalized DFmode value. In
this case the test for the first operand being 0 was incomplete and
instead of returning the denormalized value we could sometimes return
zero instead. The patch is one proposed by Nicolas Pitre.
Contextual differences means that older branches have a minor change to
the patch file, but the change itself is identical in all cases. The
attached patch is the variant that was applied to trunk.
Tested on an arm-eabi cross and applied to trunk and gcc-4.[012]
branches.
2007-01-09 Nicolas Pitre <nico@cam.org>
PR target/30173
* arm/ieee754-df.S (Lad_s): Also test the low word of X for zero.
*** ieee754-df.S (revision 120620)
--- ieee754-df.S (local)
*************** LSYM(Lad_s):
*** 363,369 ****
beq 1f
@ Result is x + 0.0 = x or 0.0 + y = y.
! teq r4, #0
do_it eq, t
moveq xh, yh
moveq xl, yl
--- 363,369 ----
beq 1f
@ Result is x + 0.0 = x or 0.0 + y = y.
! orrs ip, r4, xl
do_it eq, t
moveq xh, yh
moveq xl, yl