aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sandiford <richard@codesourcery.com>2006-08-14 17:08:34 +0000
committerRichard Sandiford <richard@codesourcery.com>2006-08-14 17:08:34 +0000
commitd19110c4a7c69de61e9aafa8d8fd9ca3e34089c8 (patch)
treeec4d64fc282d5402799b58f8710c086c876a95ea
parent487cb5e0cdbb02e1b4a9b1cda26b21f7cbb8322f (diff)
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. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/csl/sourcerygxx-4_1@116130 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--ChangeLog.csl7
-rw-r--r--gcc/config/m68k/m68k.c10
2 files changed, 15 insertions, 2 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl
index caf113042a3..143f24fe55f 100644
--- a/ChangeLog.csl
+++ b/ChangeLog.csl
@@ -1,3 +1,10 @@
+2006-08-14 Richard Sandiford <richard@codesourcery.com>
+
+ 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.
+
2006-08-09 Paul Brook <paul@codesourcery.com>
gcc/
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index d35a2faf262..3dfd61989e7 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -3103,12 +3103,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;
}