Hello! Revision 204369 [1] inadvertently reversed the detection of RIP-relative address, resulting in the incorrect calculation of the insn length. Attached patch fixes this problem.
2017-01-11 Uros Bizjak <ubiz...@gmail.com> * config/i386/i386.c (memory_address_length): Increase len only when rip_relative_addr_p returns false. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. Committed to mainline SVN and release branches. [1] https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=204369 Uros.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index e03dadd..bc4325a 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -28738,7 +28738,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