+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
(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")
(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
(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")
(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.
--- /dev/null
+/* { 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);
+}