This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Re: splitting special case in scan_one_insn? (regclass)


Steven Bosscher wrote:
On 4/22/07, Eric Christopher <echristo@apple.com> wrote:
>
> Eric also posted a similar patch a long time ago (see
> http://gcc.gnu.org/ml/gcc-patches/2004-05/msg00213.html).  I
> decided to
> steal his ChangeLog entry ;-)
>

Should probably steal the rest of the patch too. "pass" is now unused
afaict. :)

Yes, what Richi tested for me had ATTRIBUTE_UNUSED on pass, which is what I have tested in my local tree too.

Unfortunately, this is needed by m68k which explains why I hadn't committed the patch. You need a lot of changes like this one as far as I understand:


@@ -1923,12 +1923,25 @@
   return "sub%.l %2,%3\;subx%.l %2,%0";
 })
-(define_insn "adddi_sexthishl32"
+(define_expand "adddi_sexthishl32"
+  [(set (match_operand:DI 0 "nonimmediate_operand" "")
+    (plus:DI (ashift:DI (sign_extend:DI
+          (match_operand:HI 1 "general_operand" ""))
+            (const_int 32))
+        (match_operand:DI 2 "general_operand" "")))
+   (clobber (match_scratch:SI 3 "=&d,X,a,?d"))]
+  "!TARGET_COLDFIRE"
+{
+  if (!nonimmediate_operand (operands[2], DImode))
+    operands[2] = force_reg (DImode, operands[2]);
+})
+
+(define_insn "*adddi_sexthishl32"
   [(set (match_operand:DI 0 "nonimmediate_operand" "=o,a,*d,*d")
     (plus:DI (ashift:DI (sign_extend:DI
           (match_operand:HI 1 "general_operand" "rm,rm,rm,rm"))
             (const_int 32))
-        (match_operand:DI 2 "general_operand" "0,0,0,0")))
+        (match_operand:DI 2 "nonimmediate_operand" "0,0,0,0")))
    (clobber (match_scratch:SI 3 "=&d,X,a,?d"))]
   "!TARGET_COLDFIRE"
 {

Note that the predicate of the "0,0,0,0" constraint is now the same as the predicate of operand 0.

Paolo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]