summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2018-02-20 12:40:11 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2018-02-20 12:40:11 -0800
commit4dbf3a96a4b17add396ea4592a7fde7cb8083d52 (patch)
treef515b64b818a27bddac200cb8428cc47c8297a76
parent99d45c850e3962e4c89839dd8531de1c080b3ee7 (diff)
parentf71820d6055373c9b9381615e28a28f307bb2df4 (diff)
downloadnasm-4dbf3a96a4b17add396ea4592a7fde7cb8083d52.tar.gz
Merge remote-tracking branch 'origin/nasm-2.13.xx'
Resolved Conflicts: version Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r--doc/changes.src6
-rw-r--r--test/ret.asm56
-rw-r--r--x86/insns.dat20
3 files changed, 81 insertions, 1 deletions
diff --git a/doc/changes.src b/doc/changes.src
index e72457c2..ddfe6b38 100644
--- a/doc/changes.src
+++ b/doc/changes.src
@@ -7,6 +7,12 @@
The NASM 2 series supports x86-64, and is the production version of NASM
since 2007.
+\S{cl-2.13.04} Version 2.13.04
+
+\b Added \c{-W}, \c{-D}, and \c{-Q} suffix aliases for \c{RET}
+ instructions so the operand sizes of these instructions can be
+ encoded without using \c{o16}, \c{o32} or \c{o64}.
+
\S{cl-2.13.03} Version 2.13.03
\b Added AVX and AVX512 \c{VAES*} and \c{VPCLMULQDQ} instructions.
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
diff --git a/x86/insns.dat b/x86/insns.dat
index 99746302..1bda0e3c 100644
--- a/x86/insns.dat
+++ b/x86/insns.dat
@@ -1,6 +1,6 @@
;; --------------------------------------------------------------------------
;;
-;; Copyright 1996-2017 The NASM Authors - All Rights Reserved
+;; Copyright 1996-2018 The NASM Authors - All Rights Reserved
;; See the file AUTHORS included with the NASM distribution for
;; the specific copyright holders.
;;
@@ -1129,6 +1129,24 @@ RETF void [ cb] 8086
RETF imm [i: ca iw] 8086,SW
RETN void [ c3] 8086,BND
RETN imm [i: c2 iw] 8086,SW,BND
+RETW void [ o16 c3] 8086,BND
+RETW imm [i: c2 iw] 8086,SW,BND
+RETFW void [ o16 cb] 8086
+RETFW imm [i: o16 ca iw] 8086,SW
+RETNW void [ o16 c3] 8086,BND
+RETNW imm [i: o16 c2 iw] 8086,SW,BND
+RETD void [ o32 c3] 8086,BND,NOLONG
+RETD imm [i: o32 c2 iw] 8086,SW,BND,NOLONG
+RETFD void [ o32 cb] 8086
+RETFD imm [i: o32 ca iw] 8086,SW
+RETND void [ o32 c3] 8086,BND,NOLONG
+RETND imm [i: o32 c2 iw] 8086,SW,BND,NOLONG
+RETQ void [ o64nw c3] X64,BND
+RETQ imm [i: o64nw c2 iw] X64,SW,BND
+RETFQ void [ o64 cb] X64
+RETFQ imm [i: o64 ca iw] X64,SW
+RETNQ void [ o64nw c3] X64,BND
+RETNQ imm [i: o64nw c2 iw] X64,SW,BND
ROL rm8,unity [m-: d0 /0] 8086
ROL rm8,reg_cl [m-: d2 /0] 8086