Commit 0d7afd5d by Andreas Schwab Committed by Andreas Schwab

Fix invalid cc_status after [const_][us]mulsi3_highpart

	* config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
	(smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.

testsuite/:
	* gcc.target/m68k/mulsi_highpart.c: New test.

From-SVN: r262835
parent a7385f1c
2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
* config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
(smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (arc_label_align): Use align_labels instead of
......
......@@ -3240,7 +3240,10 @@
(const_int 32))))
(clobber (match_operand:SI 1 "register_operand" "=d"))]
"TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE"
"mulu%.l %3,%0:%1")
{
CC_STATUS_INIT;
return "mulu%.l %3,%0:%1";
})
(define_insn "const_umulsi3_highpart"
[(set (match_operand:SI 0 "register_operand" "=d")
......@@ -3251,7 +3254,10 @@
(const_int 32))))
(clobber (match_operand:SI 1 "register_operand" "=d"))]
"TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE"
"mulu%.l %3,%0:%1")
{
CC_STATUS_INIT;
return "mulu%.l %3,%0:%1";
})
(define_expand "smulsi3_highpart"
[(parallel
......@@ -3283,7 +3289,10 @@
(const_int 32))))
(clobber (match_operand:SI 1 "register_operand" "=d"))]
"TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE"
"muls%.l %3,%0:%1")
{
CC_STATUS_INIT;
return "muls%.l %3,%0:%1";
})
(define_insn "const_smulsi3_highpart"
[(set (match_operand:SI 0 "register_operand" "=d")
......@@ -3294,7 +3303,10 @@
(const_int 32))))
(clobber (match_operand:SI 1 "register_operand" "=d"))]
"TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE"
"muls%.l %3,%0:%1")
{
CC_STATUS_INIT;
return "muls%.l %3,%0:%1";
})
(define_expand "mul<mode>3"
[(set (match_operand:FP 0 "nonimmediate_operand" "")
......
2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
* gcc.target/m68k/mulsi_highpart.c: New test.
2018-07-17 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/cpp/pr61854-c90.c (foo): Expect a note, rather than error.
......
/* { dg-do compile } */
/* { dg-options "-O2 -m68020" } */
/* Don't optimize away a compare after [us]mulsi_highpart. */
/* { dg-final { scan-assembler {tst\.?l} } } */
int cmp (unsigned int a, unsigned int b)
{
return (a > 0xffffffff / b);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment