m68k: clear cc_status in ashrdi3_const1, lshrdi3_const1

Message ID 87373ulssj.fsf@linux-m68k.org
State New
Headers show
Series
  • m68k: clear cc_status in ashrdi3_const1, lshrdi3_const1
Related show

Commit Message

Andreas Schwab Dec. 28, 2017, 4:29 p.m.
The ashrdi3_const1 and lshrdi3_const1 insns don't produce a useful CC
status.  This fixes the 20_util/to_chars/1.cc test in the libstdc++
testsuite.

Andreas.

	* config/m68k/m68k.md (ashrdi3_const1, lshrdi3_const1): Add
	CC_STATUS_INIT.

-- 
2.15.1


-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

Patch

diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md
index 628e3889bb..a3a0f197db 100644
--- a/gcc/config/m68k/m68k.md
+++ b/gcc/config/m68k/m68k.md
@@ -4683,6 +4683,7 @@ 
   "!TARGET_COLDFIRE"
 {
   operands[1] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1);
+  CC_STATUS_INIT;
   return "asr%.l #1,%0\;roxr%.l #1,%1";
 })
 
@@ -4919,7 +4920,10 @@ 
 	(lshiftrt:DI (match_operand:DI 1 "register_operand" "0")
 		     (const_int 1)))]
   "!TARGET_COLDFIRE"
-  "lsr%.l #1,%0\;roxr%.l #1,%R0")
+{
+  CC_STATUS_INIT;
+  return "lsr%.l #1,%0\;roxr%.l #1,%R0";
+})
 
 (define_split
   [(set (match_operand:DI 0 "register_operand" "")