http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52530

--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> 2012-03-09 15:17:07 
UTC ---
This patch works for me:

---
diff --git a/gcc/ChangeLog.addr32 b/gcc/ChangeLog.addr32
index 066f1ec..a191e47 100644
--- a/gcc/ChangeLog.addr32
+++ b/gcc/ChangeLog.addr32
@@ -1,3 +1,8 @@
+2012-03-08  H.J. Lu  <hongjiu...@intel.com>
+
+    * config/i386/i386.c (ix86_print_operand_address): Only handle
+    zero-extended DImode addresses if Pmode == DImode.
+
 2012-03-06  Uros Bizjak  <ubiz...@gmail.com>

     * config/i386/i386.md (*zero_extendsidi2_rex64): Allow loading
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 69cb6ae..c2cad5a 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -14548,7 +14548,7 @@ ix86_print_operand_address (FILE *file, rtx addr)

       /* Print SImode registers for zero-extended addresses to force
      addr32 prefix.  Otherwise print DImode registers to avoid it.  */
-      if (TARGET_64BIT)
+      if (Pmode == DImode)
     code = ((GET_CODE (addr) == ZERO_EXTEND
          || GET_CODE (addr) == AND)
         ? 'l'
--

Reply via email to