OSDN Git Service

* config/arm/neon.md (*neon_mov<mode>): Reject two non-register
authordrow <drow@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 11 Nov 2009 14:22:21 +0000 (14:22 +0000)
committerdrow <drow@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 11 Nov 2009 14:22:21 +0000 (14:22 +0000)
operands.
(movti, mov<mode>): Call force_reg on one operand if required.
* config/arm/vec-common.md (mov<mode>): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154093 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/arm/neon.md
gcc/config/arm/vec-common.md

index 2af043f..d92359c 100644 (file)
@@ -1,5 +1,12 @@
 2009-11-11  Daniel Jacobowitz  <dan@codesourcery.com>
 
+       * config/arm/neon.md (*neon_mov<mode>): Reject two non-register
+       operands.
+       (movti, mov<mode>): Call force_reg on one operand if required.
+       * config/arm/vec-common.md (mov<mode>): Likewise.
+
+2009-11-11  Daniel Jacobowitz  <dan@codesourcery.com>
+
        * config/arm/arm.c (arm_override_options): Enable scheduling for
        Thumb-2.
 
index 7d1ef11..ac1e9d4 100644 (file)
          "=w,Uv,w, w,  ?r,?w,?r,?r, ?Us")
        (match_operand:VD 1 "general_operand"
          " w,w, Dn,Uvi, w, r, r, Usi,r"))]
-  "TARGET_NEON"
+  "TARGET_NEON
+   && (register_operand (operands[0], <MODE>mode)
+       || register_operand (operands[1], <MODE>mode))"
 {
   if (which_alternative == 2)
     {
          "=w,Un,w, w,  ?r,?w,?r,?r,  ?Us")
        (match_operand:VQXMOV 1 "general_operand"
          " w,w, Dn,Uni, w, r, r, Usi, r"))]
-  "TARGET_NEON"
+  "TARGET_NEON
+   && (register_operand (operands[0], <MODE>mode)
+       || register_operand (operands[1], <MODE>mode))"
 {
   if (which_alternative == 2)
     {
        (match_operand:TI 1 "general_operand" ""))]
   "TARGET_NEON"
 {
+  if (can_create_pseudo_p ())
+    {
+      if (GET_CODE (operands[0]) != REG)
+       operands[1] = force_reg (TImode, operands[1]);
+    }
 })
 
 (define_expand "mov<mode>"
        (match_operand:VSTRUCT 1 "general_operand" ""))]
   "TARGET_NEON"
 {
+  if (can_create_pseudo_p ())
+    {
+      if (GET_CODE (operands[0]) != REG)
+       operands[1] = force_reg (<MODE>mode, operands[1]);
+    }
 })
 
 (define_insn "*neon_mov<mode>"
   [(set (match_operand:VSTRUCT 0 "nonimmediate_operand"        "=w,Ut,w")
        (match_operand:VSTRUCT 1 "general_operand"      " w,w, Ut"))]
-  "TARGET_NEON"
+  "TARGET_NEON
+   && (register_operand (operands[0], <MODE>mode)
+       || register_operand (operands[1], <MODE>mode))"
 {
   switch (which_alternative)
     {
index 858d381..a01efb4 100644 (file)
   "TARGET_NEON
    || (TARGET_REALLY_IWMMXT && VALID_IWMMXT_REG_MODE (<MODE>mode))"
 {
+  if (can_create_pseudo_p ())
+    {
+      if (GET_CODE (operands[0]) != REG)
+       operands[1] = force_reg (<MODE>mode, operands[1]);
+    }
 })
 
 ;; Vector arithmetic. Expanders are blank, then unnamed insns implement