https://sourceware.org/bugzilla/show_bug.cgi?id=32722

            Bug ID: 32722
           Summary: [objdump] vmovdqu considered to have 24-bit
                    displacement
           Product: binutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Consider the following test-case:
...
$ cat test.s
        .file   "test.c"
        .text
        .globl  main
        .type   main, @function
main:
        .byte 0xc5
        .byte 0xfe
        .byte 0x6f
        .byte 0x0d
        .byte 0xff
        .byte 0xff
        .byte 0xff
        .byte 0xff
        .size   main, .-main
        .ident  "GCC: (SUSE Linux) 7.5.0"
        .section        .note.GNU-stack,"",@progbits
...

Compiled with:
...
$ gcc test.s -c
...

Objdump thinks the instruction is 7 bytes long:
...
$ objdump -d test.o
  ...
0000000000000000 <main>:
   0:   c5 fe 6f 0d ff ff ff    vmovdqu -0x1(%rip),%ymm1
   7:   ff 
...

However, llvm-objdump thinks it's 8 bytes long:
...
$ llvm-objdump -d test.o
  ...
0000000000000000 <main>:
       0: c5 fe 6f 0d ff ff ff ff       vmovdqu -0x1(%rip), %ymm1
...

GDB likewise:
...
$ gdb -q -batch test.o -ex "disassemble /r main"
Dump of assembler code for function main:
   0x0000000000000000 <+0>:     c5 fe 6f 0d ff ff ff ff vmovdqu
-0x1(%rip),%ymm1
End of assembler dump.
...

The instruction is in fact 8 bytes long.

It consists of:
- c5 fe: vex2 prefix
- 6f   : opcode
- 0d   : modrm
- ff ff ff ff: 32-bit displacement

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to