From f69dacdae5eb000affc509e9ef93c01690231a5e Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Wed, 11 Jan 2017 22:53:45 +0100 Subject: [PATCH] i386.c (memory_address_length): Increase len only when rip_relative_addr_p returns false. * config/i386/i386.c (memory_address_length): Increase len only when rip_relative_addr_p returns false. From-SVN: r244341 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/i386.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6c32ea4ec9d..c9ac837adcb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-01-11 Uros Bizjak + + * config/i386/i386.c (memory_address_length): Increase len + only when rip_relative_addr_p returns false. + 2017-01-11 Julia Koval * common/config/i386/i386-common.c (OPTION_MASK_ISA_SGX_UNSET): New. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 2ef5e9f3e0c..93da402a256 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -28744,7 +28744,7 @@ memory_address_length (rtx addr, bool lea) else if (disp && !base && !index) { len += 4; - if (rip_relative_addr_p (&parts)) + if (!rip_relative_addr_p (&parts)) len++; } else -- 2.30.2