From 5f643b6f49f66ff4d6f18ff374d0418a5f36c3d0 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Thu, 28 Sep 2017 20:14:27 +0200 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/i386.c | 9 ++++----- 2 files changed, 9 insertions(+), 5 deletions(-) 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) -- 2.30.2