aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-07-06 09:15:48 -0700
committerH. Peter Anvin <hpa@zytor.com>2010-07-06 09:17:18 -0700
commit0416b232cecdef958328f6d3f54c472bae29e936 (patch)
tree7975853d8b4ef060f5eb217274e9627a7575365f
parent4cc10643282ac0879e85352c33b87b2db1e526b3 (diff)
downloadnasm-test-0416b232cecdef958328f6d3f54c472bae29e936.tar.gz
nasm-test-0416b232cecdef958328f6d3f54c472bae29e936.tar.xz
nasm-test-0416b232cecdef958328f6d3f54c472bae29e936.zip
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 <hpa@zytor.com>
-rw-r--r--insns.dat11
-rw-r--r--test/newrdwr.asm24
2 files changed, 35 insertions, 0 deletions
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