bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/19660] [libopcodes] [x86] REP prefixes shown incorrectly


From: hjl.tools at gmail dot com
Subject: [Bug binutils/19660] [libopcodes] [x86] REP prefixes shown incorrectly
Date: Mon, 18 Apr 2016 16:54:12 +0000

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

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to njholcomb from comment #2)
> Created attachment 9201 [details]
> Shows rep prefixes on non-string instructions

I got

0000000000000000 <main>:
   0:   55                      push   %rbp
   1:   48 89 e5                mov    %rsp,%rbp
   4:   f3 e0 58                repz loopne 5f <main+0x5f>
   7:   f2 00 00                repnz add %al,(%rax)
   a:   00 b8 00 00 00 00       add    %bh,0x0(%rax)
  10:   5d                      pop    %rbp
  11:   c3                      retq   

repz is nop before loopne.  repnz is UD before add:

Program received signal SIGSEGV, Segmentation fault.
0x000000000040048f in main ()
(gdb) disass
Dump of assembler code for function main:
   0x0000000000400488 <+0>:     push   %rbp
   0x0000000000400489 <+1>:     mov    %rsp,%rbp
   0x000000000040048c <+4>:     repz loopne 0x4004e7 <__libc_csu_init+71>
=> 0x000000000040048f <+7>:     repnz add %al,(%rax)
   0x0000000000400492 <+10>:    add    %bh,0x0(%rax)
   0x0000000000400498 <+16>:    pop    %rbp
   0x0000000000400499 <+17>:    retq   
End of assembler dump.
(gdb) 

Disassembler output looks OK to me.

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]