i386.c (memory_address_length): Increase len only when rip_relative_addr_p returns...
authorUros Bizjak <ubizjak@gmail.com>
Wed, 11 Jan 2017 21:53:45 +0000 (22:53 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Wed, 11 Jan 2017 21:53:45 +0000 (22:53 +0100)
* config/i386/i386.c (memory_address_length): Increase len
only when rip_relative_addr_p returns false.

From-SVN: r244341

gcc/ChangeLog
gcc/config/i386/i386.c

index 6c32ea4ec9dbeb6036e3325fa387025d5395f232..c9ac837adcb122d2b5406a188ace9ad8c7623900 100644 (file)
@@ -1,3 +1,8 @@
+2017-01-11  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/i386.c (memory_address_length): Increase len
+       only when rip_relative_addr_p returns false.
+
 2017-01-11  Julia Koval  <julia.koval@intel.com>
 
        * common/config/i386/i386-common.c (OPTION_MASK_ISA_SGX_UNSET): New.
index 2ef5e9f3e0cca9e7a263e035c1667531a7b01291..93da402a256631b71f6eba3b9eea96efed3d95e2 100644 (file)
@@ -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