]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/15084 (-O/-O2 generate wrong code on structure modification)
authorH.J. Lu <hongjiu.lu@intel.com>
Wed, 28 Apr 2004 17:00:03 +0000 (17:00 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Wed, 28 Apr 2004 17:00:03 +0000 (10:00 -0700)
2004-04-28  H.J. Lu  <hongjiu.lu@intel.com>

PR target/15084
* config/i386/i386.md (*movsi_insv_1_rex64): Changed to DImode
and renamed to movdi_insv_1_rex64.
(insv): Support SImode for 32bit and DImode for 64bit.

From-SVN: r81254

gcc/ChangeLog
gcc/config/i386/i386.md

index f8e5f32154d9894bf9b8bac3b1b00fc3c887f4aa..d0d9931992d3eab96b09d2579711ceb6ed1a4c5c 100644 (file)
@@ -1,3 +1,10 @@
+2004-04-28  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR target/15084
+       * config/i386/i386.md (*movsi_insv_1_rex64): Changed to DImode
+       and renamed to movdi_insv_1_rex64.
+       (insv): Support SImode for 32bit and DImode for 64bit.
+
 2004-04-24  Richard Henderson  <rth@redhat.com>
 
        PR bootstrap/14671
index 6c4e7f0be1edb2ba6831e22d3b2e931660552ab2..0130b1209702d05ae9c6ee300a1a6274ec2b4db6 100644 (file)
   [(set_attr "type" "imov")
    (set_attr "mode" "QI")])
 
-(define_insn "*movsi_insv_1_rex64"
-  [(set (zero_extract:SI (match_operand 0 "ext_register_operand" "+Q")
+(define_insn "movdi_insv_1_rex64"
+  [(set (zero_extract:DI (match_operand 0 "ext_register_operand" "+Q")
                         (const_int 8)
                         (const_int 8))
-       (match_operand:SI 1 "nonmemory_operand" "Qn"))]
+       (match_operand:DI 1 "nonmemory_operand" "Qn"))]
   "TARGET_64BIT"
   "mov{b}\t{%b1, %h0|%h0, %b1}"
   [(set_attr "type" "imov")
 })
 
 (define_expand "insv"
-  [(set (zero_extract:SI (match_operand 0 "ext_register_operand" "")
-                        (match_operand:SI 1 "immediate_operand" "")
-                        (match_operand:SI 2 "immediate_operand" ""))
-        (match_operand:SI 3 "register_operand" ""))]
+  [(set (zero_extract (match_operand 0 "ext_register_operand" "")
+                     (match_operand 1 "immediate_operand" "")
+                     (match_operand 2 "immediate_operand" ""))
+        (match_operand 3 "register_operand" ""))]
   ""
 {
   /* Handle extractions from %ah et al.  */
      matches the predicate, so check it again here.  */
   if (! register_operand (operands[0], VOIDmode))
     FAIL;
+
+  if (TARGET_64BIT)
+    emit_insn (gen_movdi_insv_1_rex64 (operands[0], operands[3]));
+  else
+    emit_insn (gen_movsi_insv_1 (operands[0], operands[3]));
+
+  DONE;
 })
 
 ;; %%% bts, btr, btc, bt.