From 343cb5897c673cb75233f4d0a991c0bec11c1f53 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 26 Sep 2017 15:59:18 +0200 Subject: re PR target/82267 (x32: unnecessary address-size prefixes. Why isn't -maddress-mode=long the default?) PR target/82267 * config/i386/i386.c (ix86_print_operand_address_as): Only test REGNO (base) == SP_REG if base is a REG. From-SVN: r253202 --- gcc/config/i386/i386.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/config') diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index d52d1df..63db7ac 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -19957,7 +19957,7 @@ ix86_print_operand_address_as (FILE *file, rtx addr, encode %esp as %rsp to avoid 0x67 prefix if there is no index or base register. */ if (TARGET_X32 && Pmode == SImode - && ((!index && base && REGNO (base) == SP_REG) + && ((!index && base && REG_P (base) && REGNO (base) == SP_REG) || (!base && index && REGNO (index) == SP_REG))) code = 'q'; -- cgit v1.1