This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[x32] PATCH: PR target/47537: [x32] internal compiler error: in copy_to_mode_reg, at explow.c:635
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 29 Jan 2011 14:37:35 -0800
- Subject: [x32] PATCH: PR target/47537: [x32] internal compiler error: in copy_to_mode_reg, at explow.c:635
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
I checked this patch into x32 branch.
H.J.
---
commit 30c15b37df663f4119332519700b0416ae92b973
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Sat Jan 29 14:34:53 2011 -0800
Convert to Pmode if needed in ix86_expand_special_args_builtin.
diff --git a/gcc/ChangeLog.x32 b/gcc/ChangeLog.x32
index ef65e7b..41bfe18 100644
--- a/gcc/ChangeLog.x32
+++ b/gcc/ChangeLog.x32
@@ -1,3 +1,9 @@
+2011-01-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/47537
+ * config/i386/i386.c (ix86_expand_special_args_builtin): Convert
+ to Pmode if needed.
+
2011-01-27 H.J. Lu <hongjiu.lu@intel.com>
PR rtl-optimization/47502
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index d53e444..642d49f 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -27040,6 +27040,8 @@ ix86_expand_special_args_builtin (const struct builtin_description *d,
if (i == memory)
{
/* This must be the memory operand. */
+ if (GET_MODE (op) != Pmode)
+ op = convert_to_mode (Pmode, op, 1);
op = gen_rtx_MEM (mode, copy_to_mode_reg (Pmode, op));
gcc_assert (GET_MODE (op) == mode
|| GET_MODE (op) == VOIDmode);