aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2018-02-14 11:09:07 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2018-02-14 11:09:07 -0800
commit8524e163033c9b2fd7c2559f584b7c88fc15ccff (patch)
treee1c0c416ee8ec2585b257c2c83f2b825b3e67995 /test
parent9f45a77f46829e666b35530939b9237cf978d4dc (diff)
downloadnasm-8524e163033c9b2fd7c2559f584b7c88fc15ccff.tar.gz
nasm-8524e163033c9b2fd7c2559f584b7c88fc15ccff.tar.xz
nasm-8524e163033c9b2fd7c2559f584b7c88fc15ccff.zip
insns.dat: add aliases of the RET instruction with explicit operand size
Make it possible to generate variants of RET(F) with explicit operand size specified without having to use o16/o32/o64. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'test')
-rw-r--r--test/ret.asm56
1 files changed, 56 insertions, 0 deletions
diff --git a/test/ret.asm b/test/ret.asm
new file mode 100644
index 00000000..a6aa5332
--- /dev/null
+++ b/test/ret.asm
@@ -0,0 +1,56 @@
+ ;; All the flavors of RET
+%ifndef ERROR
+ %define ERROR 0
+%endif
+
+
+ bits 16
+
+ ret
+ retn
+ retf
+ retw
+ retnw
+ retfw
+ retd
+ retnd
+ retfd
+%if ERROR
+ retq
+ retnq
+ retfq
+%endif
+
+ bits 32
+
+ ret
+ retn
+ retf
+ retw
+ retnw
+ retfw
+ retd
+ retnd
+ retfd
+%if ERROR
+ retq
+ retnq
+ retfq
+%endif
+
+ bits 64
+
+ ret
+ retn
+ retf ; Probably should have been RETFQ, but: legacy...
+ retw
+ retnw
+ retfw
+%if ERROR
+ retd
+ retnd
+%endif
+ retfd
+ retq
+ retnq
+ retfq