http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48690

--- Comment #12 from diggskevin38 at gmail dot com 2011-04-20 21:49:36 UTC ---
Then again I suppose it could be in here:

 (define_insn "extendsidi2"
-  [(set (match_operand:DI 0 "nonimmediate_operand" "=d")
-       (sign_extend:DI
-        (match_operand:SI 1 "general_operand" "rm")))]
+  [(set (match_operand:DI 0 "register_operand" "=d")
+       (sign_extend:DI (match_operand:SI 1 "nonimmediate_src_operand" "rm")))]
   ""
 {
   CC_STATUS_INIT;
-  operands[2] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1);
   if (TARGET_68020 || TARGET_COLDFIRE)
-    return "move%.l %1,%2\;smi %0\;extb%.l %0";
+    return "move%.l %1,%R0\;smi %0\;extb%.l %0";
+  else
+    return "move%.l %1,%R0\;smi %0\;ext%.w %0\;ext%.l %0";
+})
+
+(define_insn "*extendsidi2_mem"
+  [(set (match_operand:DI 0 "memory_operand" "=o,<")
+       (sign_extend:DI (match_operand:SI 1 "nonimmediate_src_operand"
"rm,rm")))
+   (clobber (match_scratch:SI 2 "=d,d"))]
+   ""
+{
+  CC_STATUS_INIT;
+  operands[3] = adjust_address (operands[0], SImode,
+                               which_alternative == 0 ? 4 : 0);
+  operands[0] = adjust_address (operands[0], SImode, 0);
+  if (TARGET_68020 || TARGET_COLDFIRE)
+    return "move%.l %1,%3\;smi %2\;extb%.l %2\;move%.l %2,%0";
   else
-    return "move%.l %1,%2\;smi %0\;ext%.w %0\;ext%.l %0";
+    return "move%.l %1,%3\;smi %2\;ext%.w %2\;ext%.l %2\;move%.l %2,%0";
 })

Reply via email to