summaryrefslogtreecommitdiff
path: root/test/vmread.asm
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-08-28 18:03:49 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-08-28 18:03:49 -0700
commit5e7d6f1105917d5ef490078a2444aa8523e2d85b (patch)
tree04697e713f7dd69d327db5c3a972b85f7ba5db5e /test/vmread.asm
parentc5b37dbf5e18a77a91c1cb0454e537018b71b5d3 (diff)
downloadnasm-5e7d6f1105917d5ef490078a2444aa8523e2d85b.tar.gz
BR 2029472: Wrong operand size for VMREAD/VMWRITE in 64-bit mode
Fix the operand size for VMREAD/VMWRITE in 64-bit mode
Diffstat (limited to 'test/vmread.asm')
-rw-r--r--test/vmread.asm22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/vmread.asm b/test/vmread.asm
new file mode 100644
index 00000000..1b6ac708
--- /dev/null
+++ b/test/vmread.asm
@@ -0,0 +1,22 @@
+;Testname=test; Arguments=-fbin -ovmread.bin; Files=.stdout .stderr vmread.bin
+
+ bits 32
+ vmread dword [0], eax
+ vmwrite eax, dword [0]
+
+ bits 64
+ vmread qword [0], rax
+ vmwrite rax, qword [0]
+
+%ifdef ERROR
+ bits 32
+ vmread qword [0], eax
+ vmwrite eax, qword [0]
+
+ bits 64
+ vmread dword [0], eax
+ vmwrite eax, dword [0]
+
+ vmread qword [0], eax
+ vmwrite eax, qword [0]
+%endif \ No newline at end of file