From: Uros Bizjak Date: Thu, 28 Sep 2017 18:14:27 +0000 (+0200) Subject: i386.c (ix86_print_operand_address_as): Do not check index when encoding %esp as... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5f643b6f49f66ff4d6f18ff374d0418a5f36c3d0;p=gcc.git i386.c (ix86_print_operand_address_as): Do not check index when encoding %esp as %rsp to avoid 0x67 prefix. * config/i386/i386.c (ix86_print_operand_address_as): Do not check index when encoding %esp as %rsp to avoid 0x67 prefix. From-SVN: r253260 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c8b67cdf2f9..2802cdf7511 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-09-28 Uros Bizjak + + * config/i386/i386.c (ix86_print_operand_address_as): Do not check + index when encoding %esp as %rsp to avoid 0x67 prefix. + 2017-09-28 Sergey Shalnov * config/i386/i386.md (*movsf_internal, *movdf_internal): diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 63db7ac2b5f..e282546c708 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -19953,12 +19953,11 @@ ix86_print_operand_address_as (FILE *file, rtx addr, code = 'k'; } - /* Since the upper 32 bits of RSP are always zero for x32, we can - encode %esp as %rsp to avoid 0x67 prefix if there is no index or - base register. */ + /* Since the upper 32 bits of RSP are always zero for x32, + we can encode %esp as %rsp to avoid 0x67 prefix if + there is no index register. */ if (TARGET_X32 && Pmode == SImode - && ((!index && base && REG_P (base) && REGNO (base) == SP_REG) - || (!base && index && REGNO (index) == SP_REG))) + && !index && base && REG_P (base) && REGNO (base) == SP_REG) code = 'q'; if (ASSEMBLER_DIALECT == ASM_ATT)