public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [x32] PATCH: Check SUBREG_REG for parts.index and parts.base
@ 2011-03-06 19:18 H.J. Lu
  0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2011-03-06 19:18 UTC (permalink / raw)
  To: gcc-patches

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-03-06 19:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-06 19:18 [x32] PATCH: Check SUBREG_REG for parts.index and parts.base H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).