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]

[PATCH,picochip] Change of load effective address pattern


Hi all,
The attached patch changes the lea_add and lea_move patterns. lea_add is now allowed to use nonimmediate operands with reg constraint. Reload works properly with this one. The "b" constraint has been removed from lea_move and constraints.md.


Committed.

Regards
Hari

Changelog:

2009-02-16 Hariharan Sandanagobalane <hariharan@picochip.com>

        * config/picochip/picochip.md (lea_add): Allow any nonimmediate
        in the lea_add. Reload eventually constraints it properly.
        * config/picochip/constraints.md : Remove the target constraint
        "b", since it is not needed anymore.


Patch:


Index: gcc/config/picochip/constraints.md
===================================================================
--- gcc/config/picochip/constraints.md  (revision 144156)
+++ gcc/config/picochip/constraints.md  (working copy)
@@ -55,10 +55,6 @@
   (and (match_code "mem")
        (match_test "picochip_absolute_memory_operand(op,mode) == 1")))

-(define_constraint "b"
- "See if this is an address in memory, non-strict version"
-  (match_test "picochip_legitimate_address_p(mode,op,0) == 1"))
-
 (define_register_constraint "k" "FRAME_REGS"
   "Frame regs")
 (define_register_constraint "f" "PTR_REGS"
Index: gcc/config/picochip/picochip.md
===================================================================
--- gcc/config/picochip/picochip.md     (revision 144156)
+++ gcc/config/picochip/picochip.md     (working copy)
@@ -1154,7 +1154,7 @@
 ;; ALU 1 where it cannot modify CC.

 (define_insn "*lea_add"
- [(set (match_operand:HI 0 "register_operand" "=r")
+ [(set (match_operand:HI 0 "nonimmediate_operand" "=r")
        (plus:HI (match_operand:HI 1 "register_operand" "r")
                (match_operand:HI 2 "immediate_operand" "i")))]
  ""
@@ -1164,8 +1164,8 @@
 ;; "p" constraint cannot be specified for operands other than
 ;; address_operand, hence the extra pattern below.
 (define_insn "*lea_move"
-  [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r")
-        (match_operand:HI 1 "address_operand" "p,b"))]
+  [(set (match_operand:HI 0 "nonimmediate_operand" "=r")
+        (match_operand:HI 1 "address_operand" "p"))]
   ""
   {
     if (REG == GET_CODE(operands[1]))


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