neon.md (*neon_mov<mode>): Reject two non-register operands.
authorDaniel Jacobowitz <dan@codesourcery.com>
Wed, 11 Nov 2009 14:22:21 +0000 (14:22 +0000)
committerDaniel Jacobowitz <drow@gcc.gnu.org>
Wed, 11 Nov 2009 14:22:21 +0000 (14:22 +0000)
* 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.

From-SVN: r154093

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

index 2af043fb271a8649dccb0d027f6c3e31c6ba3720..d92359c1a26864d0f900fdd221c77c127147d4d8 100644 (file)
@@ -1,3 +1,10 @@
+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
index 7d1ef11133939cdc6f24e373f1c69085304b722a..ac1e9d4862fc25f87ba621ccdb99fe1ae3351c7b 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 858d381eed0adab5adedd7ba706599ea05cf4842..a01efb44da6d86bb21352f3020b7a70e24777c36 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