This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[x32] PATCH: Check SUBREG_REG for parts.index and parts.base
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 6 Mar 2011 11:18:46 -0800
- Subject: [x32] PATCH: Check SUBREG_REG for parts.index and parts.base
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
X32 may use SUBREG_REG in parts.index and parts.base. I checked
this patch into x32 branch.
H.J.
---
commit e2f00cf7ffb008eb4710221853d82fa1b81433e0
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Sun Mar 6 11:14:50 2011 -0800
Check SUBREG_REG for parts.index and parts.base.
diff --git a/gcc/ChangeLog.x32 b/gcc/ChangeLog.x32
index 0fae773..f39563b 100644
--- a/gcc/ChangeLog.x32
+++ b/gcc/ChangeLog.x32
@@ -1,5 +1,10 @@
2011-03-06 H.J. Lu <hongjiu.lu@intel.com>
+ * config/i386/predicates.md (aligned_operand): Check SUBREG_REG
+ for parts.index and parts.base.
+
+2011-03-06 H.J. Lu <hongjiu.lu@intel.com>
+
* config/i386/i386.c (ix86_expand_call): Convert function address
to Pmode if needed.
diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
index 55a04e3..4bd5688 100644
--- a/gcc/config/i386/predicates.md
+++ b/gcc/config/i386/predicates.md
@@ -853,11 +853,15 @@
/* Look for some component that isn't known to be aligned. */
if (parts.index)
{
+ if (GET_CODE (parts.index) == SUBREG)
+ parts.index = SUBREG_REG (parts.index);
if (REGNO_POINTER_ALIGN (REGNO (parts.index)) * parts.scale < 32)
return false;
}
if (parts.base)
{
+ if (GET_CODE (parts.base) == SUBREG)
+ parts.base = SUBREG_REG (parts.base);
if (REGNO_POINTER_ALIGN (REGNO (parts.base)) < 32)
return false;
}