diff mbox

[02/10] addr32: Only handle zero-extended DImode addresses

Message ID CAMe9rOoHiEhGn9fTB2yJuM05kB6_dfb7oNbPuBEP9C_y=O-oew@mail.gmail.com
State New
Headers show

Commit Message

H.J. Lu March 9, 2012, 3:26 p.m. UTC
On Thu, Mar 8, 2012 at 7:20 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Sun, Mar 4, 2012 at 9:13 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
>
>>> We only need to handle zero-extended addresses in DImode.
>>> OK for trunk?
>>
>>> 2012-03-02  H.J. Lu  <hongjiu.lu@intel.com>
>>>
>>>        * config/i386/i386.c (ix86_print_operand_address): Only handle
>>>        zero-extended DImode addresses.
>>
>> OK.
>
> The patch was reverted due to PR target/52530.
>

Revert breaks Pmode == SImode for x32.  Here is a different patch.
It checks Pmode == DImode instead of TARGET_64BIT.  Tested on
Linux/x32.  OK for trunk?

Thanks.
diff mbox

Patch

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'