Created attachment 7257 [details] real hardware test Compile attached file: > gcc -Wall -g -O0 mulsd.c Run gdb: > gdb a.out Set breakpoint in main: Breakpoint 1, main () at test.c:4 4 double a[2] = {2, 2}, b[2] = {0, 0}; Make one step (gdb) n 5 __asm__ __volatile__ ( (gdb) disassembler <omitted> => 0x0000000000400572 <+54>: movupd -0x10(%rbp),%xmm7 0x0000000000400577 <+59>: data16 0x0000000000400578 <+60>: mulpd %xmm7,%xmm7 0x000000000040057c <+64>: movupd %xmm7,-0x20(%rbp) <omitted> Instruction disassembled incorrectly. It's mulsd %xmm7, %xmm7. Hardware look at prefixes order but not in all cases. Examples with mul** instructions: 66 f3 f2 0f 59 ff is mulsd %%xmm7, %%xmm7 (mandatory prefix is f2) 66 f2 f3 0f 59 ff is mulss %%xmm7, %%xmm7 (mandatory prefix is f3) 66 0f 59 ff is mulpd %%xmm7, %%xmm7 (mandatory prefix is 66) f2 66 0f 59 ff is mulsd %%xmm7, %%xmm7 (mandatory prefix is f2) If both f2 and f3 prefixes present last of it is mandatory. But 66 prefix is mandatory only if f2 and f3 prefixes is not present in this insturction. Similar bug submitted in objdump (16083).
> Similar bug submitted in objdump (16083). Thanks. GDB actually shares the disassembler code with objdump, so once that one is fixed, so will GDB. *** This bug has been marked as a duplicate of bug 16083 ***