diff options
author | 2015-12-21 20:56:22 +0000 | |
---|---|---|
committer | 2015-12-21 20:56:22 +0000 | |
commit | e64e014e0add29b1b5734eb0524d1e08057be9db (patch) | |
tree | c7a9b071e03300270a4b7af5837bee9b8042798c | |
parent | Goto a loop_end label rather than using a continue statement for an (diff) | |
download | wireguard-openbsd-e64e014e0add29b1b5734eb0524d1e08057be9db.tar.xz wireguard-openbsd-e64e014e0add29b1b5734eb0524d1e08057be9db.zip |
Recognise the rdseed instruction introduced with Broadwell.
Similar to changes made in FreeBSD.
ok kettenis@
-rw-r--r-- | gnu/usr.bin/binutils-2.17/include/opcode/i386.h | 1 | ||||
-rw-r--r-- | gnu/usr.bin/binutils-2.17/opcodes/i386-dis.c | 19 |
2 files changed, 19 insertions, 1 deletions
diff --git a/gnu/usr.bin/binutils-2.17/include/opcode/i386.h b/gnu/usr.bin/binutils-2.17/include/opcode/i386.h index b9d628cac34..06b4a6ce531 100644 --- a/gnu/usr.bin/binutils-2.17/include/opcode/i386.h +++ b/gnu/usr.bin/binutils-2.17/include/opcode/i386.h @@ -1513,6 +1513,7 @@ static const template i386_optab[] = /* Intel Random Number Generator extensions */ {"rdrand", 1, 0x0fc7, 0x6, CpuNEW, Modrm|NoSuf, { Reg16|Reg32|Reg64 } }, +{"rdseed", 1, 0x0fc7, 0x7, CpuNEW, Modrm|NoSuf, { Reg16|Reg32|Reg64 } }, /* Intel Supervisor Mode Access Prevention extensions */ {"clac", 0, 0x0f01, 0xca, CpuSMAP, NoSuf|ImmExt, { 0, 0, 0 } }, diff --git a/gnu/usr.bin/binutils-2.17/opcodes/i386-dis.c b/gnu/usr.bin/binutils-2.17/opcodes/i386-dis.c index bb8e7ca5efb..75bb8e5b7f2 100644 --- a/gnu/usr.bin/binutils-2.17/opcodes/i386-dis.c +++ b/gnu/usr.bin/binutils-2.17/opcodes/i386-dis.c @@ -89,6 +89,7 @@ static void OP_MS (int, int); static void OP_XS (int, int); static void OP_M (int, int); static void OP_VMX (int, int); +static void OP_VMX2 (int, int); static void OP_0fae (int, int); static void OP_0f07 (int, int); static void NOP_Fixup (int, int); @@ -315,6 +316,7 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr) #define MS OP_MS, v_mode #define XS OP_XS, v_mode #define VM OP_VMX, q_mode +#define VM2 OP_VMX2, q_mode #define OPSUF OP_3DNowSuffix, 0 #define OPSIMD OP_SIMD_Suffix, 0 #define OP0FAE OP_0fae, v_mode @@ -1435,7 +1437,7 @@ static const struct dis386 grps[][8] = { { "(bad)", XX, XX, XX }, { "(bad)", XX, XX, XX }, { "", VM, XX, XX }, /* See OP_VMX. */ - { "vmptrst", Eq, XX, XX }, + { "", VM2, XX, XX }, }, /* GRP10 */ { @@ -5340,6 +5342,21 @@ OP_VMX (int bytemode, int sizeflag) } static void +OP_VMX2 (int bytemode ATTRIBUTE_UNUSED, int sizeflag) +{ + if (mod == 3) + { + strcpy (obuf, "rdseed"); + OP_E (v_mode, sizeflag); + } + else + { + strcpy (obuf, "vmptrst"); + OP_E (q_mode, sizeflag); + } +} + +static void REP_Fixup (int bytemode, int sizeflag) { /* The 0xf3 prefix should be displayed as "rep" for ins, outs, movs, |