(movstrsi): Rewrite to handle operands correctly.
authorJames Van Artsdalen <jrv@gnu.org>
Fri, 28 Aug 1992 06:24:41 +0000 (06:24 +0000)
committerJames Van Artsdalen <jrv@gnu.org>
Fri, 28 Aug 1992 06:24:41 +0000 (06:24 +0000)
From-SVN: r1984

gcc/config/i386/i386.md

index f6b031cdf353f4629e54a2d2b10461b50856e5c6..e2121260747b70f4af1da72a578ef3d7dd745b36 100644 (file)
   "nop")
 
 (define_expand "movstrsi"
-  [(parallel [(set (mem:BLK (match_operand:BLK 0 "address_operand" ""))
-                  (mem:BLK (match_operand:BLK 1 "address_operand" "")))
+  [(parallel [(set (match_operand:BLK 0 "memory_operand" "")
+                  (match_operand:BLK 1 "memory_operand" ""))
              (use (match_operand:SI 2 "const_int_operand" ""))
              (use (match_operand:SI 3 "const_int_operand" ""))
              (clobber (match_scratch:SI 4 ""))
-             (clobber (match_dup 0))
-             (clobber (match_dup 1))])]
+             (clobber (match_dup 5))
+             (clobber (match_dup 6))])]
   ""
   "
 {
+  rtx addr0, addr1;
+
   if (GET_CODE (operands[2]) != CONST_INT)
     FAIL;
-  operands[0] = copy_to_mode_reg (SImode, XEXP (operands[0], 0));
-  operands[1] = copy_to_mode_reg (SImode, XEXP (operands[1], 0));
+
+  addr0 = copy_to_mode_reg (Pmode, XEXP (operands[0], 0));
+  addr1 = copy_to_mode_reg (Pmode, XEXP (operands[1], 0));
+
+  operands[5] = addr0;
+  operands[6] = addr1;
+
+  operands[0] = gen_rtx (MEM, BLKmode, addr0);
+  operands[1] = gen_rtx (MEM, BLKmode, addr1);
 }")
 
 ;; It might seem that operands 0 & 1 could use predicate register_operand.