aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2017-09-26 15:59:18 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2017-09-26 15:59:18 +0200
commit343cb5897c673cb75233f4d0a991c0bec11c1f53 (patch)
tree43231805b3914f6ffa1f133e776d1b3872317670 /gcc/config
parentcaab37632257b7b002da791d6372ab9136e0d54f (diff)
downloadgcc-343cb5897c673cb75233f4d0a991c0bec11c1f53.zip
gcc-343cb5897c673cb75233f4d0a991c0bec11c1f53.tar.gz
gcc-343cb5897c673cb75233f4d0a991c0bec11c1f53.tar.bz2
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
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/i386.c2
1 files changed, 1 insertions, 1 deletions
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';