From 0416b232cecdef958328f6d3f54c472bae29e936 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 6 Jul 2010 09:15:48 -0700 Subject: [PATCH] Add RD*SBASE, WR*SBASE, RDRAND from AVX v7 Add the RD*SBASE, WR*SBASE and RDRAND instructions from version 7 of the AVX specification, Intel document 319433-007. Signed-off-by: H. Peter Anvin --- insns.dat | 11 +++++++++++ test/newrdwr.asm | 24 ++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 test/newrdwr.asm diff --git a/insns.dat b/insns.dat index 00d0a7f2..0a1fd068 100644 --- a/insns.dat +++ b/insns.dat @@ -1060,9 +1060,16 @@ RCR rm32,imm \321\1\xC1\203\25 386,SB RCR rm64,unity \324\1\xD1\203 X64 RCR rm64,reg_cl \324\1\xD3\203 X64 RCR rm64,imm \324\1\xC1\203\25 X64,SB +RDFSBASE reg32 [m: f3 0f ae /0] X64,FUTURE +RDFSBASE reg64 [m: o64 f3 0f ae /0] X64,FUTURE +RDGSBASE reg32 [m: f3 0f ae /1] X64,FUTURE +RDGSBASE reg64 [m: o64 f3 0f ae /1] X64,FUTURE RDSHR rm32 \321\2\x0F\x36\200 P6,CYRIX,SMM RDMSR void \2\x0F\x32 PENT,PRIV RDPMC void \2\x0F\x33 P6 +RDRAND reg16 [m: o16 0f c7 /6] FUTURE +RDRAND reg32 [m: o32 0f c7 /6] FUTURE +RDRAND reg64 [m: o64 0f c7 /6] FUTURE RDTSC void \2\x0F\x31 PENT RDTSCP void \3\x0F\x01\xF9 X86_64 RET void \1\xC3 8086 @@ -1331,6 +1338,10 @@ VERW mem16 \2\x0F\x00\205 286,PROT VERW reg16 \2\x0F\x00\205 286,PROT FWAIT void \341 8086 WBINVD void \2\x0F\x09 486,PRIV +WRFSBASE reg32 [m: f3 0f ae /2] X64,FUTURE +WRFSBASE reg64 [m: o64 f3 0f ae /2] X64,FUTURE +WRGSBASE reg32 [m: f3 0f ae /3] X64,FUTURE +WRGSBASE reg64 [m: o64 f3 0f ae /3] X64,FUTURE WRSHR rm32 \321\2\x0F\x37\200 P6,CYRIX,SMM WRMSR void \2\x0F\x30 PENT,PRIV XADD mem,reg8 \2\x0F\xC0\101 486,SM diff --git a/test/newrdwr.asm b/test/newrdwr.asm new file mode 100644 index 00000000..dcfc1942 --- /dev/null +++ b/test/newrdwr.asm @@ -0,0 +1,24 @@ +;Testname=test; Arguments=-fbin -onewrdwr.bin; Files=stdout stderr newrdwr.bin + + bits 64 + + rdfsbase eax + rdfsbase rax + rdgsbase eax + rdgsbase rax + rdrand ax + rdrand eax + rdrand rax + wrfsbase eax + wrfsbase rax + wrgsbase eax + wrgsbase rax + + osp rdfsbase eax + osp rdfsbase rax + osp rdgsbase eax + osp rdgsbase rax + osp wrfsbase eax + osp wrfsbase rax + osp wrgsbase eax + osp wrgsbase rax -- 2.11.4.GIT