aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
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';