summaryrefslogtreecommitdiff
path: root/gcc/config/m68k
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-30 00:55:15 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-30 00:55:15 +0000
commit64b70d26ad7a49b6b0eaedafea75472807ba6ab4 (patch)
treef5674203f19436b76a704d1cab3d4713389f2f09 /gcc/config/m68k
parent5fafc2b1c04fa05b557fdd8a22fc089df9d82231 (diff)
downloadgcc-64b70d26ad7a49b6b0eaedafea75472807ba6ab4.tar.gz
* config/m68k/m68k.c (notice_update_cc): Clear cc status for
shifts and rotates. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73073 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/m68k')
-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 565e41ff7cd..ee41fc67d2f 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;