diff mbox

[x32] PATCH: PR target/47537: [x32] internal compiler error: in copy_to_mode_reg, at explow.c:635

Message ID 20110129223735.GA1464@intel.com
State New
Headers show

Commit Message

H.J. Lu Jan. 29, 2011, 10:37 p.m. UTC
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 mbox

Patch

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);