summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2016-11-15 11:55:14 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2016-11-15 11:55:14 -0800
commitc7ea29b2470e7700c913d9ba99a3a8b4b1e7c93b (patch)
tree550d535a6e0e8c878674a0d5da9369f50f9c04b6 /test
parent48fe2eea2743f8beb1e07e1bf0fb4b74ecab5426 (diff)
downloadnasm-c7ea29b2470e7700c913d9ba99a3a8b4b1e7c93b.tar.gz
Add rdpid instruction
Add the RDPID instruction, documented in the Intel SDM October 2016. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'test')
-rw-r--r--test/rdpid.asm21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/rdpid.asm b/test/rdpid.asm
new file mode 100644
index 00000000..76d9fc26
--- /dev/null
+++ b/test/rdpid.asm
@@ -0,0 +1,21 @@
+%ifdef ERROR
+ %define ERR(x) x
+%else
+ %define ERR(x)
+%endif
+
+ bits 16
+
+ rdpid eax
+ ERR(rdpid ax)
+
+ bits 32
+
+ rdpid ebx
+ ERR(rdpid bx)
+
+ bits 64
+
+ rdpid rcx
+ rdpid ecx
+ ERR(rdpid cx)