https://sourceware.org/bugzilla/show_bug.cgi?id=19661
H.J. Lu <hjl.tools at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |RESOLVED Resolution|--- |WONTFIX --- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to njholcomb from comment #2) > Created attachment 9202 [details] > File displays locking without a memory operand. > > objdump -d lock_no_mem.o > > lock_no_mem.o: file format elf64-x86-64 > > > Disassembly of section .text: > > 0000000000000000 <main>: > 0: 55 push %rbp > 1: 48 89 e5 mov %rsp,%rbp > 4: f0 b7 9f lock mov $0x9f,%bh > 7: 96 xchg %eax,%esi > 8: 00 00 add %al,(%rax) > a: 00 b8 00 00 00 00 add %bh,0x0(%rax) > 10: 5d pop %rbp > 11: c3 retq It looks OK to me. You get UD because LOCK prefix is used on non-memory operand: (gdb) disass Dump of assembler code for function main: 0x0000000000400488 <+0>: push %rbp 0x0000000000400489 <+1>: mov %rsp,%rbp => 0x000000000040048c <+4>: lock mov $0x9f,%bh 0x000000000040048f <+7>: xchg %eax,%esi 0x0000000000400490 <+8>: add %al,(%rax) 0x0000000000400492 <+10>: add %bh,0x0(%rax) 0x0000000000400498 <+16>: pop %rbp 0x0000000000400499 <+17>: retq End of assembler dump. (gdb) -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils