The following patterns are not disassembled correctly for the registers (rbp, rsp, r12, r13) and for any of the instructions of FMA4 or XOP with four operands.
vfmaddpd %xmm10,(%rbp),%xmm5,%xmm11 vfmaddpd %xmm10,(%rsp),%xmm5,%xmm11 VPMACSDD %xmm10,(%r12),%xmm5,%xmm11 VPMACSDD %xmm10,(%r13),%xmm5,%xmm11 wrongly disassembled like this: 0: c4 63 51 69 5d 00 a0 vfmaddpd %xmm12,0x5d(%rbp),%xmm5,%xmm11 7: c4 63 51 69 1c 24 a0 vfmaddpd %xmm8,(%rsp,%rbx,1),%xmm5,%xmm11 e: 8f 48 50 9e 1c 24 a0 vpmacsdd %xmm8,(%r12,%rbx,1),%xmm5,%xmm11 15: 8f 48 50 9e 5d 00 a0 vpmacsdd %xmm6,0x5d(%r13),%xmm5,%xmm11 The disassembler gets confused in OP_E_memory, that makes me suspect that this bug is also present in other instructions using OP_E_memory. Furthermore, the assembler seems to try to accommodate this bug by using a fake_zero_displacement exactly in the cases that we were hit in the disassembler: /* x86-64 ignores REX prefix bit here to avoid decoder complications. */ if ((i.base_reg->reg_num & 7) == EBP_REG_NUM) { default_seg = &ss; if (i.disp_operands == 0) { fake_zero_displacement = 1; i.types[op].bitfield.disp8 = 1; } } -- Summary: OP_E_memory produces wrong disassembled code Product: binutils Version: 2.21 (HEAD) Status: NEW Severity: normal Priority: P2 Component: binutils AssignedTo: unassigned at sources dot redhat dot com ReportedBy: spop at gcc dot gnu dot org CC: bug-binutils at gnu dot org http://sourceware.org/bugzilla/show_bug.cgi?id=10973 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils