aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/m68k/m68k.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2003-10-29 16:55:15 -0800
committerRichard Henderson <rth@gcc.gnu.org>2003-10-29 16:55:15 -0800
commita126dc3a79761cf5f38bdb84cae67e6c47420105 (patch)
treef5674203f19436b76a704d1cab3d4713389f2f09 /gcc/config/m68k/m68k.c
parent03d1cb6dc60e6386d484bc4ba77a837ce0dffef6 (diff)
downloadgcc-a126dc3a79761cf5f38bdb84cae67e6c47420105.zip
gcc-a126dc3a79761cf5f38bdb84cae67e6c47420105.tar.gz
gcc-a126dc3a79761cf5f38bdb84cae67e6c47420105.tar.bz2
m68k.c (notice_update_cc): Clear cc status for shifts and rotates.
* config/m68k/m68k.c (notice_update_cc): Clear cc status for shifts and rotates. From-SVN: r73073
Diffstat (limited to 'gcc/config/m68k/m68k.c')
-rw-r--r--gcc/config/m68k/m68k.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index 565e41f..ee41fc6 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -2595,12 +2595,17 @@ notice_update_cc (rtx exp, rtx insn)
if (cc_status.value2 != 0)
switch (GET_CODE (cc_status.value2))
{
- case PLUS: case MINUS: case MULT:
- case DIV: case UDIV: case MOD: case UMOD: case NEG:
-#if 0 /* These instructions always clear the overflow bit */
case ASHIFT: case ASHIFTRT: case LSHIFTRT:
case ROTATE: case ROTATERT:
-#endif
+ /* These instructions always clear the overflow bit, and set
+ the carry to the bit shifted out. */
+ /* ??? We don't currently have a way to signal carry not valid,
+ nor do we check for it in the branch insns. */
+ CC_STATUS_INIT;
+ break;
+
+ case PLUS: case MINUS: case MULT:
+ case DIV: case UDIV: case MOD: case UMOD: case NEG:
if (GET_MODE (cc_status.value2) != VOIDmode)
cc_status.flags |= CC_NO_OVERFLOW;
break;