]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386.c (ix86_zero_extend_to_Pmode): Rewrite using convert_to_mode.
authorUros Bizjak <uros@gcc.gnu.org>
Sun, 11 Mar 2012 18:19:05 +0000 (19:19 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Sun, 11 Mar 2012 18:19:05 +0000 (19:19 +0100)
* config/i386/i386.c (ix86_zero_extend_to_Pmode): Rewrite using
convert_to_mode.

From-SVN: r185198

gcc/ChangeLog
gcc/config/i386/i386.c

index a3b135108213bbbb143d88269051e060a4199e97..05df3c84faddd163e97a9456fcf610d0129b5c01 100644 (file)
@@ -1,3 +1,8 @@
+2012-03-11  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/i386.c (ix86_zero_extend_to_Pmode): Rewrite using
+       convert_to_mode.
+
 2012-03-11  H.J. Lu  <hongjiu.lu@intel.com>
 
        * config/i386/i386.c (ix86_trampoline_init): Use movl for 64bit if
@@ -5,8 +10,7 @@
 
 2012-03-11  H.J. Lu  <hongjiu.lu@intel.com>
 
-       * config/i386/i386.c (x86_this_parameter): Replace DImode with
-       Pmode.
+       * config/i386/i386.c (x86_this_parameter): Replace DImode with Pmode.
 
 2012-03-11  H.J. Lu  <hongjiu.lu@intel.com>
 
index f74914fbe405eb8b97db615bacb2c832565c31a2..cf4d1f61ed8c097a1ddbacf52a3af7665305bbda 100644 (file)
@@ -21025,14 +21025,9 @@ ix86_adjust_counter (rtx countreg, HOST_WIDE_INT value)
 rtx
 ix86_zero_extend_to_Pmode (rtx exp)
 {
-  rtx r;
-  if (GET_MODE (exp) == VOIDmode)
-    return force_reg (Pmode, exp);
-  if (GET_MODE (exp) == Pmode)
-    return copy_to_mode_reg (Pmode, exp);
-  r = gen_reg_rtx (Pmode);
-  emit_insn (gen_zero_extendsidi2 (r, exp));
-  return r;
+  if (GET_MODE (exp) != Pmode)
+    exp = convert_to_mode (Pmode, exp, 1);
+  return force_reg (Pmode, exp);
 }
 
 /* Divide COUNTREG by SCALE.  */