aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Sandiford <richard@codesourcery.com>2007-01-19 13:40:54 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2007-01-19 13:40:54 +0000
commitf6ab62e8ead1cb8abd0ad3987d61594ac3812116 (patch)
tree7f9e1fefb9454821f796165cf79779e9f759df7b /gcc
parentfe0cc7765429f8fe22005638c7d42f550e309ea4 (diff)
downloadgcc-f6ab62e8ead1cb8abd0ad3987d61594ac3812116.zip
gcc-f6ab62e8ead1cb8abd0ad3987d61594ac3812116.tar.gz
gcc-f6ab62e8ead1cb8abd0ad3987d61594ac3812116.tar.bz2
m68k.c (notice_update_cc): If an SFmode move is implemented using move.l...
gcc/ * config/m68k/m68k.c (notice_update_cc): If an SFmode move is implemented using move.l, do not use its cc result for floating-point comparisons. From-SVN: r120962
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/m68k/m68k.c10
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4b62eb4..bfe2438 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2007-01-19 Richard Sandiford <richard@codesourcery.com>
+ * config/m68k/m68k.c (notice_update_cc): If an SFmode move is
+ implemented using move.l, do not use its cc result for floating-point
+ comparisons.
+
+2007-01-19 Richard Sandiford <richard@codesourcery.com>
+
* config/m68k/m68k.h (EXTRA_CONSTRAINT): Stop the 'T' constraint
from accepting 's' constraints if flag_pic.
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index caa90cd..78aae6d 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -2834,12 +2834,18 @@ notice_update_cc (rtx exp, rtx insn)
if (cc_status.value2 && modified_in_p (cc_status.value2, insn))
cc_status.value2 = 0;
}
+ /* fmoves to memory or data registers do not set the condition
+ codes. Normal moves _do_ set the condition codes, but not in
+ a way that is appropriate for comparison with 0, because -0.0
+ would be treated as a negative nonzero number. Note that it
+ isn't appropriate to conditionalize this restiction on
+ HONOR_SIGNED_ZEROS because that macro merely indicates whether
+ we care about the difference between -0.0 and +0.0. */
else if (!FP_REG_P (SET_DEST (exp))
&& SET_DEST (exp) != cc0_rtx
&& (FP_REG_P (SET_SRC (exp))
|| GET_CODE (SET_SRC (exp)) == FIX
- || GET_CODE (SET_SRC (exp)) == FLOAT_TRUNCATE
- || GET_CODE (SET_SRC (exp)) == FLOAT_EXTEND))
+ || FLOAT_MODE_P (GET_MODE (SET_DEST (exp)))))
CC_STATUS_INIT;
/* A pair of move insns doesn't produce a useful overall cc. */
else if (!FP_REG_P (SET_DEST (exp))