[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/17898] New: rdrand/rdseed should not disassmble with f2/f3
From: |
markcharney at gmail dot com |
Subject: |
[Bug binutils/17898] New: rdrand/rdseed should not disassmble with f2/f3 prefixes present. |
Date: |
Thu, 29 Jan 2015 02:04:42 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=17898
Bug ID: 17898
Summary: rdrand/rdseed should not disassmble with f2/f3
prefixes present.
Product: binutils
Version: 2.24
Status: NEW
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: markcharney at gmail dot com
binutils/objdump should do the software equivalent of a #UD (emit "(bad)" or
whatever is the binutils convention for unrecognized instructions) if f2/f3
prefixes are present before rdrand/rdseed. Intel SDM says so. Binutils
disassembles them as if F2/F3 were legal legacy prefixes for these
instructions.
I demonstrated this with binutils 2.24. I did not check later versions.
% objdump -v
GNU objdump (GNU Binutils) 2.24
Copyright 2013 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.
% cat foo.c
int main()
{
asm volatile(".byte 0xF3, 0x0F, 0xC7, 0xF8");
asm volatile(".byte 0xF3, 0x0F, 0xC7, 0xF0");
return 0;
}
% gcc foo.c
% objdump -D a.out | grep -A10 'main>:'
0000000000400496 <main>:
400496: 55 push rbp
400497: 48 89 e5 mov rbp,rsp
40049a: f3 0f c7 f8 repz rdseed eax
40049e: f3 0f c7 f0 repz rdrand eax
4004a2: b8 00 00 00 00 mov eax,0x0
4004a7: 5d pop rbp
4004a8: c3 ret
4004a9: 0f 1f 80 00 00 00 00 nop DWORD PTR [rax+0x0]
00000000004004b0 <__libc_csu_init>:
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug binutils/17898] New: rdrand/rdseed should not disassmble with f2/f3 prefixes present.,
markcharney at gmail dot com <=