summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2016-12-28 17:23:03 -0800
committerRobert Mustacchi <rm@joyent.com>2017-01-04 06:16:10 -0800
commit2380c36e1bade5eb4eb6c6b7445ff58583f998cf (patch)
tree70334f5933ae7b6a93e4b185340c5d23f42589ac
parente1936e201a9a6139df26cffebf1de54d1ab41369 (diff)
downloadillumos-joyent-2380c36e1bade5eb4eb6c6b7445ff58583f998cf.tar.gz
7700 want dis test suite
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Reviewed by: Adam Leventhal <adam.leventhal@gmail.com> Approved by: Richard Lowe <richlowe@richlowe.net>
-rw-r--r--exception_lists/copyright1
-rw-r--r--usr/src/pkg/manifests/system-test-utiltest.mf72
-rw-r--r--usr/src/test/util-tests/tests/Makefile2
-rw-r--r--usr/src/test/util-tests/tests/dis/Makefile92
-rw-r--r--usr/src/test/util-tests/tests/dis/distest.ksh298
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.adx.out6
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.adx.s32
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.aes.out12
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.aes.s37
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.bmi1.out21
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.bmi1.s46
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.bmi2.out16
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.bmi2.s41
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.fma-pd.out72
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.fma-pd.s97
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.fma-ps.out72
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.fma-ps.s97
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.fma-sd.out24
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.fma-sd.s49
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.fma-ss.out24
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.fma-ss.s49
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.lzcnt.out3
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.lzcnt.s28
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.popcnt.out3
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.popcnt.s28
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.sse-4.2.out16
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.sse-4.2.s41
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.ssse3.out64
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.ssse3.s89
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.xsave.out4
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.xsave.s30
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.adx.out8
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.adx.s32
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.aes.out12
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.aes.s37
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.bmi1.out39
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.bmi1.s65
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.bmi2.out32
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.bmi2.s58
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.ept.out2
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.ept.s27
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.fma-pd.out72
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.fma-pd.s97
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.fma-ps.out72
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.fma-ps.s97
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.fma-sd.out24
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.fma-sd.s49
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.fma-ss.out24
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.fma-ss.s49
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.lzcnt.out6
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.lzcnt.s31
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.popcnt.out6
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.popcnt.s31
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.random.out2
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.random.s27
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.sse-4.2.out19
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.sse-4.2.s44
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.ssse3.out64
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.ssse3.s89
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.vmx.out11
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.vmx.s36
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.xsave.out4
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.xsave.s30
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/tst.mwait.out2
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/tst.mwait.s27
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/tst.random.out4
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/tst.random.s29
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/tst.smap.out2
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/tst.smap.s27
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/tst.vmx.out4
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/tst.vmx.s29
-rw-r--r--usr/src/test/util-tests/tests/dis/sparc/tst.regs.out30
-rw-r--r--usr/src/test/util-tests/tests/dis/sparc/tst.regs.s55
73 files changed, 2870 insertions, 1 deletions
diff --git a/exception_lists/copyright b/exception_lists/copyright
index 2a5b033d53..520741dd1d 100644
--- a/exception_lists/copyright
+++ b/exception_lists/copyright
@@ -381,6 +381,7 @@ usr/src/lib/libsmbfs/netsmb/spnego.h
usr/src/lib/libsmbfs/smb/derparse.[ch]
usr/src/lib/libsmbfs/smb/spnego.c
usr/src/lib/libsmbfs/smb/spnegoparse.[ch]
+usr/src/test/util-tests/tests/dis/*/*.out
usr/src/test/zfs-tests/tests/functional/history/*Z
usr/src/test/zfs-tests/tests/functional/history/*txt
usr/src/tools/btxld/btx.h
diff --git a/usr/src/pkg/manifests/system-test-utiltest.mf b/usr/src/pkg/manifests/system-test-utiltest.mf
index 9a4ddd4efa..46e691f849 100644
--- a/usr/src/pkg/manifests/system-test-utiltest.mf
+++ b/usr/src/pkg/manifests/system-test-utiltest.mf
@@ -24,12 +24,84 @@ dir path=opt/util-tests
dir path=opt/util-tests/bin
dir path=opt/util-tests/runfiles
dir path=opt/util-tests/tests
+dir path=opt/util-tests/tests/dis
+dir path=opt/util-tests/tests/dis/i386
+dir path=opt/util-tests/tests/dis/sparc
dir path=opt/util-tests/tests/libnvpair_json
file path=opt/util-tests/README mode=0444
file path=opt/util-tests/bin/print_json mode=0555
file path=opt/util-tests/bin/utiltest mode=0555
file path=opt/util-tests/runfiles/default.run mode=0444
file path=opt/util-tests/tests/allowed-ips mode=0555
+file path=opt/util-tests/tests/dis/distest mode=0555
+file path=opt/util-tests/tests/dis/i386/32.adx.out mode=0555
+file path=opt/util-tests/tests/dis/i386/32.adx.s mode=0555
+file path=opt/util-tests/tests/dis/i386/32.aes.out mode=0555
+file path=opt/util-tests/tests/dis/i386/32.aes.s mode=0555
+file path=opt/util-tests/tests/dis/i386/32.bmi1.out mode=0555
+file path=opt/util-tests/tests/dis/i386/32.bmi1.s mode=0555
+file path=opt/util-tests/tests/dis/i386/32.bmi2.out mode=0555
+file path=opt/util-tests/tests/dis/i386/32.bmi2.s mode=0555
+file path=opt/util-tests/tests/dis/i386/32.fma-pd.out mode=0555
+file path=opt/util-tests/tests/dis/i386/32.fma-pd.s mode=0555
+file path=opt/util-tests/tests/dis/i386/32.fma-ps.out mode=0555
+file path=opt/util-tests/tests/dis/i386/32.fma-ps.s mode=0555
+file path=opt/util-tests/tests/dis/i386/32.fma-sd.out mode=0555
+file path=opt/util-tests/tests/dis/i386/32.fma-sd.s mode=0555
+file path=opt/util-tests/tests/dis/i386/32.fma-ss.out mode=0555
+file path=opt/util-tests/tests/dis/i386/32.fma-ss.s mode=0555
+file path=opt/util-tests/tests/dis/i386/32.lzcnt.out mode=0555
+file path=opt/util-tests/tests/dis/i386/32.lzcnt.s mode=0555
+file path=opt/util-tests/tests/dis/i386/32.popcnt.out mode=0555
+file path=opt/util-tests/tests/dis/i386/32.popcnt.s mode=0555
+file path=opt/util-tests/tests/dis/i386/32.sse-4.2.out mode=0555
+file path=opt/util-tests/tests/dis/i386/32.sse-4.2.s mode=0555
+file path=opt/util-tests/tests/dis/i386/32.ssse3.out mode=0555
+file path=opt/util-tests/tests/dis/i386/32.ssse3.s mode=0555
+file path=opt/util-tests/tests/dis/i386/32.xsave.out mode=0555
+file path=opt/util-tests/tests/dis/i386/32.xsave.s mode=0555
+file path=opt/util-tests/tests/dis/i386/64.adx.out mode=0555
+file path=opt/util-tests/tests/dis/i386/64.adx.s mode=0555
+file path=opt/util-tests/tests/dis/i386/64.aes.out mode=0555
+file path=opt/util-tests/tests/dis/i386/64.aes.s mode=0555
+file path=opt/util-tests/tests/dis/i386/64.bmi1.out mode=0555
+file path=opt/util-tests/tests/dis/i386/64.bmi1.s mode=0555
+file path=opt/util-tests/tests/dis/i386/64.bmi2.out mode=0555
+file path=opt/util-tests/tests/dis/i386/64.bmi2.s mode=0555
+file path=opt/util-tests/tests/dis/i386/64.ept.out mode=0555
+file path=opt/util-tests/tests/dis/i386/64.ept.s mode=0555
+file path=opt/util-tests/tests/dis/i386/64.fma-pd.out mode=0555
+file path=opt/util-tests/tests/dis/i386/64.fma-pd.s mode=0555
+file path=opt/util-tests/tests/dis/i386/64.fma-ps.out mode=0555
+file path=opt/util-tests/tests/dis/i386/64.fma-ps.s mode=0555
+file path=opt/util-tests/tests/dis/i386/64.fma-sd.out mode=0555
+file path=opt/util-tests/tests/dis/i386/64.fma-sd.s mode=0555
+file path=opt/util-tests/tests/dis/i386/64.fma-ss.out mode=0555
+file path=opt/util-tests/tests/dis/i386/64.fma-ss.s mode=0555
+file path=opt/util-tests/tests/dis/i386/64.lzcnt.out mode=0555
+file path=opt/util-tests/tests/dis/i386/64.lzcnt.s mode=0555
+file path=opt/util-tests/tests/dis/i386/64.popcnt.out mode=0555
+file path=opt/util-tests/tests/dis/i386/64.popcnt.s mode=0555
+file path=opt/util-tests/tests/dis/i386/64.random.out mode=0555
+file path=opt/util-tests/tests/dis/i386/64.random.s mode=0555
+file path=opt/util-tests/tests/dis/i386/64.sse-4.2.out mode=0555
+file path=opt/util-tests/tests/dis/i386/64.sse-4.2.s mode=0555
+file path=opt/util-tests/tests/dis/i386/64.ssse3.out mode=0555
+file path=opt/util-tests/tests/dis/i386/64.ssse3.s mode=0555
+file path=opt/util-tests/tests/dis/i386/64.vmx.out mode=0555
+file path=opt/util-tests/tests/dis/i386/64.vmx.s mode=0555
+file path=opt/util-tests/tests/dis/i386/64.xsave.out mode=0555
+file path=opt/util-tests/tests/dis/i386/64.xsave.s mode=0555
+file path=opt/util-tests/tests/dis/i386/tst.mwait.out mode=0555
+file path=opt/util-tests/tests/dis/i386/tst.mwait.s mode=0555
+file path=opt/util-tests/tests/dis/i386/tst.random.out mode=0555
+file path=opt/util-tests/tests/dis/i386/tst.random.s mode=0555
+file path=opt/util-tests/tests/dis/i386/tst.smap.out mode=0555
+file path=opt/util-tests/tests/dis/i386/tst.smap.s mode=0555
+file path=opt/util-tests/tests/dis/i386/tst.vmx.out mode=0555
+file path=opt/util-tests/tests/dis/i386/tst.vmx.s mode=0555
+file path=opt/util-tests/tests/dis/sparc/tst.regs.out mode=0555
+file path=opt/util-tests/tests/dis/sparc/tst.regs.s mode=0555
file path=opt/util-tests/tests/iconv_test mode=0555
file path=opt/util-tests/tests/libnvpair_json/json_00_blank mode=0555
file path=opt/util-tests/tests/libnvpair_json/json_01_boolean mode=0555
diff --git a/usr/src/test/util-tests/tests/Makefile b/usr/src/test/util-tests/tests/Makefile
index e12ab73c58..9cfa699093 100644
--- a/usr/src/test/util-tests/tests/Makefile
+++ b/usr/src/test/util-tests/tests/Makefile
@@ -14,6 +14,6 @@
# Copyright 2014 Garrett D'Amore <garrett@damore.org>
#
-SUBDIRS = dladm iconv libnvpair_json printf xargs
+SUBDIRS = dis dladm iconv libnvpair_json printf xargs
include $(SRC)/test/Makefile.com
diff --git a/usr/src/test/util-tests/tests/dis/Makefile b/usr/src/test/util-tests/tests/dis/Makefile
new file mode 100644
index 0000000000..cf2b8e3ae7
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/Makefile
@@ -0,0 +1,92 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2016 Joyent, Inc.
+#
+
+include $(SRC)/Makefile.master
+
+ROOTOPTPKG = $(ROOT)/opt/util-tests
+TESTDIR = $(ROOTOPTPKG)/tests/dis
+ARCHS = i386 sparc
+
+PROG = distest
+
+SPARC_TESTS = \
+ tst.regs
+
+I386_TESTS = \
+ 32.adx \
+ 32.aes \
+ 32.bmi1 \
+ 32.bmi2 \
+ 32.fma-pd \
+ 32.fma-ps \
+ 32.fma-sd \
+ 32.fma-ss \
+ 32.lzcnt \
+ 32.popcnt \
+ 32.sse-4.2 \
+ 32.ssse3 \
+ 32.xsave \
+ 64.adx \
+ 64.aes \
+ 64.bmi1 \
+ 64.bmi2 \
+ 64.ept \
+ 64.fma-pd \
+ 64.fma-ps \
+ 64.fma-sd \
+ 64.fma-ss \
+ 64.lzcnt \
+ 64.popcnt \
+ 64.random \
+ 64.sse-4.2 \
+ 64.ssse3 \
+ 64.vmx \
+ 64.xsave \
+ tst.mwait \
+ tst.random \
+ tst.smap \
+ tst.vmx
+
+I386_FILES = $(I386_TESTS:%=%.s) $(I386_TESTS:%=%.out)
+ROOTI386 = $(I386_FILES:%=$(TESTDIR)/i386/%)
+
+SPARC_FILES = $(SPARC_TESTS:%=%.s) $(SPARC_TESTS:%=%.out)
+ROOTSPARC = $(SPARC_FILES:%=$(TESTDIR)/sparc/%)
+
+include $(SRC)/cmd/Makefile.cmd
+include $(SRC)/test/Makefile.com
+
+ARCHDIRS = $(ARCHS:%=$(TESTDIR)/%)
+CMDS = $(PROG:%=$(TESTDIR)/%)
+$(CMDS) := FILEMODE = 0555
+
+install: $(CMDS) $(ROOTI386) $(ROOTSPARC)
+
+lint:
+
+clobber: clean
+
+clean:
+
+$(CMDS) $(ROOTI386) $(ROOTSPARC): $(TESTDIR) $(ARCHDIRS)
+
+$(TESTDIR) $(ARCHDIRS):
+ $(INS.dir)
+
+$(TESTDIR)/%: %
+ $(INS.file)
+
+$(TESTDIR)/%: %.ksh
+ $(INS.rename)
diff --git a/usr/src/test/util-tests/tests/dis/distest.ksh b/usr/src/test/util-tests/tests/dis/distest.ksh
new file mode 100644
index 0000000000..21b39a69bc
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/distest.ksh
@@ -0,0 +1,298 @@
+#!/usr/bin/ksh
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2016 Joyent, Inc.
+#
+
+#
+# libdis test driver
+#
+# Tests are arranged by architecture. By default we'll run all of the
+# dis tests on our current architecture only. If the -p option is passed
+# to point to other correctly built gas instances, then we'll run those
+# tests, verifying that the cross-dis works.
+#
+# Each test should begin with one of the following three keywords:
+#
+# tst - Run both the 32-bit and 64-bit versions
+# 32 - Only run this with the gas 32-bit flag
+# 64 - Only run this with the gas 64-bit flag
+#
+# For example, tst.smap.s, would be built both 32-bit and 64-bit and compared to
+# its output file.
+#
+# Each input file should consist of a series of instructions in a function named
+# 'libdis_test'. The test suite will compile this file into an object file,
+# disassemble it, and compare it to the output file.
+#
+# For each input file, there should be a corresponding output file with the .out
+# suffix instead of the .s suffix. So, if you had tst.smap.s, you should have
+# tst.smap.out.
+#
+
+unalias -a
+dt_arg0=$(basename $0)
+dt_dis="/usr/bin/dis -qF libdis_test"
+dt_diff="/usr/bin/cmp -s"
+dt_defas="gas"
+dt_defarch=
+dt_nodefault=
+dt_tests=
+dt_tnum=0
+dt_tfail=0
+dt_tsuc=0
+dt_origwd=
+dt_root=
+dt_faildir=0
+typeset -A dt_platforms
+
+fatal()
+{
+ typeset msg="$*"
+ [[ -z "$msg" ]] && msg="failed"
+ echo "$dt_arg0: $msg" >&2
+ exit 1
+}
+
+usage()
+{
+ typeset msg="$*"
+ [[ -z "$msg" ]] || echo "$msg" 2>&1
+ cat <<USAGE >&2
+Usage: $dt_arg0 [-n] [ -p platform=pathtoas ]... [ test ]...
+
+ Runs all dis for the current platform or only specified tests if listed.
+
+ -n Don't run default platform tests
+ -p platform=pathtoas Run tests for platform using assembler. Should
+ either be an absolute path or a command on the
+ path.
+USAGE
+}
+
+#
+# By default, tests only run for the current platform. In other words,
+# running on an x86 system only assumes that the tests in the i386
+# directory should be run. If the -p option is specified, then other
+# platforms will be run.
+#
+# Right now, we only support running this on x86 natively; however, you
+# can run tests for other platforms with the -p option.
+#
+determine_arch()
+{
+ typeset arch
+
+ arch=$(uname -p)
+ [[ $? -eq 0 ]] || fatal "failed to determine host architecture"
+ [[ "$arch" != "i386" ]] && fatal "dis tests are only supported on x86"
+ [[ -n "$dt_nodefault" ]] && return
+ dt_defarch="i386"
+ dt_platforms[$dt_defarch]=$dt_defas
+}
+
+#
+# Iterate over the set of platforms and verify that we both know about them and
+# we can find the assembler for them.
+#
+check_platforms()
+{
+ typeset key
+
+ for key in ${!dt_platforms[@]}; do
+ typeset bin
+ [[ -d $dt_root/$key ]] || fatal "encountered unknown platform: $key"
+
+ #
+ # This may be a path or something else.
+ #
+ bin=${dt_platforms[$key]}
+ [[ -x $bin ]] && continue
+ which $bin >/dev/null 2>&1 && continue
+ fatal "failed to find command as absolute path or file: $bin"
+ done
+}
+
+handle_failure()
+{
+ typeset dir reason source out
+ dir=$1
+ reason=$2
+ source=$3
+ out=$4
+ faildir=
+
+ while [[ -d failure.$dt_faildir ]]; do
+ ((dt_faildir++))
+ done
+
+ faildir="failure.$dt_faildir"
+ mv $dir $faildir
+ cp $source $faildir/
+ cp $out $faildir/
+ printf "%s " "failed "
+ [[ -n $reason ]] && printf "%s " $reason
+ printf "%s\n" "$faildir"
+ ((dt_tfail++))
+}
+
+#
+# Check
+#
+test_one()
+{
+ typeset gflags source cmp disfile outfile extra aserr diserr
+ dir="dis.$$"
+ gflags=$1
+ source=$2
+ cmp=$3
+ extra=$4
+
+ outfile=$dir/dis.o
+ aserr=$dir/as.stderr
+ disfile=$dir/libdis.out
+ diserr=$dir/dis.stderr
+
+ ((dt_tnum++))
+ mkdir -p $dir || fatal "failed to make directory $dir"
+
+ printf "testing %s " $source
+ [[ -n $extra ]] && printf "%s " $extra
+ printf "... "
+ if ! $gas $gflags -o $outfile $source 2>$aserr >/dev/null; then
+ handle_failure $dir "(assembling)" $source $cmp
+ return
+ fi
+
+ if ! $dt_dis $outfile >$disfile 2>$diserr; then
+ handle_failure $dir "(disassembling)" $source $cmp
+ return
+ fi
+
+ if ! $dt_diff $disfile $cmp; then
+ handle_failure $dir "(comparing)" $source $cmp
+ return
+ fi
+
+ ((dt_tsuc++))
+ print "passed"
+ rm -rf $dir || fatal "failed to remove directory $dir"
+}
+
+#
+# Run a single test. This may result in two actual tests (one 32-bit and one
+# 64-bit) being run.
+#
+run_single_file()
+{
+ typeset sfile base cmpfile prefix arch gas p flags
+ sfile=$1
+
+ base=${sfile##*/}
+ cmpfile=${sfile%.*}.out
+ prefix=${base%%.*}
+ arch=${sfile%/*}
+ arch=${arch##*/}
+ [[ -f $cmpfile ]] || fatal "missing output file $cmpfile"
+ gas=${dt_platforms[$arch]}
+ [[ -n $gas ]] || fatal "encountered test $sfile, but missing assembler"
+
+ case "$prefix" in
+ 32)
+ test_one "-32" $sfile $cmpfile
+ ;;
+ 64)
+ test_one "-64" $sfile $cmpfile
+ ;;
+ tst)
+ test_one "-32" $sfile $cmpfile "(32-bit)"
+ test_one "-64" $sfile $cmpfile "(64-bit)"
+ ;;
+ esac
+}
+
+#
+# Iterate over all the test directories and run the specified tests
+#
+run_tests()
+{
+ typeset t
+ if [[ $# -ne 0 ]]; then
+ for t in $@; do
+ run_single_file $t
+ done
+ else
+ typeset k tests tests32 tests64
+ for k in ${!dt_platforms[@]}; do
+ tests=$(find $dt_root/$k -type f -name 'tst.*.s')
+ tests32=$(find $dt_root/$k -type f -name '32.*.s')
+ tests64=$(find $dt_root/$k -type f -name '64.*.s')
+ for t in $tests $tests32 $tests64; do
+ run_single_file $t
+ done
+ done
+ fi
+}
+
+goodbye()
+{
+ cat <<EOF
+
+--------------
+libdis Results
+--------------
+
+Tests passed: $dt_tsuc
+Tests failed: $dt_tfail
+Tests ran: $dt_tnum
+EOF
+}
+
+
+dt_origwd=$PWD
+cd $(dirname $0) || fatal "failed to cd to test root"
+dt_root=$PWD
+cd $dt_origwd || fatal "failed to return to original dir"
+
+while getopts ":np:" c $@; do
+ case "$c" in
+ n)
+ dt_nodefault="y"
+ ;;
+ p)
+ IFS="="
+ set -A split $OPTARG
+ IFS=" "
+ [[ ${#split[@]} -eq 2 ]] || usage "malformed -p option: $OPTARG"
+ dt_platforms[${split[0]}]=${split[1]}
+ ;;
+ :)
+ usage "option requires an argument -- $OPTARG"
+ ;;
+ *)
+ usage "invalid option -- $OPTARG"
+ ;;
+ esac
+done
+
+[[ -n $dt_nodefault && ${#dt_platforms[@]} -eq 0 ]] && fatal \
+ "no platforms specified to run tests for"
+
+shift $((OPTIND-1))
+
+determine_arch
+check_platforms
+run_tests
+goodbye
+
+[[ $dt_tfail -eq 0 ]]
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.adx.out b/usr/src/test/util-tests/tests/dis/i386/32.adx.out
new file mode 100644
index 0000000000..42c948b550
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.adx.out
@@ -0,0 +1,6 @@
+ libdis_test: 66 0f 38 f6 c3 adcx %ebx,%eax
+ libdis_test+0x5: 66 0f 38 f6 43 40 adcx 0x40(%ebx),%eax
+ libdis_test+0xb: 66 0f 38 f6 13 adcx (%ebx),%edx
+ libdis_test+0x10: f3 0f 38 f6 c3 adox %ebx,%eax
+ libdis_test+0x15: f3 0f 38 f6 43 40 adox 0x40(%ebx),%eax
+ libdis_test+0x1b: f3 0f 38 f6 13 adox (%ebx),%edx
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.adx.s b/usr/src/test/util-tests/tests/dis/i386/32.adx.s
new file mode 100644
index 0000000000..0fafec71b0
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.adx.s
@@ -0,0 +1,32 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test ADX related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ adcx %ebx, %eax
+ adcx 0x40(%ebx), %eax
+ adcx (%ebx), %edx
+
+ adox %ebx, %eax
+ adox 0x40(%ebx), %eax
+ adox (%ebx), %edx
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.aes.out b/usr/src/test/util-tests/tests/dis/i386/32.aes.out
new file mode 100644
index 0000000000..ea23b4930f
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.aes.out
@@ -0,0 +1,12 @@
+ libdis_test: 66 0f 38 dc c8 aesenc %xmm0,%xmm1
+ libdis_test+0x5: 66 0f 38 dc 0b aesenc (%ebx),%xmm1
+ libdis_test+0xa: 66 0f 38 dd c8 aesenclast %xmm0,%xmm1
+ libdis_test+0xf: 66 0f 38 dd 0b aesenclast (%ebx),%xmm1
+ libdis_test+0x14: 66 0f 38 de c8 aesdec %xmm0,%xmm1
+ libdis_test+0x19: 66 0f 38 de 0b aesdec (%ebx),%xmm1
+ libdis_test+0x1e: 66 0f 38 df c8 aesdeclast %xmm0,%xmm1
+ libdis_test+0x23: 66 0f 38 df 0b aesdeclast (%ebx),%xmm1
+ libdis_test+0x28: 66 0f 38 db c8 aesimc %xmm0,%xmm1
+ libdis_test+0x2d: 66 0f 38 db 0b aesimc (%ebx),%xmm1
+ libdis_test+0x32: 66 0f 3a df c8 42 aeskeygenassist $0x42,%xmm0,%xmm1
+ libdis_test+0x38: 66 0f 3a df 0b 42 aeskeygenassist $0x42,(%ebx),%xmm1
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.aes.s b/usr/src/test/util-tests/tests/dis/i386/32.aes.s
new file mode 100644
index 0000000000..d01e4e9e92
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.aes.s
@@ -0,0 +1,37 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test AES related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ aesenc %xmm0, %xmm1
+ aesenc (%ebx), %xmm1
+ aesenclast %xmm0, %xmm1
+ aesenclast (%ebx), %xmm1
+ aesdec %xmm0, %xmm1
+ aesdec (%ebx), %xmm1
+ aesdeclast %xmm0, %xmm1
+ aesdeclast (%ebx), %xmm1
+ aesimc %xmm0, %xmm1
+ aesimc (%ebx), %xmm1
+ aeskeygenassist $0x42, %xmm0, %xmm1
+ aeskeygenassist $0x42, (%ebx), %xmm1
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.bmi1.out b/usr/src/test/util-tests/tests/dis/i386/32.bmi1.out
new file mode 100644
index 0000000000..ca8969e815
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.bmi1.out
@@ -0,0 +1,21 @@
+ libdis_test: c4 e2 60 f2 d0 andn %eax,%ebx,%edx
+ libdis_test+0x5: c4 e2 60 f2 10 andn (%eax),%ebx,%edx
+ libdis_test+0xa: c4 e2 60 f2 50 40 andn 0x40(%eax),%ebx,%edx
+ libdis_test+0x10: c4 e2 60 f7 d0 bextr %ebx,%eax,%edx
+ libdis_test+0x15: c4 e2 60 f7 10 bextr %ebx,(%eax),%edx
+ libdis_test+0x1a: c4 e2 60 f7 50 40 bextr %ebx,0x40(%eax),%edx
+ libdis_test+0x20: c4 e2 68 f3 d8 blsi %eax,%edx
+ libdis_test+0x25: c4 e2 68 f3 18 blsi (%eax),%edx
+ libdis_test+0x2a: c4 e2 68 f3 58 40 blsi 0x40(%eax),%edx
+ libdis_test+0x30: c4 e2 68 f3 d0 blsmsk %eax,%edx
+ libdis_test+0x35: c4 e2 68 f3 10 blsmsk (%eax),%edx
+ libdis_test+0x3a: c4 e2 68 f3 50 40 blsmsk 0x40(%eax),%edx
+ libdis_test+0x40: c4 e2 68 f3 c8 blsr %eax,%edx
+ libdis_test+0x45: c4 e2 68 f3 08 blsr (%eax),%edx
+ libdis_test+0x4a: c4 e2 68 f3 48 40 blsr 0x40(%eax),%edx
+ libdis_test+0x50: 66 f3 0f bc d0 tzcnt %ax,%dx
+ libdis_test+0x55: 66 f3 0f bc 10 tzcnt (%eax),%dx
+ libdis_test+0x5a: 66 f3 0f bc 50 40 tzcnt 0x40(%eax),%dx
+ libdis_test+0x60: f3 0f bc d0 tzcnt %eax,%edx
+ libdis_test+0x64: f3 0f bc 10 tzcnt (%eax),%edx
+ libdis_test+0x68: f3 0f bc 50 40 tzcnt 0x40(%eax),%edx
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.bmi1.s b/usr/src/test/util-tests/tests/dis/i386/32.bmi1.s
new file mode 100644
index 0000000000..2f407d1fa3
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.bmi1.s
@@ -0,0 +1,46 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test bmi1 related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ andn %eax, %ebx, %edx
+ andn (%eax), %ebx, %edx
+ andn 0x40(%eax), %ebx, %edx
+ bextr %ebx, %eax, %edx
+ bextr %ebx, (%eax), %edx
+ bextr %ebx, 0x40(%eax), %edx
+ blsi %eax, %edx
+ blsi (%eax), %edx
+ blsi 0x40(%eax), %edx
+ blsmsk %eax, %edx
+ blsmsk (%eax), %edx
+ blsmsk 0x40(%eax), %edx
+ blsr %eax, %edx
+ blsr (%eax), %edx
+ blsr 0x40(%eax), %edx
+ tzcnt %ax, %dx
+ tzcnt (%eax), %dx
+ tzcnt 0x40(%eax), %dx
+ tzcnt %eax, %edx
+ tzcnt (%eax), %edx
+ tzcnt 0x40(%eax), %edx
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.bmi2.out b/usr/src/test/util-tests/tests/dis/i386/32.bmi2.out
new file mode 100644
index 0000000000..247f7f08b6
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.bmi2.out
@@ -0,0 +1,16 @@
+ libdis_test: c4 e2 78 f5 cb bzhi %eax,%ebx,%ecx
+ libdis_test+0x5: c4 e2 78 f5 0b bzhi %eax,(%ebx),%ecx
+ libdis_test+0xa: c4 e2 63 f6 c8 mulx %eax,%ebx,%ecx
+ libdis_test+0xf: c4 e2 63 f6 08 mulx (%eax),%ebx,%ecx
+ libdis_test+0x14: c4 e2 63 f5 c8 pdep %eax,%ebx,%ecx
+ libdis_test+0x19: c4 e2 63 f5 08 pdep (%eax),%ebx,%ecx
+ libdis_test+0x1e: c4 e2 62 f5 c8 pext %eax,%ebx,%ecx
+ libdis_test+0x23: c4 e2 62 f5 08 pext (%eax),%ebx,%ecx
+ libdis_test+0x28: c4 e3 7b f0 d8 03 rorx $0x3,%eax,%ebx
+ libdis_test+0x2e: c4 e3 7b f0 18 03 rorx $0x3,(%eax),%ebx
+ libdis_test+0x34: c4 e2 7a f7 cb sarx %eax,%ebx,%ecx
+ libdis_test+0x39: c4 e2 7a f7 0b sarx %eax,(%ebx),%ecx
+ libdis_test+0x3e: c4 e2 79 f7 cb shlx %eax,%ebx,%ecx
+ libdis_test+0x43: c4 e2 79 f7 0b shlx %eax,(%ebx),%ecx
+ libdis_test+0x48: c4 e2 7b f7 cb shrx %eax,%ebx,%ecx
+ libdis_test+0x4d: c4 e2 7b f7 0b shrx %eax,(%ebx),%ecx
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.bmi2.s b/usr/src/test/util-tests/tests/dis/i386/32.bmi2.s
new file mode 100644
index 0000000000..27ddf71470
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.bmi2.s
@@ -0,0 +1,41 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test bmi2 related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ bzhi %eax, %ebx, %ecx
+ bzhi %eax, (%ebx), %ecx
+ mulx %eax, %ebx, %ecx
+ mulx (%eax), %ebx, %ecx
+ pdep %eax, %ebx, %ecx
+ pdep (%eax), %ebx, %ecx
+ pext %eax, %ebx, %ecx
+ pext (%eax), %ebx, %ecx
+ rorx $0x3, %eax, %ebx
+ rorx $0x3, (%eax), %ebx
+ sarx %eax, %ebx, %ecx
+ sarx %eax, (%ebx), %ecx
+ shlx %eax, %ebx, %ecx
+ shlx %eax, (%ebx), %ecx
+ shrx %eax, %ebx, %ecx
+ shrx %eax, (%ebx), %ecx
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.fma-pd.out b/usr/src/test/util-tests/tests/dis/i386/32.fma-pd.out
new file mode 100644
index 0000000000..bd62bbcac9
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.fma-pd.out
@@ -0,0 +1,72 @@
+ libdis_test: c4 e2 f1 98 d0 vfmadd132pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x5: c4 e2 f1 98 10 vfmadd132pd (%eax),%xmm1,%xmm2
+ libdis_test+0xa: c4 e2 f5 98 d0 vfmadd132pd %ymm0,%ymm1,%ymm2
+ libdis_test+0xf: c4 e2 f5 98 10 vfmadd132pd (%eax),%ymm1,%ymm2
+ libdis_test+0x14: c4 e2 f1 a8 d0 vfmadd213pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x19: c4 e2 f1 a8 10 vfmadd213pd (%eax),%xmm1,%xmm2
+ libdis_test+0x1e: c4 e2 f5 a8 d0 vfmadd213pd %ymm0,%ymm1,%ymm2
+ libdis_test+0x23: c4 e2 f5 a8 10 vfmadd213pd (%eax),%ymm1,%ymm2
+ libdis_test+0x28: c4 e2 f1 b8 d0 vfmadd231pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x2d: c4 e2 f1 b8 10 vfmadd231pd (%eax),%xmm1,%xmm2
+ libdis_test+0x32: c4 e2 f5 b8 d0 vfmadd231pd %ymm0,%ymm1,%ymm2
+ libdis_test+0x37: c4 e2 f5 b8 10 vfmadd231pd (%eax),%ymm1,%ymm2
+ libdis_test+0x3c: c4 e2 f1 96 d0 vfmaddsub132pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x41: c4 e2 f1 96 10 vfmaddsub132pd (%eax),%xmm1,%xmm2
+ libdis_test+0x46: c4 e2 f5 96 d0 vfmaddsub132pd %ymm0,%ymm1,%ymm2
+ libdis_test+0x4b: c4 e2 f5 96 10 vfmaddsub132pd (%eax),%ymm1,%ymm2
+ libdis_test+0x50: c4 e2 f1 a6 d0 vfmaddsub213pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x55: c4 e2 f1 a6 10 vfmaddsub213pd (%eax),%xmm1,%xmm2
+ libdis_test+0x5a: c4 e2 f5 a6 d0 vfmaddsub213pd %ymm0,%ymm1,%ymm2
+ libdis_test+0x5f: c4 e2 f5 a6 10 vfmaddsub213pd (%eax),%ymm1,%ymm2
+ libdis_test+0x64: c4 e2 f1 b6 d0 vfmaddsub231pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x69: c4 e2 f1 b6 10 vfmaddsub231pd (%eax),%xmm1,%xmm2
+ libdis_test+0x6e: c4 e2 f5 b6 d0 vfmaddsub231pd %ymm0,%ymm1,%ymm2
+ libdis_test+0x73: c4 e2 f5 b6 10 vfmaddsub231pd (%eax),%ymm1,%ymm2
+ libdis_test+0x78: c4 e2 f1 9a d0 vfmsub132pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x7d: c4 e2 f1 9a 10 vfmsub132pd (%eax),%xmm1,%xmm2
+ libdis_test+0x82: c4 e2 f5 9a d0 vfmsub132pd %ymm0,%ymm1,%ymm2
+ libdis_test+0x87: c4 e2 f5 9a 10 vfmsub132pd (%eax),%ymm1,%ymm2
+ libdis_test+0x8c: c4 e2 f1 aa d0 vfmsub213pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x91: c4 e2 f1 aa 10 vfmsub213pd (%eax),%xmm1,%xmm2
+ libdis_test+0x96: c4 e2 f5 aa d0 vfmsub213pd %ymm0,%ymm1,%ymm2
+ libdis_test+0x9b: c4 e2 f5 aa 10 vfmsub213pd (%eax),%ymm1,%ymm2
+ libdis_test+0xa0: c4 e2 f1 ba d0 vfmsub231pd %xmm0,%xmm1,%xmm2
+ libdis_test+0xa5: c4 e2 f1 ba 10 vfmsub231pd (%eax),%xmm1,%xmm2
+ libdis_test+0xaa: c4 e2 f5 ba d0 vfmsub231pd %ymm0,%ymm1,%ymm2
+ libdis_test+0xaf: c4 e2 f5 ba 10 vfmsub231pd (%eax),%ymm1,%ymm2
+ libdis_test+0xb4: c4 e2 f1 97 d0 vfmsubadd132pd %xmm0,%xmm1,%xmm2
+ libdis_test+0xb9: c4 e2 f1 97 10 vfmsubadd132pd (%eax),%xmm1,%xmm2
+ libdis_test+0xbe: c4 e2 f5 97 d0 vfmsubadd132pd %ymm0,%ymm1,%ymm2
+ libdis_test+0xc3: c4 e2 f5 97 10 vfmsubadd132pd (%eax),%ymm1,%ymm2
+ libdis_test+0xc8: c4 e2 f1 a7 d0 vfmsubadd213pd %xmm0,%xmm1,%xmm2
+ libdis_test+0xcd: c4 e2 f1 a7 10 vfmsubadd213pd (%eax),%xmm1,%xmm2
+ libdis_test+0xd2: c4 e2 f5 a7 d0 vfmsubadd213pd %ymm0,%ymm1,%ymm2
+ libdis_test+0xd7: c4 e2 f5 a7 10 vfmsubadd213pd (%eax),%ymm1,%ymm2
+ libdis_test+0xdc: c4 e2 f1 b7 d0 vfmsubadd231pd %xmm0,%xmm1,%xmm2
+ libdis_test+0xe1: c4 e2 f1 b7 10 vfmsubadd231pd (%eax),%xmm1,%xmm2
+ libdis_test+0xe6: c4 e2 f5 b7 d0 vfmsubadd231pd %ymm0,%ymm1,%ymm2
+ libdis_test+0xeb: c4 e2 f5 b7 10 vfmsubadd231pd (%eax),%ymm1,%ymm2
+ libdis_test+0xf0: c4 e2 f1 9c d0 vfnmadd132pd %xmm0,%xmm1,%xmm2
+ libdis_test+0xf5: c4 e2 f1 9c 10 vfnmadd132pd (%eax),%xmm1,%xmm2
+ libdis_test+0xfa: c4 e2 f5 9c d0 vfnmadd132pd %ymm0,%ymm1,%ymm2
+ libdis_test+0xff: c4 e2 f5 9c 10 vfnmadd132pd (%eax),%ymm1,%ymm2
+ libdis_test+0x104: c4 e2 f1 ac d0 vfnmadd213pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x109: c4 e2 f1 ac 10 vfnmadd213pd (%eax),%xmm1,%xmm2
+ libdis_test+0x10e: c4 e2 f5 ac d0 vfnmadd213pd %ymm0,%ymm1,%ymm2
+ libdis_test+0x113: c4 e2 f5 ac 10 vfnmadd213pd (%eax),%ymm1,%ymm2
+ libdis_test+0x118: c4 e2 f1 bc d0 vfnmadd231pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x11d: c4 e2 f1 bc 10 vfnmadd231pd (%eax),%xmm1,%xmm2
+ libdis_test+0x122: c4 e2 f5 bc d0 vfnmadd231pd %ymm0,%ymm1,%ymm2
+ libdis_test+0x127: c4 e2 f5 bc 10 vfnmadd231pd (%eax),%ymm1,%ymm2
+ libdis_test+0x12c: c4 e2 f1 9e d0 vfnmsub132pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x131: c4 e2 f1 9e 10 vfnmsub132pd (%eax),%xmm1,%xmm2
+ libdis_test+0x136: c4 e2 f5 9e d0 vfnmsub132pd %ymm0,%ymm1,%ymm2
+ libdis_test+0x13b: c4 e2 f5 9e 10 vfnmsub132pd (%eax),%ymm1,%ymm2
+ libdis_test+0x140: c4 e2 f1 ae d0 vfnmsub213pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x145: c4 e2 f1 ae 10 vfnmsub213pd (%eax),%xmm1,%xmm2
+ libdis_test+0x14a: c4 e2 f5 ae d0 vfnmsub213pd %ymm0,%ymm1,%ymm2
+ libdis_test+0x14f: c4 e2 f5 ae 10 vfnmsub213pd (%eax),%ymm1,%ymm2
+ libdis_test+0x154: c4 e2 f1 be d0 vfnmsub231pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x159: c4 e2 f1 be 10 vfnmsub231pd (%eax),%xmm1,%xmm2
+ libdis_test+0x15e: c4 e2 f5 be d0 vfnmsub231pd %ymm0,%ymm1,%ymm2
+ libdis_test+0x163: c4 e2 f5 be 10 vfnmsub231pd (%eax),%ymm1,%ymm2
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.fma-pd.s b/usr/src/test/util-tests/tests/dis/i386/32.fma-pd.s
new file mode 100644
index 0000000000..e9c1319180
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.fma-pd.s
@@ -0,0 +1,97 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test FMA3 -PD related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ vfmadd132pd %xmm0, %xmm1, %xmm2
+ vfmadd132pd (%eax), %xmm1, %xmm2
+ vfmadd132pd %ymm0, %ymm1, %ymm2
+ vfmadd132pd (%eax), %ymm1, %ymm2
+ vfmadd213pd %xmm0, %xmm1, %xmm2
+ vfmadd213pd (%eax), %xmm1, %xmm2
+ vfmadd213pd %ymm0, %ymm1, %ymm2
+ vfmadd213pd (%eax), %ymm1, %ymm2
+ vfmadd231pd %xmm0, %xmm1, %xmm2
+ vfmadd231pd (%eax), %xmm1, %xmm2
+ vfmadd231pd %ymm0, %ymm1, %ymm2
+ vfmadd231pd (%eax), %ymm1, %ymm2
+ vfmaddsub132pd %xmm0, %xmm1, %xmm2
+ vfmaddsub132pd (%eax), %xmm1, %xmm2
+ vfmaddsub132pd %ymm0, %ymm1, %ymm2
+ vfmaddsub132pd (%eax), %ymm1, %ymm2
+ vfmaddsub213pd %xmm0, %xmm1, %xmm2
+ vfmaddsub213pd (%eax), %xmm1, %xmm2
+ vfmaddsub213pd %ymm0, %ymm1, %ymm2
+ vfmaddsub213pd (%eax), %ymm1, %ymm2
+ vfmaddsub231pd %xmm0, %xmm1, %xmm2
+ vfmaddsub231pd (%eax), %xmm1, %xmm2
+ vfmaddsub231pd %ymm0, %ymm1, %ymm2
+ vfmaddsub231pd (%eax), %ymm1, %ymm2
+ vfmsub132pd %xmm0, %xmm1, %xmm2
+ vfmsub132pd (%eax), %xmm1, %xmm2
+ vfmsub132pd %ymm0, %ymm1, %ymm2
+ vfmsub132pd (%eax), %ymm1, %ymm2
+ vfmsub213pd %xmm0, %xmm1, %xmm2
+ vfmsub213pd (%eax), %xmm1, %xmm2
+ vfmsub213pd %ymm0, %ymm1, %ymm2
+ vfmsub213pd (%eax), %ymm1, %ymm2
+ vfmsub231pd %xmm0, %xmm1, %xmm2
+ vfmsub231pd (%eax), %xmm1, %xmm2
+ vfmsub231pd %ymm0, %ymm1, %ymm2
+ vfmsub231pd (%eax), %ymm1, %ymm2
+ vfmsubadd132pd %xmm0, %xmm1, %xmm2
+ vfmsubadd132pd (%eax), %xmm1, %xmm2
+ vfmsubadd132pd %ymm0, %ymm1, %ymm2
+ vfmsubadd132pd (%eax), %ymm1, %ymm2
+ vfmsubadd213pd %xmm0, %xmm1, %xmm2
+ vfmsubadd213pd (%eax), %xmm1, %xmm2
+ vfmsubadd213pd %ymm0, %ymm1, %ymm2
+ vfmsubadd213pd (%eax), %ymm1, %ymm2
+ vfmsubadd231pd %xmm0, %xmm1, %xmm2
+ vfmsubadd231pd (%eax), %xmm1, %xmm2
+ vfmsubadd231pd %ymm0, %ymm1, %ymm2
+ vfmsubadd231pd (%eax), %ymm1, %ymm2
+ vfnmadd132pd %xmm0, %xmm1, %xmm2
+ vfnmadd132pd (%eax), %xmm1, %xmm2
+ vfnmadd132pd %ymm0, %ymm1, %ymm2
+ vfnmadd132pd (%eax), %ymm1, %ymm2
+ vfnmadd213pd %xmm0, %xmm1, %xmm2
+ vfnmadd213pd (%eax), %xmm1, %xmm2
+ vfnmadd213pd %ymm0, %ymm1, %ymm2
+ vfnmadd213pd (%eax), %ymm1, %ymm2
+ vfnmadd231pd %xmm0, %xmm1, %xmm2
+ vfnmadd231pd (%eax), %xmm1, %xmm2
+ vfnmadd231pd %ymm0, %ymm1, %ymm2
+ vfnmadd231pd (%eax), %ymm1, %ymm2
+ vfnmsub132pd %xmm0, %xmm1, %xmm2
+ vfnmsub132pd (%eax), %xmm1, %xmm2
+ vfnmsub132pd %ymm0, %ymm1, %ymm2
+ vfnmsub132pd (%eax), %ymm1, %ymm2
+ vfnmsub213pd %xmm0, %xmm1, %xmm2
+ vfnmsub213pd (%eax), %xmm1, %xmm2
+ vfnmsub213pd %ymm0, %ymm1, %ymm2
+ vfnmsub213pd (%eax), %ymm1, %ymm2
+ vfnmsub231pd %xmm0, %xmm1, %xmm2
+ vfnmsub231pd (%eax), %xmm1, %xmm2
+ vfnmsub231pd %ymm0, %ymm1, %ymm2
+ vfnmsub231pd (%eax), %ymm1, %ymm2
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.fma-ps.out b/usr/src/test/util-tests/tests/dis/i386/32.fma-ps.out
new file mode 100644
index 0000000000..453bd81552
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.fma-ps.out
@@ -0,0 +1,72 @@
+ libdis_test: c4 e2 71 98 d0 vfmadd132ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x5: c4 e2 71 98 10 vfmadd132ps (%eax),%xmm1,%xmm2
+ libdis_test+0xa: c4 e2 75 98 d0 vfmadd132ps %ymm0,%ymm1,%ymm2
+ libdis_test+0xf: c4 e2 75 98 10 vfmadd132ps (%eax),%ymm1,%ymm2
+ libdis_test+0x14: c4 e2 71 a8 d0 vfmadd213ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x19: c4 e2 71 a8 10 vfmadd213ps (%eax),%xmm1,%xmm2
+ libdis_test+0x1e: c4 e2 75 a8 d0 vfmadd213ps %ymm0,%ymm1,%ymm2
+ libdis_test+0x23: c4 e2 75 a8 10 vfmadd213ps (%eax),%ymm1,%ymm2
+ libdis_test+0x28: c4 e2 71 b8 d0 vfmadd231ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x2d: c4 e2 71 b8 10 vfmadd231ps (%eax),%xmm1,%xmm2
+ libdis_test+0x32: c4 e2 75 b8 d0 vfmadd231ps %ymm0,%ymm1,%ymm2
+ libdis_test+0x37: c4 e2 75 b8 10 vfmadd231ps (%eax),%ymm1,%ymm2
+ libdis_test+0x3c: c4 e2 71 96 d0 vfmaddsub132ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x41: c4 e2 71 96 10 vfmaddsub132ps (%eax),%xmm1,%xmm2
+ libdis_test+0x46: c4 e2 75 96 d0 vfmaddsub132ps %ymm0,%ymm1,%ymm2
+ libdis_test+0x4b: c4 e2 75 96 10 vfmaddsub132ps (%eax),%ymm1,%ymm2
+ libdis_test+0x50: c4 e2 71 a6 d0 vfmaddsub213ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x55: c4 e2 71 a6 10 vfmaddsub213ps (%eax),%xmm1,%xmm2
+ libdis_test+0x5a: c4 e2 75 a6 d0 vfmaddsub213ps %ymm0,%ymm1,%ymm2
+ libdis_test+0x5f: c4 e2 75 a6 10 vfmaddsub213ps (%eax),%ymm1,%ymm2
+ libdis_test+0x64: c4 e2 71 b6 d0 vfmaddsub231ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x69: c4 e2 71 b6 10 vfmaddsub231ps (%eax),%xmm1,%xmm2
+ libdis_test+0x6e: c4 e2 75 b6 d0 vfmaddsub231ps %ymm0,%ymm1,%ymm2
+ libdis_test+0x73: c4 e2 75 b6 10 vfmaddsub231ps (%eax),%ymm1,%ymm2
+ libdis_test+0x78: c4 e2 71 9a d0 vfmsub132ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x7d: c4 e2 71 9a 10 vfmsub132ps (%eax),%xmm1,%xmm2
+ libdis_test+0x82: c4 e2 75 9a d0 vfmsub132ps %ymm0,%ymm1,%ymm2
+ libdis_test+0x87: c4 e2 75 9a 10 vfmsub132ps (%eax),%ymm1,%ymm2
+ libdis_test+0x8c: c4 e2 71 aa d0 vfmsub213ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x91: c4 e2 71 aa 10 vfmsub213ps (%eax),%xmm1,%xmm2
+ libdis_test+0x96: c4 e2 75 aa d0 vfmsub213ps %ymm0,%ymm1,%ymm2
+ libdis_test+0x9b: c4 e2 75 aa 10 vfmsub213ps (%eax),%ymm1,%ymm2
+ libdis_test+0xa0: c4 e2 71 ba d0 vfmsub231ps %xmm0,%xmm1,%xmm2
+ libdis_test+0xa5: c4 e2 71 ba 10 vfmsub231ps (%eax),%xmm1,%xmm2
+ libdis_test+0xaa: c4 e2 75 ba d0 vfmsub231ps %ymm0,%ymm1,%ymm2
+ libdis_test+0xaf: c4 e2 75 ba 10 vfmsub231ps (%eax),%ymm1,%ymm2
+ libdis_test+0xb4: c4 e2 71 97 d0 vfmsubadd132ps %xmm0,%xmm1,%xmm2
+ libdis_test+0xb9: c4 e2 71 97 10 vfmsubadd132ps (%eax),%xmm1,%xmm2
+ libdis_test+0xbe: c4 e2 75 97 d0 vfmsubadd132ps %ymm0,%ymm1,%ymm2
+ libdis_test+0xc3: c4 e2 75 97 10 vfmsubadd132ps (%eax),%ymm1,%ymm2
+ libdis_test+0xc8: c4 e2 71 a7 d0 vfmsubadd213ps %xmm0,%xmm1,%xmm2
+ libdis_test+0xcd: c4 e2 71 a7 10 vfmsubadd213ps (%eax),%xmm1,%xmm2
+ libdis_test+0xd2: c4 e2 75 a7 d0 vfmsubadd213ps %ymm0,%ymm1,%ymm2
+ libdis_test+0xd7: c4 e2 75 a7 10 vfmsubadd213ps (%eax),%ymm1,%ymm2
+ libdis_test+0xdc: c4 e2 71 b7 d0 vfmsubadd231ps %xmm0,%xmm1,%xmm2
+ libdis_test+0xe1: c4 e2 71 b7 10 vfmsubadd231ps (%eax),%xmm1,%xmm2
+ libdis_test+0xe6: c4 e2 75 b7 d0 vfmsubadd231ps %ymm0,%ymm1,%ymm2
+ libdis_test+0xeb: c4 e2 75 b7 10 vfmsubadd231ps (%eax),%ymm1,%ymm2
+ libdis_test+0xf0: c4 e2 71 9c d0 vfnmadd132ps %xmm0,%xmm1,%xmm2
+ libdis_test+0xf5: c4 e2 71 9c 10 vfnmadd132ps (%eax),%xmm1,%xmm2
+ libdis_test+0xfa: c4 e2 75 9c d0 vfnmadd132ps %ymm0,%ymm1,%ymm2
+ libdis_test+0xff: c4 e2 75 9c 10 vfnmadd132ps (%eax),%ymm1,%ymm2
+ libdis_test+0x104: c4 e2 71 ac d0 vfnmadd213ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x109: c4 e2 71 ac 10 vfnmadd213ps (%eax),%xmm1,%xmm2
+ libdis_test+0x10e: c4 e2 75 ac d0 vfnmadd213ps %ymm0,%ymm1,%ymm2
+ libdis_test+0x113: c4 e2 75 ac 10 vfnmadd213ps (%eax),%ymm1,%ymm2
+ libdis_test+0x118: c4 e2 71 bc d0 vfnmadd231ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x11d: c4 e2 71 bc 10 vfnmadd231ps (%eax),%xmm1,%xmm2
+ libdis_test+0x122: c4 e2 75 bc d0 vfnmadd231ps %ymm0,%ymm1,%ymm2
+ libdis_test+0x127: c4 e2 75 bc 10 vfnmadd231ps (%eax),%ymm1,%ymm2
+ libdis_test+0x12c: c4 e2 71 9e d0 vfnmsub132ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x131: c4 e2 71 9e 10 vfnmsub132ps (%eax),%xmm1,%xmm2
+ libdis_test+0x136: c4 e2 75 9e d0 vfnmsub132ps %ymm0,%ymm1,%ymm2
+ libdis_test+0x13b: c4 e2 75 9e 10 vfnmsub132ps (%eax),%ymm1,%ymm2
+ libdis_test+0x140: c4 e2 71 ae d0 vfnmsub213ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x145: c4 e2 71 ae 10 vfnmsub213ps (%eax),%xmm1,%xmm2
+ libdis_test+0x14a: c4 e2 75 ae d0 vfnmsub213ps %ymm0,%ymm1,%ymm2
+ libdis_test+0x14f: c4 e2 75 ae 10 vfnmsub213ps (%eax),%ymm1,%ymm2
+ libdis_test+0x154: c4 e2 71 be d0 vfnmsub231ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x159: c4 e2 71 be 10 vfnmsub231ps (%eax),%xmm1,%xmm2
+ libdis_test+0x15e: c4 e2 75 be d0 vfnmsub231ps %ymm0,%ymm1,%ymm2
+ libdis_test+0x163: c4 e2 75 be 10 vfnmsub231ps (%eax),%ymm1,%ymm2
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.fma-ps.s b/usr/src/test/util-tests/tests/dis/i386/32.fma-ps.s
new file mode 100644
index 0000000000..1a9ecba282
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.fma-ps.s
@@ -0,0 +1,97 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test FMA3 -PS related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ vfmadd132ps %xmm0, %xmm1, %xmm2
+ vfmadd132ps (%eax), %xmm1, %xmm2
+ vfmadd132ps %ymm0, %ymm1, %ymm2
+ vfmadd132ps (%eax), %ymm1, %ymm2
+ vfmadd213ps %xmm0, %xmm1, %xmm2
+ vfmadd213ps (%eax), %xmm1, %xmm2
+ vfmadd213ps %ymm0, %ymm1, %ymm2
+ vfmadd213ps (%eax), %ymm1, %ymm2
+ vfmadd231ps %xmm0, %xmm1, %xmm2
+ vfmadd231ps (%eax), %xmm1, %xmm2
+ vfmadd231ps %ymm0, %ymm1, %ymm2
+ vfmadd231ps (%eax), %ymm1, %ymm2
+ vfmaddsub132ps %xmm0, %xmm1, %xmm2
+ vfmaddsub132ps (%eax), %xmm1, %xmm2
+ vfmaddsub132ps %ymm0, %ymm1, %ymm2
+ vfmaddsub132ps (%eax), %ymm1, %ymm2
+ vfmaddsub213ps %xmm0, %xmm1, %xmm2
+ vfmaddsub213ps (%eax), %xmm1, %xmm2
+ vfmaddsub213ps %ymm0, %ymm1, %ymm2
+ vfmaddsub213ps (%eax), %ymm1, %ymm2
+ vfmaddsub231ps %xmm0, %xmm1, %xmm2
+ vfmaddsub231ps (%eax), %xmm1, %xmm2
+ vfmaddsub231ps %ymm0, %ymm1, %ymm2
+ vfmaddsub231ps (%eax), %ymm1, %ymm2
+ vfmsub132ps %xmm0, %xmm1, %xmm2
+ vfmsub132ps (%eax), %xmm1, %xmm2
+ vfmsub132ps %ymm0, %ymm1, %ymm2
+ vfmsub132ps (%eax), %ymm1, %ymm2
+ vfmsub213ps %xmm0, %xmm1, %xmm2
+ vfmsub213ps (%eax), %xmm1, %xmm2
+ vfmsub213ps %ymm0, %ymm1, %ymm2
+ vfmsub213ps (%eax), %ymm1, %ymm2
+ vfmsub231ps %xmm0, %xmm1, %xmm2
+ vfmsub231ps (%eax), %xmm1, %xmm2
+ vfmsub231ps %ymm0, %ymm1, %ymm2
+ vfmsub231ps (%eax), %ymm1, %ymm2
+ vfmsubadd132ps %xmm0, %xmm1, %xmm2
+ vfmsubadd132ps (%eax), %xmm1, %xmm2
+ vfmsubadd132ps %ymm0, %ymm1, %ymm2
+ vfmsubadd132ps (%eax), %ymm1, %ymm2
+ vfmsubadd213ps %xmm0, %xmm1, %xmm2
+ vfmsubadd213ps (%eax), %xmm1, %xmm2
+ vfmsubadd213ps %ymm0, %ymm1, %ymm2
+ vfmsubadd213ps (%eax), %ymm1, %ymm2
+ vfmsubadd231ps %xmm0, %xmm1, %xmm2
+ vfmsubadd231ps (%eax), %xmm1, %xmm2
+ vfmsubadd231ps %ymm0, %ymm1, %ymm2
+ vfmsubadd231ps (%eax), %ymm1, %ymm2
+ vfnmadd132ps %xmm0, %xmm1, %xmm2
+ vfnmadd132ps (%eax), %xmm1, %xmm2
+ vfnmadd132ps %ymm0, %ymm1, %ymm2
+ vfnmadd132ps (%eax), %ymm1, %ymm2
+ vfnmadd213ps %xmm0, %xmm1, %xmm2
+ vfnmadd213ps (%eax), %xmm1, %xmm2
+ vfnmadd213ps %ymm0, %ymm1, %ymm2
+ vfnmadd213ps (%eax), %ymm1, %ymm2
+ vfnmadd231ps %xmm0, %xmm1, %xmm2
+ vfnmadd231ps (%eax), %xmm1, %xmm2
+ vfnmadd231ps %ymm0, %ymm1, %ymm2
+ vfnmadd231ps (%eax), %ymm1, %ymm2
+ vfnmsub132ps %xmm0, %xmm1, %xmm2
+ vfnmsub132ps (%eax), %xmm1, %xmm2
+ vfnmsub132ps %ymm0, %ymm1, %ymm2
+ vfnmsub132ps (%eax), %ymm1, %ymm2
+ vfnmsub213ps %xmm0, %xmm1, %xmm2
+ vfnmsub213ps (%eax), %xmm1, %xmm2
+ vfnmsub213ps %ymm0, %ymm1, %ymm2
+ vfnmsub213ps (%eax), %ymm1, %ymm2
+ vfnmsub231ps %xmm0, %xmm1, %xmm2
+ vfnmsub231ps (%eax), %xmm1, %xmm2
+ vfnmsub231ps %ymm0, %ymm1, %ymm2
+ vfnmsub231ps (%eax), %ymm1, %ymm2
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.fma-sd.out b/usr/src/test/util-tests/tests/dis/i386/32.fma-sd.out
new file mode 100644
index 0000000000..4e44b9155e
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.fma-sd.out
@@ -0,0 +1,24 @@
+ libdis_test: c4 e2 f1 99 d0 vfmadd132sd %xmm0,%xmm1,%xmm2
+ libdis_test+0x5: c4 e2 f1 99 10 vfmadd132sd (%eax),%xmm1,%xmm2
+ libdis_test+0xa: c4 e2 f1 a9 d0 vfmadd213sd %xmm0,%xmm1,%xmm2
+ libdis_test+0xf: c4 e2 f1 a9 10 vfmadd213sd (%eax),%xmm1,%xmm2
+ libdis_test+0x14: c4 e2 f1 b9 d0 vfmadd231sd %xmm0,%xmm1,%xmm2
+ libdis_test+0x19: c4 e2 f1 b9 10 vfmadd231sd (%eax),%xmm1,%xmm2
+ libdis_test+0x1e: c4 e2 f1 9b d0 vfmsub132sd %xmm0,%xmm1,%xmm2
+ libdis_test+0x23: c4 e2 f1 9b 10 vfmsub132sd (%eax),%xmm1,%xmm2
+ libdis_test+0x28: c4 e2 f1 ab d0 vfmsub213sd %xmm0,%xmm1,%xmm2
+ libdis_test+0x2d: c4 e2 f1 ab 10 vfmsub213sd (%eax),%xmm1,%xmm2
+ libdis_test+0x32: c4 e2 f1 bb d0 vfmsub231sd %xmm0,%xmm1,%xmm2
+ libdis_test+0x37: c4 e2 f1 bb 10 vfmsub231sd (%eax),%xmm1,%xmm2
+ libdis_test+0x3c: c4 e2 f1 9d d0 vfnmadd132sd %xmm0,%xmm1,%xmm2
+ libdis_test+0x41: c4 e2 f1 9d 10 vfnmadd132sd (%eax),%xmm1,%xmm2
+ libdis_test+0x46: c4 e2 f1 ad d0 vfnmadd213sd %xmm0,%xmm1,%xmm2
+ libdis_test+0x4b: c4 e2 f1 ad 10 vfnmadd213sd (%eax),%xmm1,%xmm2
+ libdis_test+0x50: c4 e2 f1 bd d0 vfnmadd231sd %xmm0,%xmm1,%xmm2
+ libdis_test+0x55: c4 e2 f1 bd 10 vfnmadd231sd (%eax),%xmm1,%xmm2
+ libdis_test+0x5a: c4 e2 f1 9f d0 vfnmsub132sd %xmm0,%xmm1,%xmm2
+ libdis_test+0x5f: c4 e2 f1 9f 10 vfnmsub132sd (%eax),%xmm1,%xmm2
+ libdis_test+0x64: c4 e2 f1 af d0 vfnmsub213sd %xmm0,%xmm1,%xmm2
+ libdis_test+0x69: c4 e2 f1 af 10 vfnmsub213sd (%eax),%xmm1,%xmm2
+ libdis_test+0x6e: c4 e2 f1 bf d0 vfnmsub231sd %xmm0,%xmm1,%xmm2
+ libdis_test+0x73: c4 e2 f1 bf 10 vfnmsub231sd (%eax),%xmm1,%xmm2
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.fma-sd.s b/usr/src/test/util-tests/tests/dis/i386/32.fma-sd.s
new file mode 100644
index 0000000000..25f60a53ad
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.fma-sd.s
@@ -0,0 +1,49 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test ADX related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ vfmadd132sd %xmm0, %xmm1, %xmm2
+ vfmadd132sd (%eax), %xmm1, %xmm2
+ vfmadd213sd %xmm0, %xmm1, %xmm2
+ vfmadd213sd (%eax), %xmm1, %xmm2
+ vfmadd231sd %xmm0, %xmm1, %xmm2
+ vfmadd231sd (%eax), %xmm1, %xmm2
+ vfmsub132sd %xmm0, %xmm1, %xmm2
+ vfmsub132sd (%eax), %xmm1, %xmm2
+ vfmsub213sd %xmm0, %xmm1, %xmm2
+ vfmsub213sd (%eax), %xmm1, %xmm2
+ vfmsub231sd %xmm0, %xmm1, %xmm2
+ vfmsub231sd (%eax), %xmm1, %xmm2
+ vfnmadd132sd %xmm0, %xmm1, %xmm2
+ vfnmadd132sd (%eax), %xmm1, %xmm2
+ vfnmadd213sd %xmm0, %xmm1, %xmm2
+ vfnmadd213sd (%eax), %xmm1, %xmm2
+ vfnmadd231sd %xmm0, %xmm1, %xmm2
+ vfnmadd231sd (%eax), %xmm1, %xmm2
+ vfnmsub132sd %xmm0, %xmm1, %xmm2
+ vfnmsub132sd (%eax), %xmm1, %xmm2
+ vfnmsub213sd %xmm0, %xmm1, %xmm2
+ vfnmsub213sd (%eax), %xmm1, %xmm2
+ vfnmsub231sd %xmm0, %xmm1, %xmm2
+ vfnmsub231sd (%eax), %xmm1, %xmm2
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.fma-ss.out b/usr/src/test/util-tests/tests/dis/i386/32.fma-ss.out
new file mode 100644
index 0000000000..03fc2f2dec
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.fma-ss.out
@@ -0,0 +1,24 @@
+ libdis_test: c4 e2 71 99 d0 vfmadd132ss %xmm0,%xmm1,%xmm2
+ libdis_test+0x5: c4 e2 71 99 10 vfmadd132ss (%eax),%xmm1,%xmm2
+ libdis_test+0xa: c4 e2 71 a9 d0 vfmadd213ss %xmm0,%xmm1,%xmm2
+ libdis_test+0xf: c4 e2 71 a9 10 vfmadd213ss (%eax),%xmm1,%xmm2
+ libdis_test+0x14: c4 e2 71 b9 d0 vfmadd231ss %xmm0,%xmm1,%xmm2
+ libdis_test+0x19: c4 e2 71 b9 10 vfmadd231ss (%eax),%xmm1,%xmm2
+ libdis_test+0x1e: c4 e2 71 9b d0 vfmsub132ss %xmm0,%xmm1,%xmm2
+ libdis_test+0x23: c4 e2 71 9b 10 vfmsub132ss (%eax),%xmm1,%xmm2
+ libdis_test+0x28: c4 e2 71 ab d0 vfmsub213ss %xmm0,%xmm1,%xmm2
+ libdis_test+0x2d: c4 e2 71 ab 10 vfmsub213ss (%eax),%xmm1,%xmm2
+ libdis_test+0x32: c4 e2 71 bb d0 vfmsub231ss %xmm0,%xmm1,%xmm2
+ libdis_test+0x37: c4 e2 71 bb 10 vfmsub231ss (%eax),%xmm1,%xmm2
+ libdis_test+0x3c: c4 e2 71 9d d0 vfnmadd132ss %xmm0,%xmm1,%xmm2
+ libdis_test+0x41: c4 e2 71 9d 10 vfnmadd132ss (%eax),%xmm1,%xmm2
+ libdis_test+0x46: c4 e2 71 ad d0 vfnmadd213ss %xmm0,%xmm1,%xmm2
+ libdis_test+0x4b: c4 e2 71 ad 10 vfnmadd213ss (%eax),%xmm1,%xmm2
+ libdis_test+0x50: c4 e2 71 bd d0 vfnmadd231ss %xmm0,%xmm1,%xmm2
+ libdis_test+0x55: c4 e2 71 bd 10 vfnmadd231ss (%eax),%xmm1,%xmm2
+ libdis_test+0x5a: c4 e2 71 9f d0 vfnmsub132ss %xmm0,%xmm1,%xmm2
+ libdis_test+0x5f: c4 e2 71 9f 10 vfnmsub132ss (%eax),%xmm1,%xmm2
+ libdis_test+0x64: c4 e2 71 af d0 vfnmsub213ss %xmm0,%xmm1,%xmm2
+ libdis_test+0x69: c4 e2 71 af 10 vfnmsub213ss (%eax),%xmm1,%xmm2
+ libdis_test+0x6e: c4 e2 71 bf d0 vfnmsub231ss %xmm0,%xmm1,%xmm2
+ libdis_test+0x73: c4 e2 71 bf 10 vfnmsub231ss (%eax),%xmm1,%xmm2
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.fma-ss.s b/usr/src/test/util-tests/tests/dis/i386/32.fma-ss.s
new file mode 100644
index 0000000000..2c9fff552e
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.fma-ss.s
@@ -0,0 +1,49 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test ADX related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ vfmadd132ss %xmm0, %xmm1, %xmm2
+ vfmadd132ss (%eax), %xmm1, %xmm2
+ vfmadd213ss %xmm0, %xmm1, %xmm2
+ vfmadd213ss (%eax), %xmm1, %xmm2
+ vfmadd231ss %xmm0, %xmm1, %xmm2
+ vfmadd231ss (%eax), %xmm1, %xmm2
+ vfmsub132ss %xmm0, %xmm1, %xmm2
+ vfmsub132ss (%eax), %xmm1, %xmm2
+ vfmsub213ss %xmm0, %xmm1, %xmm2
+ vfmsub213ss (%eax), %xmm1, %xmm2
+ vfmsub231ss %xmm0, %xmm1, %xmm2
+ vfmsub231ss (%eax), %xmm1, %xmm2
+ vfnmadd132ss %xmm0, %xmm1, %xmm2
+ vfnmadd132ss (%eax), %xmm1, %xmm2
+ vfnmadd213ss %xmm0, %xmm1, %xmm2
+ vfnmadd213ss (%eax), %xmm1, %xmm2
+ vfnmadd231ss %xmm0, %xmm1, %xmm2
+ vfnmadd231ss (%eax), %xmm1, %xmm2
+ vfnmsub132ss %xmm0, %xmm1, %xmm2
+ vfnmsub132ss (%eax), %xmm1, %xmm2
+ vfnmsub213ss %xmm0, %xmm1, %xmm2
+ vfnmsub213ss (%eax), %xmm1, %xmm2
+ vfnmsub231ss %xmm0, %xmm1, %xmm2
+ vfnmsub231ss (%eax), %xmm1, %xmm2
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.lzcnt.out b/usr/src/test/util-tests/tests/dis/i386/32.lzcnt.out
new file mode 100644
index 0000000000..ddf0fe3981
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.lzcnt.out
@@ -0,0 +1,3 @@
+ libdis_test: 66 f3 0f bd d8 lzcntw %ax,%bx
+ libdis_test+0x5: f3 0f bd d8 lzcntl %eax,%ebx
+ libdis_test+0x9: f3 0f bd 18 lzcntl (%eax),%ebx
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.lzcnt.s b/usr/src/test/util-tests/tests/dis/i386/32.lzcnt.s
new file mode 100644
index 0000000000..9d79f11a6c
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.lzcnt.s
@@ -0,0 +1,28 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test lzcnt related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ lzcntw %ax, %bx
+ lzcntl %eax, %ebx
+ lzcntl (%eax), %ebx
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.popcnt.out b/usr/src/test/util-tests/tests/dis/i386/32.popcnt.out
new file mode 100644
index 0000000000..8bc79e5c57
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.popcnt.out
@@ -0,0 +1,3 @@
+ libdis_test: 66 f3 0f b8 d8 popcntw %ax,%bx
+ libdis_test+0x5: f3 0f b8 d8 popcntl %eax,%ebx
+ libdis_test+0x9: f3 0f b8 18 popcntl (%eax),%ebx
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.popcnt.s b/usr/src/test/util-tests/tests/dis/i386/32.popcnt.s
new file mode 100644
index 0000000000..4b832f403a
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.popcnt.s
@@ -0,0 +1,28 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test popcnt related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ popcntw %ax, %bx
+ popcntl %eax, %ebx
+ popcntl (%eax), %ebx
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.sse-4.2.out b/usr/src/test/util-tests/tests/dis/i386/32.sse-4.2.out
new file mode 100644
index 0000000000..6f0025d2af
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.sse-4.2.out
@@ -0,0 +1,16 @@
+ libdis_test: f2 0f 38 f0 d8 crc32b %al,%ebx
+ libdis_test+0x5: f2 0f 38 f0 18 crc32b (%eax),%ebx
+ libdis_test+0xa: 66 f2 0f 38 f1 d8 crc32w %ax,%ebx
+ libdis_test+0x10: 66 f2 0f 38 f1 18 crc32w (%eax),%ebx
+ libdis_test+0x16: f2 0f 38 f1 d8 crc32l %eax,%ebx
+ libdis_test+0x1b: f2 0f 38 f1 18 crc32l (%eax),%ebx
+ libdis_test+0x20: 66 0f 3a 61 c8 23 pcmpestri $0x23,%xmm0,%xmm1
+ libdis_test+0x26: 66 0f 3a 61 08 23 pcmpestri $0x23,(%eax),%xmm1
+ libdis_test+0x2c: 66 0f 3a 60 c8 23 pcmpestrm $0x23,%xmm0,%xmm1
+ libdis_test+0x32: 66 0f 3a 60 08 23 pcmpestrm $0x23,(%eax),%xmm1
+ libdis_test+0x38: 66 0f 38 37 c8 pcmpgtq %xmm0,%xmm1
+ libdis_test+0x3d: 66 0f 38 37 08 pcmpgtq (%eax),%xmm1
+ libdis_test+0x42: 66 0f 3a 63 c8 23 pcmpistri $0x23,%xmm0,%xmm1
+ libdis_test+0x48: 66 0f 3a 63 08 23 pcmpistri $0x23,(%eax),%xmm1
+ libdis_test+0x4e: 66 0f 3a 62 c8 23 pcmpistrm $0x23,%xmm0,%xmm1
+ libdis_test+0x54: 66 0f 3a 62 08 23 pcmpistrm $0x23,(%eax),%xmm1
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.sse-4.2.s b/usr/src/test/util-tests/tests/dis/i386/32.sse-4.2.s
new file mode 100644
index 0000000000..0db699126d
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.sse-4.2.s
@@ -0,0 +1,41 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test SSE 4.2 related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ crc32b %al, %ebx
+ crc32b (%eax), %ebx
+ crc32w %ax, %ebx
+ crc32w (%eax), %ebx
+ crc32l %eax, %ebx
+ crc32l (%eax), %ebx
+ pcmpestri $0x23, %xmm0, %xmm1
+ pcmpestri $0x23, (%eax), %xmm1
+ pcmpestrm $0x23, %xmm0, %xmm1
+ pcmpestrm $0x23, (%eax), %xmm1
+ pcmpgtq %xmm0, %xmm1
+ pcmpgtq (%eax), %xmm1
+ pcmpistri $0x23, %xmm0, %xmm1
+ pcmpistri $0x23, (%eax), %xmm1
+ pcmpistrm $0x23, %xmm0, %xmm1
+ pcmpistrm $0x23, (%eax), %xmm1
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.ssse3.out b/usr/src/test/util-tests/tests/dis/i386/32.ssse3.out
new file mode 100644
index 0000000000..411a702c84
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.ssse3.out
@@ -0,0 +1,64 @@
+ libdis_test: 0f 38 1c c8 pabsb %mm0,%mm1
+ libdis_test+0x4: 0f 38 1c 08 pabsb (%eax),%mm1
+ libdis_test+0x8: 66 0f 38 1c c8 pabsb %xmm0,%xmm1
+ libdis_test+0xd: 66 0f 38 1c 08 pabsb (%eax),%xmm1
+ libdis_test+0x12: 0f 38 1e c8 pabsd %mm0,%mm1
+ libdis_test+0x16: 0f 38 1e 08 pabsd (%eax),%mm1
+ libdis_test+0x1a: 66 0f 38 1e c8 pabsd %xmm0,%xmm1
+ libdis_test+0x1f: 66 0f 38 1e 08 pabsd (%eax),%xmm1
+ libdis_test+0x24: 0f 38 1d c8 pabsw %mm0,%mm1
+ libdis_test+0x28: 0f 38 1d 08 pabsw (%eax),%mm1
+ libdis_test+0x2c: 66 0f 38 1d c8 pabsw %xmm0,%xmm1
+ libdis_test+0x31: 66 0f 38 1d 08 pabsw (%eax),%xmm1
+ libdis_test+0x36: 0f 3a 0f c8 23 palignr $0x23,%mm0,%mm1
+ libdis_test+0x3b: 0f 3a 0f 08 23 palignr $0x23,(%eax),%mm1
+ libdis_test+0x40: 66 0f 3a 0f c8 23 palignr $0x23,%xmm0,%xmm1
+ libdis_test+0x46: 66 0f 3a 0f 08 23 palignr $0x23,(%eax),%xmm1
+ libdis_test+0x4c: 0f 38 02 c8 phaddd %mm0,%mm1
+ libdis_test+0x50: 0f 38 02 08 phaddd (%eax),%mm1
+ libdis_test+0x54: 66 0f 38 02 c8 phaddd %xmm0,%xmm1
+ libdis_test+0x59: 66 0f 38 02 08 phaddd (%eax),%xmm1
+ libdis_test+0x5e: 0f 38 01 c8 phaddw %mm0,%mm1
+ libdis_test+0x62: 0f 38 01 08 phaddw (%eax),%mm1
+ libdis_test+0x66: 66 0f 38 01 c8 phaddw %xmm0,%xmm1
+ libdis_test+0x6b: 66 0f 38 01 08 phaddw (%eax),%xmm1
+ libdis_test+0x70: 0f 38 03 c8 phaddsw %mm0,%mm1
+ libdis_test+0x74: 0f 38 03 08 phaddsw (%eax),%mm1
+ libdis_test+0x78: 66 0f 38 03 c8 phaddsw %xmm0,%xmm1
+ libdis_test+0x7d: 66 0f 38 03 08 phaddsw (%eax),%xmm1
+ libdis_test+0x82: 0f 38 06 c8 phsubd %mm0,%mm1
+ libdis_test+0x86: 0f 38 06 08 phsubd (%eax),%mm1
+ libdis_test+0x8a: 66 0f 38 06 c8 phsubd %xmm0,%xmm1
+ libdis_test+0x8f: 66 0f 38 06 08 phsubd (%eax),%xmm1
+ libdis_test+0x94: 0f 38 05 c8 phsubw %mm0,%mm1
+ libdis_test+0x98: 0f 38 05 08 phsubw (%eax),%mm1
+ libdis_test+0x9c: 66 0f 38 05 c8 phsubw %xmm0,%xmm1
+ libdis_test+0xa1: 66 0f 38 05 08 phsubw (%eax),%xmm1
+ libdis_test+0xa6: 0f 38 07 c8 phsubsw %mm0,%mm1
+ libdis_test+0xaa: 0f 38 07 08 phsubsw (%eax),%mm1
+ libdis_test+0xae: 66 0f 38 07 c8 phsubsw %xmm0,%xmm1
+ libdis_test+0xb3: 66 0f 38 07 08 phsubsw (%eax),%xmm1
+ libdis_test+0xb8: 0f 38 04 c8 pmaddubsw %mm0,%mm1
+ libdis_test+0xbc: 0f 38 04 08 pmaddubsw (%eax),%mm1
+ libdis_test+0xc0: 66 0f 38 04 c8 pmaddubsw %xmm0,%xmm1
+ libdis_test+0xc5: 66 0f 38 04 08 pmaddubsw (%eax),%xmm1
+ libdis_test+0xca: 0f 38 0b c8 pmulhrsw %mm0,%mm1
+ libdis_test+0xce: 0f 38 0b 08 pmulhrsw (%eax),%mm1
+ libdis_test+0xd2: 66 0f 38 0b c8 pmulhrsw %xmm0,%xmm1
+ libdis_test+0xd7: 66 0f 38 0b 08 pmulhrsw (%eax),%xmm1
+ libdis_test+0xdc: 0f 38 00 c8 pshufb %mm0,%mm1
+ libdis_test+0xe0: 0f 38 00 08 pshufb (%eax),%mm1
+ libdis_test+0xe4: 66 0f 38 00 c8 pshufb %xmm0,%xmm1
+ libdis_test+0xe9: 66 0f 38 00 08 pshufb (%eax),%xmm1
+ libdis_test+0xee: 0f 38 08 c8 psignb %mm0,%mm1
+ libdis_test+0xf2: 0f 38 08 08 psignb (%eax),%mm1
+ libdis_test+0xf6: 66 0f 38 08 c8 psignb %xmm0,%xmm1
+ libdis_test+0xfb: 66 0f 38 08 08 psignb (%eax),%xmm1
+ libdis_test+0x100: 0f 38 0a c8 psignd %mm0,%mm1
+ libdis_test+0x104: 0f 38 0a 08 psignd (%eax),%mm1
+ libdis_test+0x108: 66 0f 38 0a c8 psignd %xmm0,%xmm1
+ libdis_test+0x10d: 66 0f 38 0a 08 psignd (%eax),%xmm1
+ libdis_test+0x112: 0f 38 09 c8 psignw %mm0,%mm1
+ libdis_test+0x116: 0f 38 09 08 psignw (%eax),%mm1
+ libdis_test+0x11a: 66 0f 38 09 c8 psignw %xmm0,%xmm1
+ libdis_test+0x11f: 66 0f 38 09 08 psignw (%eax),%xmm1
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.ssse3.s b/usr/src/test/util-tests/tests/dis/i386/32.ssse3.s
new file mode 100644
index 0000000000..382f8b65f3
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.ssse3.s
@@ -0,0 +1,89 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test SSSE3 related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ pabsb %mm0, %mm1
+ pabsb (%eax), %mm1
+ pabsb %xmm0, %xmm1
+ pabsb (%eax), %xmm1
+ pabsd %mm0, %mm1
+ pabsd (%eax), %mm1
+ pabsd %xmm0, %xmm1
+ pabsd (%eax), %xmm1
+ pabsw %mm0, %mm1
+ pabsw (%eax), %mm1
+ pabsw %xmm0, %xmm1
+ pabsw (%eax), %xmm1
+ palignr $0x23, %mm0, %mm1
+ palignr $0x23, (%eax), %mm1
+ palignr $0x23, %xmm0, %xmm1
+ palignr $0x23, (%eax), %xmm1
+ phaddd %mm0, %mm1
+ phaddd (%eax), %mm1
+ phaddd %xmm0, %xmm1
+ phaddd (%eax), %xmm1
+ phaddw %mm0, %mm1
+ phaddw (%eax), %mm1
+ phaddw %xmm0, %xmm1
+ phaddw (%eax), %xmm1
+ phaddsw %mm0, %mm1
+ phaddsw (%eax), %mm1
+ phaddsw %xmm0, %xmm1
+ phaddsw (%eax), %xmm1
+ phsubd %mm0, %mm1
+ phsubd (%eax), %mm1
+ phsubd %xmm0, %xmm1
+ phsubd (%eax), %xmm1
+ phsubw %mm0, %mm1
+ phsubw (%eax), %mm1
+ phsubw %xmm0, %xmm1
+ phsubw (%eax), %xmm1
+ phsubsw %mm0, %mm1
+ phsubsw (%eax), %mm1
+ phsubsw %xmm0, %xmm1
+ phsubsw (%eax), %xmm1
+ pmaddubsw %mm0, %mm1
+ pmaddubsw (%eax), %mm1
+ pmaddubsw %xmm0, %xmm1
+ pmaddubsw (%eax), %xmm1
+ pmulhrsw %mm0, %mm1
+ pmulhrsw (%eax), %mm1
+ pmulhrsw %xmm0, %xmm1
+ pmulhrsw (%eax), %xmm1
+ pshufb %mm0, %mm1
+ pshufb (%eax), %mm1
+ pshufb %xmm0, %xmm1
+ pshufb (%eax), %xmm1
+ psignb %mm0, %mm1
+ psignb (%eax), %mm1
+ psignb %xmm0, %xmm1
+ psignb (%eax), %xmm1
+ psignd %mm0, %mm1
+ psignd (%eax), %mm1
+ psignd %xmm0, %xmm1
+ psignd (%eax), %xmm1
+ psignw %mm0, %mm1
+ psignw (%eax), %mm1
+ psignw %xmm0, %xmm1
+ psignw (%eax), %xmm1
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.xsave.out b/usr/src/test/util-tests/tests/dis/i386/32.xsave.out
new file mode 100644
index 0000000000..4ad87bd36c
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.xsave.out
@@ -0,0 +1,4 @@
+ libdis_test: 0f ae 28 xrstor (%eax)
+ libdis_test+0x3: 0f ae 20 xsave (%eax)
+ libdis_test+0x6: 0f 01 d0 xgetbv
+ libdis_test+0x9: 0f 01 d1 xsetbv
diff --git a/usr/src/test/util-tests/tests/dis/i386/32.xsave.s b/usr/src/test/util-tests/tests/dis/i386/32.xsave.s
new file mode 100644
index 0000000000..7f50b17b86
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/32.xsave.s
@@ -0,0 +1,30 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test 32-bit xsave related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ xrstor (%eax)
+ xsave (%eax)
+
+ xgetbv
+ xsetbv
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.adx.out b/usr/src/test/util-tests/tests/dis/i386/64.adx.out
new file mode 100644
index 0000000000..14c38d99e7
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.adx.out
@@ -0,0 +1,8 @@
+ libdis_test: 66 48 0f 38 f6 c3 adcx %rbx,%rax
+ libdis_test+0x6: 66 48 0f 38 f6 43 adcx 0x40(%rbx),%rax
+ 40
+ libdis_test+0xd: 66 48 0f 38 f6 13 adcx (%rbx),%rdx
+ libdis_test+0x13: f3 48 0f 38 f6 c3 adox %rbx,%rax
+ libdis_test+0x19: f3 48 0f 38 f6 43 adox 0x40(%rbx),%rax
+ 40
+ libdis_test+0x20: f3 48 0f 38 f6 13 adox (%rbx),%rdx
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.adx.s b/usr/src/test/util-tests/tests/dis/i386/64.adx.s
new file mode 100644
index 0000000000..e4cb43f66a
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.adx.s
@@ -0,0 +1,32 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test ADX related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ adcx %rbx, %rax
+ adcx 0x40(%rbx), %rax
+ adcx (%rbx), %rdx
+
+ adox %rbx, %rax
+ adox 0x40(%rbx), %rax
+ adox (%rbx), %rdx
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.aes.out b/usr/src/test/util-tests/tests/dis/i386/64.aes.out
new file mode 100644
index 0000000000..aea5d9a9c0
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.aes.out
@@ -0,0 +1,12 @@
+ libdis_test: 66 0f 38 dc c8 aesenc %xmm0,%xmm1
+ libdis_test+0x5: 66 0f 38 dc 0b aesenc (%rbx),%xmm1
+ libdis_test+0xa: 66 0f 38 dd c8 aesenclast %xmm0,%xmm1
+ libdis_test+0xf: 66 0f 38 dd 0b aesenclast (%rbx),%xmm1
+ libdis_test+0x14: 66 0f 38 de c8 aesdec %xmm0,%xmm1
+ libdis_test+0x19: 66 0f 38 de 0b aesdec (%rbx),%xmm1
+ libdis_test+0x1e: 66 0f 38 df c8 aesdeclast %xmm0,%xmm1
+ libdis_test+0x23: 66 0f 38 df 0b aesdeclast (%rbx),%xmm1
+ libdis_test+0x28: 66 0f 38 db c8 aesimc %xmm0,%xmm1
+ libdis_test+0x2d: 66 0f 38 db 0b aesimc (%rbx),%xmm1
+ libdis_test+0x32: 66 0f 3a df c8 42 aeskeygenassist $0x42,%xmm0,%xmm1
+ libdis_test+0x38: 66 0f 3a df 0b 42 aeskeygenassist $0x42,(%rbx),%xmm1
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.aes.s b/usr/src/test/util-tests/tests/dis/i386/64.aes.s
new file mode 100644
index 0000000000..aca0aead56
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.aes.s
@@ -0,0 +1,37 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test AES related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ aesenc %xmm0, %xmm1
+ aesenc (%rbx), %xmm1
+ aesenclast %xmm0, %xmm1
+ aesenclast (%rbx), %xmm1
+ aesdec %xmm0, %xmm1
+ aesdec (%rbx), %xmm1
+ aesdeclast %xmm0, %xmm1
+ aesdeclast (%rbx), %xmm1
+ aesimc %xmm0, %xmm1
+ aesimc (%rbx), %xmm1
+ aeskeygenassist $0x42, %xmm0, %xmm1
+ aeskeygenassist $0x42, (%rbx), %xmm1
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.bmi1.out b/usr/src/test/util-tests/tests/dis/i386/64.bmi1.out
new file mode 100644
index 0000000000..aa7777065b
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.bmi1.out
@@ -0,0 +1,39 @@
+ libdis_test: c4 e2 60 f2 d0 andn %eax,%ebx,%edx
+ libdis_test+0x5: c4 e2 60 f2 10 andn (%rax),%ebx,%edx
+ libdis_test+0xa: c4 e2 60 f2 50 40 andn 0x40(%rax),%ebx,%edx
+ libdis_test+0x10: c4 e2 60 f7 d0 bextr %ebx,%eax,%edx
+ libdis_test+0x15: c4 e2 60 f7 10 bextr %ebx,(%rax),%edx
+ libdis_test+0x1a: c4 e2 60 f7 50 40 bextr %ebx,0x40(%rax),%edx
+ libdis_test+0x20: c4 e2 68 f3 d8 blsi %eax,%edx
+ libdis_test+0x25: c4 e2 68 f3 18 blsi (%rax),%edx
+ libdis_test+0x2a: c4 e2 68 f3 58 40 blsi 0x40(%rax),%edx
+ libdis_test+0x30: c4 e2 68 f3 d0 blsmsk %eax,%edx
+ libdis_test+0x35: c4 e2 68 f3 10 blsmsk (%rax),%edx
+ libdis_test+0x3a: c4 e2 68 f3 50 40 blsmsk 0x40(%rax),%edx
+ libdis_test+0x40: c4 e2 68 f3 c8 blsr %eax,%edx
+ libdis_test+0x45: c4 e2 68 f3 08 blsr (%rax),%edx
+ libdis_test+0x4a: c4 e2 68 f3 48 40 blsr 0x40(%rax),%edx
+ libdis_test+0x50: 66 f3 0f bc d0 tzcnt %ax,%dx
+ libdis_test+0x55: 66 f3 0f bc 10 tzcnt (%rax),%dx
+ libdis_test+0x5a: 66 f3 0f bc 50 40 tzcnt 0x40(%rax),%dx
+ libdis_test+0x60: f3 0f bc d0 tzcnt %eax,%edx
+ libdis_test+0x64: f3 0f bc 10 tzcnt (%rax),%edx
+ libdis_test+0x68: f3 0f bc 50 40 tzcnt 0x40(%rax),%edx
+ libdis_test+0x6d: c4 e2 e0 f2 d0 andn %rax,%rbx,%rdx
+ libdis_test+0x72: c4 e2 e0 f2 10 andn (%rax),%rbx,%rdx
+ libdis_test+0x77: c4 e2 e0 f2 50 40 andn 0x40(%rax),%rbx,%rdx
+ libdis_test+0x7d: c4 e2 e0 f7 d0 bextr %rbx,%rax,%rdx
+ libdis_test+0x82: c4 e2 e0 f7 10 bextr %rbx,(%rax),%rdx
+ libdis_test+0x87: c4 e2 e0 f7 50 40 bextr %rbx,0x40(%rax),%rdx
+ libdis_test+0x8d: c4 e2 e8 f3 d8 blsi %rax,%rdx
+ libdis_test+0x92: c4 e2 e8 f3 18 blsi (%rax),%rdx
+ libdis_test+0x97: c4 e2 e8 f3 58 40 blsi 0x40(%rax),%rdx
+ libdis_test+0x9d: c4 e2 e8 f3 d0 blsmsk %rax,%rdx
+ libdis_test+0xa2: c4 e2 e8 f3 10 blsmsk (%rax),%rdx
+ libdis_test+0xa7: c4 e2 e8 f3 50 40 blsmsk 0x40(%rax),%rdx
+ libdis_test+0xad: c4 e2 e8 f3 c8 blsr %rax,%rdx
+ libdis_test+0xb2: c4 e2 e8 f3 08 blsr (%rax),%rdx
+ libdis_test+0xb7: c4 e2 e8 f3 48 40 blsr 0x40(%rax),%rdx
+ libdis_test+0xbd: f3 48 0f bc d0 tzcnt %rax,%rdx
+ libdis_test+0xc2: f3 48 0f bc 10 tzcnt (%rax),%rdx
+ libdis_test+0xc7: f3 48 0f bc 50 40 tzcnt 0x40(%rax),%rdx
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.bmi1.s b/usr/src/test/util-tests/tests/dis/i386/64.bmi1.s
new file mode 100644
index 0000000000..5d1e45aa60
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.bmi1.s
@@ -0,0 +1,65 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test bmi1 related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ andn %eax, %ebx, %edx
+ andn (%rax), %ebx, %edx
+ andn 0x40(%rax), %ebx, %edx
+ bextr %ebx, %eax, %edx
+ bextr %ebx, (%rax), %edx
+ bextr %ebx, 0x40(%rax), %edx
+ blsi %eax, %edx
+ blsi (%rax), %edx
+ blsi 0x40(%rax), %edx
+ blsmsk %eax, %edx
+ blsmsk (%rax), %edx
+ blsmsk 0x40(%rax), %edx
+ blsr %eax, %edx
+ blsr (%rax), %edx
+ blsr 0x40(%rax), %edx
+ tzcnt %ax, %dx
+ tzcnt (%rax), %dx
+ tzcnt 0x40(%rax), %dx
+ tzcnt %eax, %edx
+ tzcnt (%rax), %edx
+ tzcnt 0x40(%rax), %edx
+
+ andn %rax, %rbx, %rdx
+ andn (%rax), %rbx, %rdx
+ andn 0x40(%rax), %rbx, %rdx
+ bextr %rbx, %rax, %rdx
+ bextr %rbx, (%rax), %rdx
+ bextr %rbx, 0x40(%rax), %rdx
+ blsi %rax, %rdx
+ blsi (%rax), %rdx
+ blsi 0x40(%rax), %rdx
+ blsmsk %rax, %rdx
+ blsmsk (%rax), %rdx
+ blsmsk 0x40(%rax), %rdx
+ blsr %rax, %rdx
+ blsr (%rax), %rdx
+ blsr 0x40(%rax), %rdx
+ tzcnt %rax, %rdx
+ tzcnt (%rax), %rdx
+ tzcnt 0x40(%rax), %rdx
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.bmi2.out b/usr/src/test/util-tests/tests/dis/i386/64.bmi2.out
new file mode 100644
index 0000000000..b13e04ef97
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.bmi2.out
@@ -0,0 +1,32 @@
+ libdis_test: c4 e2 78 f5 cb bzhi %eax,%ebx,%ecx
+ libdis_test+0x5: c4 e2 78 f5 0b bzhi %eax,(%rbx),%ecx
+ libdis_test+0xa: c4 e2 63 f6 c8 mulx %eax,%ebx,%ecx
+ libdis_test+0xf: c4 e2 63 f6 08 mulx (%rax),%ebx,%ecx
+ libdis_test+0x14: c4 e2 63 f5 c8 pdep %eax,%ebx,%ecx
+ libdis_test+0x19: c4 e2 63 f5 08 pdep (%rax),%ebx,%ecx
+ libdis_test+0x1e: c4 e2 62 f5 c8 pext %eax,%ebx,%ecx
+ libdis_test+0x23: c4 e2 62 f5 08 pext (%rax),%ebx,%ecx
+ libdis_test+0x28: c4 e3 7b f0 d8 03 rorx $0x3,%eax,%ebx
+ libdis_test+0x2e: c4 e3 7b f0 18 03 rorx $0x3,(%rax),%ebx
+ libdis_test+0x34: c4 e2 7a f7 cb sarx %eax,%ebx,%ecx
+ libdis_test+0x39: c4 e2 7a f7 0b sarx %eax,(%rbx),%ecx
+ libdis_test+0x3e: c4 e2 79 f7 cb shlx %eax,%ebx,%ecx
+ libdis_test+0x43: c4 e2 79 f7 0b shlx %eax,(%rbx),%ecx
+ libdis_test+0x48: c4 e2 7b f7 cb shrx %eax,%ebx,%ecx
+ libdis_test+0x4d: c4 e2 7b f7 0b shrx %eax,(%rbx),%ecx
+ libdis_test+0x52: c4 e2 f8 f5 cb bzhi %rax,%rbx,%rcx
+ libdis_test+0x57: c4 e2 f8 f5 0b bzhi %rax,(%rbx),%rcx
+ libdis_test+0x5c: c4 e2 e3 f6 c8 mulx %rax,%rbx,%rcx
+ libdis_test+0x61: c4 e2 e3 f6 08 mulx (%rax),%rbx,%rcx
+ libdis_test+0x66: c4 e2 e3 f5 c8 pdep %rax,%rbx,%rcx
+ libdis_test+0x6b: c4 e2 e3 f5 08 pdep (%rax),%rbx,%rcx
+ libdis_test+0x70: c4 e2 e2 f5 c8 pext %rax,%rbx,%rcx
+ libdis_test+0x75: c4 e2 e2 f5 08 pext (%rax),%rbx,%rcx
+ libdis_test+0x7a: c4 e3 fb f0 d8 03 rorx $0x3,%rax,%rbx
+ libdis_test+0x80: c4 e3 fb f0 18 03 rorx $0x3,(%rax),%rbx
+ libdis_test+0x86: c4 e2 fa f7 cb sarx %rax,%rbx,%rcx
+ libdis_test+0x8b: c4 e2 fa f7 0b sarx %rax,(%rbx),%rcx
+ libdis_test+0x90: c4 e2 f9 f7 cb shlx %rax,%rbx,%rcx
+ libdis_test+0x95: c4 e2 f9 f7 0b shlx %rax,(%rbx),%rcx
+ libdis_test+0x9a: c4 e2 fb f7 cb shrx %rax,%rbx,%rcx
+ libdis_test+0x9f: c4 e2 fb f7 0b shrx %rax,(%rbx),%rcx
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.bmi2.s b/usr/src/test/util-tests/tests/dis/i386/64.bmi2.s
new file mode 100644
index 0000000000..5256b9e0e3
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.bmi2.s
@@ -0,0 +1,58 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test bmi2 related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ bzhi %eax, %ebx, %ecx
+ bzhi %eax, (%rbx), %ecx
+ mulx %eax, %ebx, %ecx
+ mulx (%rax), %ebx, %ecx
+ pdep %eax, %ebx, %ecx
+ pdep (%rax), %ebx, %ecx
+ pext %eax, %ebx, %ecx
+ pext (%rax), %ebx, %ecx
+ rorx $0x3, %eax, %ebx
+ rorx $0x3, (%rax), %ebx
+ sarx %eax, %ebx, %ecx
+ sarx %eax, (%rbx), %ecx
+ shlx %eax, %ebx, %ecx
+ shlx %eax, (%rbx), %ecx
+ shrx %eax, %ebx, %ecx
+ shrx %eax, (%rbx), %ecx
+
+ bzhi %rax, %rbx, %rcx
+ bzhi %rax, (%rbx), %rcx
+ mulx %rax, %rbx, %rcx
+ mulx (%rax), %rbx, %rcx
+ pdep %rax, %rbx, %rcx
+ pdep (%rax), %rbx, %rcx
+ pext %rax, %rbx, %rcx
+ pext (%rax), %rbx, %rcx
+ rorx $0x3, %rax, %rbx
+ rorx $0x3, (%rax), %rbx
+ sarx %rax, %rbx, %rcx
+ sarx %rax, (%rbx), %rcx
+ shlx %rax, %rbx, %rcx
+ shlx %rax, (%rbx), %rcx
+ shrx %rax, %rbx, %rcx
+ shrx %rax, (%rbx), %rcx
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.ept.out b/usr/src/test/util-tests/tests/dis/i386/64.ept.out
new file mode 100644
index 0000000000..8fc77d39ea
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.ept.out
@@ -0,0 +1,2 @@
+ libdis_test: 66 0f 38 80 18 invept %rbx,(%rax)
+ libdis_test+0x5: 66 0f 38 81 18 invvpid %rbx,(%rax)
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.ept.s b/usr/src/test/util-tests/tests/dis/i386/64.ept.s
new file mode 100644
index 0000000000..de349d521f
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.ept.s
@@ -0,0 +1,27 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test 64-bit specific EPT related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ invept (%rax), %rbx
+ invvpid (%rax), %rbx
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.fma-pd.out b/usr/src/test/util-tests/tests/dis/i386/64.fma-pd.out
new file mode 100644
index 0000000000..9da6689b80
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.fma-pd.out
@@ -0,0 +1,72 @@
+ libdis_test: c4 e2 f1 98 d0 vfmadd132pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x5: c4 e2 f1 98 10 vfmadd132pd (%rax),%xmm1,%xmm2
+ libdis_test+0xa: c4 e2 f5 98 d0 vfmadd132pd %ymm0,%ymm1,%ymm2
+ libdis_test+0xf: c4 e2 f5 98 10 vfmadd132pd (%rax),%ymm1,%ymm2
+ libdis_test+0x14: c4 e2 f1 a8 d0 vfmadd213pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x19: c4 e2 f1 a8 10 vfmadd213pd (%rax),%xmm1,%xmm2
+ libdis_test+0x1e: c4 e2 f5 a8 d0 vfmadd213pd %ymm0,%ymm1,%ymm2
+ libdis_test+0x23: c4 e2 f5 a8 10 vfmadd213pd (%rax),%ymm1,%ymm2
+ libdis_test+0x28: c4 e2 f1 b8 d0 vfmadd231pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x2d: c4 e2 f1 b8 10 vfmadd231pd (%rax),%xmm1,%xmm2
+ libdis_test+0x32: c4 e2 f5 b8 d0 vfmadd231pd %ymm0,%ymm1,%ymm2
+ libdis_test+0x37: c4 e2 f5 b8 10 vfmadd231pd (%rax),%ymm1,%ymm2
+ libdis_test+0x3c: c4 e2 f1 96 d0 vfmaddsub132pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x41: c4 e2 f1 96 10 vfmaddsub132pd (%rax),%xmm1,%xmm2
+ libdis_test+0x46: c4 e2 f5 96 d0 vfmaddsub132pd %ymm0,%ymm1,%ymm2
+ libdis_test+0x4b: c4 e2 f5 96 10 vfmaddsub132pd (%rax),%ymm1,%ymm2
+ libdis_test+0x50: c4 e2 f1 a6 d0 vfmaddsub213pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x55: c4 e2 f1 a6 10 vfmaddsub213pd (%rax),%xmm1,%xmm2
+ libdis_test+0x5a: c4 e2 f5 a6 d0 vfmaddsub213pd %ymm0,%ymm1,%ymm2
+ libdis_test+0x5f: c4 e2 f5 a6 10 vfmaddsub213pd (%rax),%ymm1,%ymm2
+ libdis_test+0x64: c4 e2 f1 b6 d0 vfmaddsub231pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x69: c4 e2 f1 b6 10 vfmaddsub231pd (%rax),%xmm1,%xmm2
+ libdis_test+0x6e: c4 e2 f5 b6 d0 vfmaddsub231pd %ymm0,%ymm1,%ymm2
+ libdis_test+0x73: c4 e2 f5 b6 10 vfmaddsub231pd (%rax),%ymm1,%ymm2
+ libdis_test+0x78: c4 e2 f1 9a d0 vfmsub132pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x7d: c4 e2 f1 9a 10 vfmsub132pd (%rax),%xmm1,%xmm2
+ libdis_test+0x82: c4 e2 f5 9a d0 vfmsub132pd %ymm0,%ymm1,%ymm2
+ libdis_test+0x87: c4 e2 f5 9a 10 vfmsub132pd (%rax),%ymm1,%ymm2
+ libdis_test+0x8c: c4 e2 f1 aa d0 vfmsub213pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x91: c4 e2 f1 aa 10 vfmsub213pd (%rax),%xmm1,%xmm2
+ libdis_test+0x96: c4 e2 f5 aa d0 vfmsub213pd %ymm0,%ymm1,%ymm2
+ libdis_test+0x9b: c4 e2 f5 aa 10 vfmsub213pd (%rax),%ymm1,%ymm2
+ libdis_test+0xa0: c4 e2 f1 ba d0 vfmsub231pd %xmm0,%xmm1,%xmm2
+ libdis_test+0xa5: c4 e2 f1 ba 10 vfmsub231pd (%rax),%xmm1,%xmm2
+ libdis_test+0xaa: c4 e2 f5 ba d0 vfmsub231pd %ymm0,%ymm1,%ymm2
+ libdis_test+0xaf: c4 e2 f5 ba 10 vfmsub231pd (%rax),%ymm1,%ymm2
+ libdis_test+0xb4: c4 e2 f1 97 d0 vfmsubadd132pd %xmm0,%xmm1,%xmm2
+ libdis_test+0xb9: c4 e2 f1 97 10 vfmsubadd132pd (%rax),%xmm1,%xmm2
+ libdis_test+0xbe: c4 e2 f5 97 d0 vfmsubadd132pd %ymm0,%ymm1,%ymm2
+ libdis_test+0xc3: c4 e2 f5 97 10 vfmsubadd132pd (%rax),%ymm1,%ymm2
+ libdis_test+0xc8: c4 e2 f1 a7 d0 vfmsubadd213pd %xmm0,%xmm1,%xmm2
+ libdis_test+0xcd: c4 e2 f1 a7 10 vfmsubadd213pd (%rax),%xmm1,%xmm2
+ libdis_test+0xd2: c4 e2 f5 a7 d0 vfmsubadd213pd %ymm0,%ymm1,%ymm2
+ libdis_test+0xd7: c4 e2 f5 a7 10 vfmsubadd213pd (%rax),%ymm1,%ymm2
+ libdis_test+0xdc: c4 e2 f1 b7 d0 vfmsubadd231pd %xmm0,%xmm1,%xmm2
+ libdis_test+0xe1: c4 e2 f1 b7 10 vfmsubadd231pd (%rax),%xmm1,%xmm2
+ libdis_test+0xe6: c4 e2 f5 b7 d0 vfmsubadd231pd %ymm0,%ymm1,%ymm2
+ libdis_test+0xeb: c4 e2 f5 b7 10 vfmsubadd231pd (%rax),%ymm1,%ymm2
+ libdis_test+0xf0: c4 e2 f1 9c d0 vfnmadd132pd %xmm0,%xmm1,%xmm2
+ libdis_test+0xf5: c4 e2 f1 9c 10 vfnmadd132pd (%rax),%xmm1,%xmm2
+ libdis_test+0xfa: c4 e2 f5 9c d0 vfnmadd132pd %ymm0,%ymm1,%ymm2
+ libdis_test+0xff: c4 e2 f5 9c 10 vfnmadd132pd (%rax),%ymm1,%ymm2
+ libdis_test+0x104: c4 e2 f1 ac d0 vfnmadd213pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x109: c4 e2 f1 ac 10 vfnmadd213pd (%rax),%xmm1,%xmm2
+ libdis_test+0x10e: c4 e2 f5 ac d0 vfnmadd213pd %ymm0,%ymm1,%ymm2
+ libdis_test+0x113: c4 e2 f5 ac 10 vfnmadd213pd (%rax),%ymm1,%ymm2
+ libdis_test+0x118: c4 e2 f1 bc d0 vfnmadd231pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x11d: c4 e2 f1 bc 10 vfnmadd231pd (%rax),%xmm1,%xmm2
+ libdis_test+0x122: c4 e2 f5 bc d0 vfnmadd231pd %ymm0,%ymm1,%ymm2
+ libdis_test+0x127: c4 e2 f5 bc 10 vfnmadd231pd (%rax),%ymm1,%ymm2
+ libdis_test+0x12c: c4 e2 f1 9e d0 vfnmsub132pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x131: c4 e2 f1 9e 10 vfnmsub132pd (%rax),%xmm1,%xmm2
+ libdis_test+0x136: c4 e2 f5 9e d0 vfnmsub132pd %ymm0,%ymm1,%ymm2
+ libdis_test+0x13b: c4 e2 f5 9e 10 vfnmsub132pd (%rax),%ymm1,%ymm2
+ libdis_test+0x140: c4 e2 f1 ae d0 vfnmsub213pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x145: c4 e2 f1 ae 10 vfnmsub213pd (%rax),%xmm1,%xmm2
+ libdis_test+0x14a: c4 e2 f5 ae d0 vfnmsub213pd %ymm0,%ymm1,%ymm2
+ libdis_test+0x14f: c4 e2 f5 ae 10 vfnmsub213pd (%rax),%ymm1,%ymm2
+ libdis_test+0x154: c4 e2 f1 be d0 vfnmsub231pd %xmm0,%xmm1,%xmm2
+ libdis_test+0x159: c4 e2 f1 be 10 vfnmsub231pd (%rax),%xmm1,%xmm2
+ libdis_test+0x15e: c4 e2 f5 be d0 vfnmsub231pd %ymm0,%ymm1,%ymm2
+ libdis_test+0x163: c4 e2 f5 be 10 vfnmsub231pd (%rax),%ymm1,%ymm2
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.fma-pd.s b/usr/src/test/util-tests/tests/dis/i386/64.fma-pd.s
new file mode 100644
index 0000000000..a1c9ea3411
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.fma-pd.s
@@ -0,0 +1,97 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test FMA3 -PD related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ vfmadd132pd %xmm0, %xmm1, %xmm2
+ vfmadd132pd (%rax), %xmm1, %xmm2
+ vfmadd132pd %ymm0, %ymm1, %ymm2
+ vfmadd132pd (%rax), %ymm1, %ymm2
+ vfmadd213pd %xmm0, %xmm1, %xmm2
+ vfmadd213pd (%rax), %xmm1, %xmm2
+ vfmadd213pd %ymm0, %ymm1, %ymm2
+ vfmadd213pd (%rax), %ymm1, %ymm2
+ vfmadd231pd %xmm0, %xmm1, %xmm2
+ vfmadd231pd (%rax), %xmm1, %xmm2
+ vfmadd231pd %ymm0, %ymm1, %ymm2
+ vfmadd231pd (%rax), %ymm1, %ymm2
+ vfmaddsub132pd %xmm0, %xmm1, %xmm2
+ vfmaddsub132pd (%rax), %xmm1, %xmm2
+ vfmaddsub132pd %ymm0, %ymm1, %ymm2
+ vfmaddsub132pd (%rax), %ymm1, %ymm2
+ vfmaddsub213pd %xmm0, %xmm1, %xmm2
+ vfmaddsub213pd (%rax), %xmm1, %xmm2
+ vfmaddsub213pd %ymm0, %ymm1, %ymm2
+ vfmaddsub213pd (%rax), %ymm1, %ymm2
+ vfmaddsub231pd %xmm0, %xmm1, %xmm2
+ vfmaddsub231pd (%rax), %xmm1, %xmm2
+ vfmaddsub231pd %ymm0, %ymm1, %ymm2
+ vfmaddsub231pd (%rax), %ymm1, %ymm2
+ vfmsub132pd %xmm0, %xmm1, %xmm2
+ vfmsub132pd (%rax), %xmm1, %xmm2
+ vfmsub132pd %ymm0, %ymm1, %ymm2
+ vfmsub132pd (%rax), %ymm1, %ymm2
+ vfmsub213pd %xmm0, %xmm1, %xmm2
+ vfmsub213pd (%rax), %xmm1, %xmm2
+ vfmsub213pd %ymm0, %ymm1, %ymm2
+ vfmsub213pd (%rax), %ymm1, %ymm2
+ vfmsub231pd %xmm0, %xmm1, %xmm2
+ vfmsub231pd (%rax), %xmm1, %xmm2
+ vfmsub231pd %ymm0, %ymm1, %ymm2
+ vfmsub231pd (%rax), %ymm1, %ymm2
+ vfmsubadd132pd %xmm0, %xmm1, %xmm2
+ vfmsubadd132pd (%rax), %xmm1, %xmm2
+ vfmsubadd132pd %ymm0, %ymm1, %ymm2
+ vfmsubadd132pd (%rax), %ymm1, %ymm2
+ vfmsubadd213pd %xmm0, %xmm1, %xmm2
+ vfmsubadd213pd (%rax), %xmm1, %xmm2
+ vfmsubadd213pd %ymm0, %ymm1, %ymm2
+ vfmsubadd213pd (%rax), %ymm1, %ymm2
+ vfmsubadd231pd %xmm0, %xmm1, %xmm2
+ vfmsubadd231pd (%rax), %xmm1, %xmm2
+ vfmsubadd231pd %ymm0, %ymm1, %ymm2
+ vfmsubadd231pd (%rax), %ymm1, %ymm2
+ vfnmadd132pd %xmm0, %xmm1, %xmm2
+ vfnmadd132pd (%rax), %xmm1, %xmm2
+ vfnmadd132pd %ymm0, %ymm1, %ymm2
+ vfnmadd132pd (%rax), %ymm1, %ymm2
+ vfnmadd213pd %xmm0, %xmm1, %xmm2
+ vfnmadd213pd (%rax), %xmm1, %xmm2
+ vfnmadd213pd %ymm0, %ymm1, %ymm2
+ vfnmadd213pd (%rax), %ymm1, %ymm2
+ vfnmadd231pd %xmm0, %xmm1, %xmm2
+ vfnmadd231pd (%rax), %xmm1, %xmm2
+ vfnmadd231pd %ymm0, %ymm1, %ymm2
+ vfnmadd231pd (%rax), %ymm1, %ymm2
+ vfnmsub132pd %xmm0, %xmm1, %xmm2
+ vfnmsub132pd (%rax), %xmm1, %xmm2
+ vfnmsub132pd %ymm0, %ymm1, %ymm2
+ vfnmsub132pd (%rax), %ymm1, %ymm2
+ vfnmsub213pd %xmm0, %xmm1, %xmm2
+ vfnmsub213pd (%rax), %xmm1, %xmm2
+ vfnmsub213pd %ymm0, %ymm1, %ymm2
+ vfnmsub213pd (%rax), %ymm1, %ymm2
+ vfnmsub231pd %xmm0, %xmm1, %xmm2
+ vfnmsub231pd (%rax), %xmm1, %xmm2
+ vfnmsub231pd %ymm0, %ymm1, %ymm2
+ vfnmsub231pd (%rax), %ymm1, %ymm2
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.fma-ps.out b/usr/src/test/util-tests/tests/dis/i386/64.fma-ps.out
new file mode 100644
index 0000000000..4b0a6025e6
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.fma-ps.out
@@ -0,0 +1,72 @@
+ libdis_test: c4 e2 71 98 d0 vfmadd132ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x5: c4 e2 71 98 10 vfmadd132ps (%rax),%xmm1,%xmm2
+ libdis_test+0xa: c4 e2 75 98 d0 vfmadd132ps %ymm0,%ymm1,%ymm2
+ libdis_test+0xf: c4 e2 75 98 10 vfmadd132ps (%rax),%ymm1,%ymm2
+ libdis_test+0x14: c4 e2 71 a8 d0 vfmadd213ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x19: c4 e2 71 a8 10 vfmadd213ps (%rax),%xmm1,%xmm2
+ libdis_test+0x1e: c4 e2 75 a8 d0 vfmadd213ps %ymm0,%ymm1,%ymm2
+ libdis_test+0x23: c4 e2 75 a8 10 vfmadd213ps (%rax),%ymm1,%ymm2
+ libdis_test+0x28: c4 e2 71 b8 d0 vfmadd231ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x2d: c4 e2 71 b8 10 vfmadd231ps (%rax),%xmm1,%xmm2
+ libdis_test+0x32: c4 e2 75 b8 d0 vfmadd231ps %ymm0,%ymm1,%ymm2
+ libdis_test+0x37: c4 e2 75 b8 10 vfmadd231ps (%rax),%ymm1,%ymm2
+ libdis_test+0x3c: c4 e2 71 96 d0 vfmaddsub132ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x41: c4 e2 71 96 10 vfmaddsub132ps (%rax),%xmm1,%xmm2
+ libdis_test+0x46: c4 e2 75 96 d0 vfmaddsub132ps %ymm0,%ymm1,%ymm2
+ libdis_test+0x4b: c4 e2 75 96 10 vfmaddsub132ps (%rax),%ymm1,%ymm2
+ libdis_test+0x50: c4 e2 71 a6 d0 vfmaddsub213ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x55: c4 e2 71 a6 10 vfmaddsub213ps (%rax),%xmm1,%xmm2
+ libdis_test+0x5a: c4 e2 75 a6 d0 vfmaddsub213ps %ymm0,%ymm1,%ymm2
+ libdis_test+0x5f: c4 e2 75 a6 10 vfmaddsub213ps (%rax),%ymm1,%ymm2
+ libdis_test+0x64: c4 e2 71 b6 d0 vfmaddsub231ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x69: c4 e2 71 b6 10 vfmaddsub231ps (%rax),%xmm1,%xmm2
+ libdis_test+0x6e: c4 e2 75 b6 d0 vfmaddsub231ps %ymm0,%ymm1,%ymm2
+ libdis_test+0x73: c4 e2 75 b6 10 vfmaddsub231ps (%rax),%ymm1,%ymm2
+ libdis_test+0x78: c4 e2 71 9a d0 vfmsub132ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x7d: c4 e2 71 9a 10 vfmsub132ps (%rax),%xmm1,%xmm2
+ libdis_test+0x82: c4 e2 75 9a d0 vfmsub132ps %ymm0,%ymm1,%ymm2
+ libdis_test+0x87: c4 e2 75 9a 10 vfmsub132ps (%rax),%ymm1,%ymm2
+ libdis_test+0x8c: c4 e2 71 aa d0 vfmsub213ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x91: c4 e2 71 aa 10 vfmsub213ps (%rax),%xmm1,%xmm2
+ libdis_test+0x96: c4 e2 75 aa d0 vfmsub213ps %ymm0,%ymm1,%ymm2
+ libdis_test+0x9b: c4 e2 75 aa 10 vfmsub213ps (%rax),%ymm1,%ymm2
+ libdis_test+0xa0: c4 e2 71 ba d0 vfmsub231ps %xmm0,%xmm1,%xmm2
+ libdis_test+0xa5: c4 e2 71 ba 10 vfmsub231ps (%rax),%xmm1,%xmm2
+ libdis_test+0xaa: c4 e2 75 ba d0 vfmsub231ps %ymm0,%ymm1,%ymm2
+ libdis_test+0xaf: c4 e2 75 ba 10 vfmsub231ps (%rax),%ymm1,%ymm2
+ libdis_test+0xb4: c4 e2 71 97 d0 vfmsubadd132ps %xmm0,%xmm1,%xmm2
+ libdis_test+0xb9: c4 e2 71 97 10 vfmsubadd132ps (%rax),%xmm1,%xmm2
+ libdis_test+0xbe: c4 e2 75 97 d0 vfmsubadd132ps %ymm0,%ymm1,%ymm2
+ libdis_test+0xc3: c4 e2 75 97 10 vfmsubadd132ps (%rax),%ymm1,%ymm2
+ libdis_test+0xc8: c4 e2 71 a7 d0 vfmsubadd213ps %xmm0,%xmm1,%xmm2
+ libdis_test+0xcd: c4 e2 71 a7 10 vfmsubadd213ps (%rax),%xmm1,%xmm2
+ libdis_test+0xd2: c4 e2 75 a7 d0 vfmsubadd213ps %ymm0,%ymm1,%ymm2
+ libdis_test+0xd7: c4 e2 75 a7 10 vfmsubadd213ps (%rax),%ymm1,%ymm2
+ libdis_test+0xdc: c4 e2 71 b7 d0 vfmsubadd231ps %xmm0,%xmm1,%xmm2
+ libdis_test+0xe1: c4 e2 71 b7 10 vfmsubadd231ps (%rax),%xmm1,%xmm2
+ libdis_test+0xe6: c4 e2 75 b7 d0 vfmsubadd231ps %ymm0,%ymm1,%ymm2
+ libdis_test+0xeb: c4 e2 75 b7 10 vfmsubadd231ps (%rax),%ymm1,%ymm2
+ libdis_test+0xf0: c4 e2 71 9c d0 vfnmadd132ps %xmm0,%xmm1,%xmm2
+ libdis_test+0xf5: c4 e2 71 9c 10 vfnmadd132ps (%rax),%xmm1,%xmm2
+ libdis_test+0xfa: c4 e2 75 9c d0 vfnmadd132ps %ymm0,%ymm1,%ymm2
+ libdis_test+0xff: c4 e2 75 9c 10 vfnmadd132ps (%rax),%ymm1,%ymm2
+ libdis_test+0x104: c4 e2 71 ac d0 vfnmadd213ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x109: c4 e2 71 ac 10 vfnmadd213ps (%rax),%xmm1,%xmm2
+ libdis_test+0x10e: c4 e2 75 ac d0 vfnmadd213ps %ymm0,%ymm1,%ymm2
+ libdis_test+0x113: c4 e2 75 ac 10 vfnmadd213ps (%rax),%ymm1,%ymm2
+ libdis_test+0x118: c4 e2 71 bc d0 vfnmadd231ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x11d: c4 e2 71 bc 10 vfnmadd231ps (%rax),%xmm1,%xmm2
+ libdis_test+0x122: c4 e2 75 bc d0 vfnmadd231ps %ymm0,%ymm1,%ymm2
+ libdis_test+0x127: c4 e2 75 bc 10 vfnmadd231ps (%rax),%ymm1,%ymm2
+ libdis_test+0x12c: c4 e2 71 9e d0 vfnmsub132ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x131: c4 e2 71 9e 10 vfnmsub132ps (%rax),%xmm1,%xmm2
+ libdis_test+0x136: c4 e2 75 9e d0 vfnmsub132ps %ymm0,%ymm1,%ymm2
+ libdis_test+0x13b: c4 e2 75 9e 10 vfnmsub132ps (%rax),%ymm1,%ymm2
+ libdis_test+0x140: c4 e2 71 ae d0 vfnmsub213ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x145: c4 e2 71 ae 10 vfnmsub213ps (%rax),%xmm1,%xmm2
+ libdis_test+0x14a: c4 e2 75 ae d0 vfnmsub213ps %ymm0,%ymm1,%ymm2
+ libdis_test+0x14f: c4 e2 75 ae 10 vfnmsub213ps (%rax),%ymm1,%ymm2
+ libdis_test+0x154: c4 e2 71 be d0 vfnmsub231ps %xmm0,%xmm1,%xmm2
+ libdis_test+0x159: c4 e2 71 be 10 vfnmsub231ps (%rax),%xmm1,%xmm2
+ libdis_test+0x15e: c4 e2 75 be d0 vfnmsub231ps %ymm0,%ymm1,%ymm2
+ libdis_test+0x163: c4 e2 75 be 10 vfnmsub231ps (%rax),%ymm1,%ymm2
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.fma-ps.s b/usr/src/test/util-tests/tests/dis/i386/64.fma-ps.s
new file mode 100644
index 0000000000..844609fbf2
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.fma-ps.s
@@ -0,0 +1,97 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test FMA3 -PS related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ vfmadd132ps %xmm0, %xmm1, %xmm2
+ vfmadd132ps (%rax), %xmm1, %xmm2
+ vfmadd132ps %ymm0, %ymm1, %ymm2
+ vfmadd132ps (%rax), %ymm1, %ymm2
+ vfmadd213ps %xmm0, %xmm1, %xmm2
+ vfmadd213ps (%rax), %xmm1, %xmm2
+ vfmadd213ps %ymm0, %ymm1, %ymm2
+ vfmadd213ps (%rax), %ymm1, %ymm2
+ vfmadd231ps %xmm0, %xmm1, %xmm2
+ vfmadd231ps (%rax), %xmm1, %xmm2
+ vfmadd231ps %ymm0, %ymm1, %ymm2
+ vfmadd231ps (%rax), %ymm1, %ymm2
+ vfmaddsub132ps %xmm0, %xmm1, %xmm2
+ vfmaddsub132ps (%rax), %xmm1, %xmm2
+ vfmaddsub132ps %ymm0, %ymm1, %ymm2
+ vfmaddsub132ps (%rax), %ymm1, %ymm2
+ vfmaddsub213ps %xmm0, %xmm1, %xmm2
+ vfmaddsub213ps (%rax), %xmm1, %xmm2
+ vfmaddsub213ps %ymm0, %ymm1, %ymm2
+ vfmaddsub213ps (%rax), %ymm1, %ymm2
+ vfmaddsub231ps %xmm0, %xmm1, %xmm2
+ vfmaddsub231ps (%rax), %xmm1, %xmm2
+ vfmaddsub231ps %ymm0, %ymm1, %ymm2
+ vfmaddsub231ps (%rax), %ymm1, %ymm2
+ vfmsub132ps %xmm0, %xmm1, %xmm2
+ vfmsub132ps (%rax), %xmm1, %xmm2
+ vfmsub132ps %ymm0, %ymm1, %ymm2
+ vfmsub132ps (%rax), %ymm1, %ymm2
+ vfmsub213ps %xmm0, %xmm1, %xmm2
+ vfmsub213ps (%rax), %xmm1, %xmm2
+ vfmsub213ps %ymm0, %ymm1, %ymm2
+ vfmsub213ps (%rax), %ymm1, %ymm2
+ vfmsub231ps %xmm0, %xmm1, %xmm2
+ vfmsub231ps (%rax), %xmm1, %xmm2
+ vfmsub231ps %ymm0, %ymm1, %ymm2
+ vfmsub231ps (%rax), %ymm1, %ymm2
+ vfmsubadd132ps %xmm0, %xmm1, %xmm2
+ vfmsubadd132ps (%rax), %xmm1, %xmm2
+ vfmsubadd132ps %ymm0, %ymm1, %ymm2
+ vfmsubadd132ps (%rax), %ymm1, %ymm2
+ vfmsubadd213ps %xmm0, %xmm1, %xmm2
+ vfmsubadd213ps (%rax), %xmm1, %xmm2
+ vfmsubadd213ps %ymm0, %ymm1, %ymm2
+ vfmsubadd213ps (%rax), %ymm1, %ymm2
+ vfmsubadd231ps %xmm0, %xmm1, %xmm2
+ vfmsubadd231ps (%rax), %xmm1, %xmm2
+ vfmsubadd231ps %ymm0, %ymm1, %ymm2
+ vfmsubadd231ps (%rax), %ymm1, %ymm2
+ vfnmadd132ps %xmm0, %xmm1, %xmm2
+ vfnmadd132ps (%rax), %xmm1, %xmm2
+ vfnmadd132ps %ymm0, %ymm1, %ymm2
+ vfnmadd132ps (%rax), %ymm1, %ymm2
+ vfnmadd213ps %xmm0, %xmm1, %xmm2
+ vfnmadd213ps (%rax), %xmm1, %xmm2
+ vfnmadd213ps %ymm0, %ymm1, %ymm2
+ vfnmadd213ps (%rax), %ymm1, %ymm2
+ vfnmadd231ps %xmm0, %xmm1, %xmm2
+ vfnmadd231ps (%rax), %xmm1, %xmm2
+ vfnmadd231ps %ymm0, %ymm1, %ymm2
+ vfnmadd231ps (%rax), %ymm1, %ymm2
+ vfnmsub132ps %xmm0, %xmm1, %xmm2
+ vfnmsub132ps (%rax), %xmm1, %xmm2
+ vfnmsub132ps %ymm0, %ymm1, %ymm2
+ vfnmsub132ps (%rax), %ymm1, %ymm2
+ vfnmsub213ps %xmm0, %xmm1, %xmm2
+ vfnmsub213ps (%rax), %xmm1, %xmm2
+ vfnmsub213ps %ymm0, %ymm1, %ymm2
+ vfnmsub213ps (%rax), %ymm1, %ymm2
+ vfnmsub231ps %xmm0, %xmm1, %xmm2
+ vfnmsub231ps (%rax), %xmm1, %xmm2
+ vfnmsub231ps %ymm0, %ymm1, %ymm2
+ vfnmsub231ps (%rax), %ymm1, %ymm2
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.fma-sd.out b/usr/src/test/util-tests/tests/dis/i386/64.fma-sd.out
new file mode 100644
index 0000000000..c304d58b1d
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.fma-sd.out
@@ -0,0 +1,24 @@
+ libdis_test: c4 e2 f1 99 d0 vfmadd132sd %xmm0,%xmm1,%xmm2
+ libdis_test+0x5: c4 e2 f1 99 10 vfmadd132sd (%rax),%xmm1,%xmm2
+ libdis_test+0xa: c4 e2 f1 a9 d0 vfmadd213sd %xmm0,%xmm1,%xmm2
+ libdis_test+0xf: c4 e2 f1 a9 10 vfmadd213sd (%rax),%xmm1,%xmm2
+ libdis_test+0x14: c4 e2 f1 b9 d0 vfmadd231sd %xmm0,%xmm1,%xmm2
+ libdis_test+0x19: c4 e2 f1 b9 10 vfmadd231sd (%rax),%xmm1,%xmm2
+ libdis_test+0x1e: c4 e2 f1 9b d0 vfmsub132sd %xmm0,%xmm1,%xmm2
+ libdis_test+0x23: c4 e2 f1 9b 10 vfmsub132sd (%rax),%xmm1,%xmm2
+ libdis_test+0x28: c4 e2 f1 ab d0 vfmsub213sd %xmm0,%xmm1,%xmm2
+ libdis_test+0x2d: c4 e2 f1 ab 10 vfmsub213sd (%rax),%xmm1,%xmm2
+ libdis_test+0x32: c4 e2 f1 bb d0 vfmsub231sd %xmm0,%xmm1,%xmm2
+ libdis_test+0x37: c4 e2 f1 bb 10 vfmsub231sd (%rax),%xmm1,%xmm2
+ libdis_test+0x3c: c4 e2 f1 9d d0 vfnmadd132sd %xmm0,%xmm1,%xmm2
+ libdis_test+0x41: c4 e2 f1 9d 10 vfnmadd132sd (%rax),%xmm1,%xmm2
+ libdis_test+0x46: c4 e2 f1 ad d0 vfnmadd213sd %xmm0,%xmm1,%xmm2
+ libdis_test+0x4b: c4 e2 f1 ad 10 vfnmadd213sd (%rax),%xmm1,%xmm2
+ libdis_test+0x50: c4 e2 f1 bd d0 vfnmadd231sd %xmm0,%xmm1,%xmm2
+ libdis_test+0x55: c4 e2 f1 bd 10 vfnmadd231sd (%rax),%xmm1,%xmm2
+ libdis_test+0x5a: c4 e2 f1 9f d0 vfnmsub132sd %xmm0,%xmm1,%xmm2
+ libdis_test+0x5f: c4 e2 f1 9f 10 vfnmsub132sd (%rax),%xmm1,%xmm2
+ libdis_test+0x64: c4 e2 f1 af d0 vfnmsub213sd %xmm0,%xmm1,%xmm2
+ libdis_test+0x69: c4 e2 f1 af 10 vfnmsub213sd (%rax),%xmm1,%xmm2
+ libdis_test+0x6e: c4 e2 f1 bf d0 vfnmsub231sd %xmm0,%xmm1,%xmm2
+ libdis_test+0x73: c4 e2 f1 bf 10 vfnmsub231sd (%rax),%xmm1,%xmm2
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.fma-sd.s b/usr/src/test/util-tests/tests/dis/i386/64.fma-sd.s
new file mode 100644
index 0000000000..dce16f1c12
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.fma-sd.s
@@ -0,0 +1,49 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test ADX related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ vfmadd132sd %xmm0, %xmm1, %xmm2
+ vfmadd132sd (%rax), %xmm1, %xmm2
+ vfmadd213sd %xmm0, %xmm1, %xmm2
+ vfmadd213sd (%rax), %xmm1, %xmm2
+ vfmadd231sd %xmm0, %xmm1, %xmm2
+ vfmadd231sd (%rax), %xmm1, %xmm2
+ vfmsub132sd %xmm0, %xmm1, %xmm2
+ vfmsub132sd (%rax), %xmm1, %xmm2
+ vfmsub213sd %xmm0, %xmm1, %xmm2
+ vfmsub213sd (%rax), %xmm1, %xmm2
+ vfmsub231sd %xmm0, %xmm1, %xmm2
+ vfmsub231sd (%rax), %xmm1, %xmm2
+ vfnmadd132sd %xmm0, %xmm1, %xmm2
+ vfnmadd132sd (%rax), %xmm1, %xmm2
+ vfnmadd213sd %xmm0, %xmm1, %xmm2
+ vfnmadd213sd (%rax), %xmm1, %xmm2
+ vfnmadd231sd %xmm0, %xmm1, %xmm2
+ vfnmadd231sd (%rax), %xmm1, %xmm2
+ vfnmsub132sd %xmm0, %xmm1, %xmm2
+ vfnmsub132sd (%rax), %xmm1, %xmm2
+ vfnmsub213sd %xmm0, %xmm1, %xmm2
+ vfnmsub213sd (%rax), %xmm1, %xmm2
+ vfnmsub231sd %xmm0, %xmm1, %xmm2
+ vfnmsub231sd (%rax), %xmm1, %xmm2
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.fma-ss.out b/usr/src/test/util-tests/tests/dis/i386/64.fma-ss.out
new file mode 100644
index 0000000000..f22054098c
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.fma-ss.out
@@ -0,0 +1,24 @@
+ libdis_test: c4 e2 71 99 d0 vfmadd132ss %xmm0,%xmm1,%xmm2
+ libdis_test+0x5: c4 e2 71 99 10 vfmadd132ss (%rax),%xmm1,%xmm2
+ libdis_test+0xa: c4 e2 71 a9 d0 vfmadd213ss %xmm0,%xmm1,%xmm2
+ libdis_test+0xf: c4 e2 71 a9 10 vfmadd213ss (%rax),%xmm1,%xmm2
+ libdis_test+0x14: c4 e2 71 b9 d0 vfmadd231ss %xmm0,%xmm1,%xmm2
+ libdis_test+0x19: c4 e2 71 b9 10 vfmadd231ss (%rax),%xmm1,%xmm2
+ libdis_test+0x1e: c4 e2 71 9b d0 vfmsub132ss %xmm0,%xmm1,%xmm2
+ libdis_test+0x23: c4 e2 71 9b 10 vfmsub132ss (%rax),%xmm1,%xmm2
+ libdis_test+0x28: c4 e2 71 ab d0 vfmsub213ss %xmm0,%xmm1,%xmm2
+ libdis_test+0x2d: c4 e2 71 ab 10 vfmsub213ss (%rax),%xmm1,%xmm2
+ libdis_test+0x32: c4 e2 71 bb d0 vfmsub231ss %xmm0,%xmm1,%xmm2
+ libdis_test+0x37: c4 e2 71 bb 10 vfmsub231ss (%rax),%xmm1,%xmm2
+ libdis_test+0x3c: c4 e2 71 9d d0 vfnmadd132ss %xmm0,%xmm1,%xmm2
+ libdis_test+0x41: c4 e2 71 9d 10 vfnmadd132ss (%rax),%xmm1,%xmm2
+ libdis_test+0x46: c4 e2 71 ad d0 vfnmadd213ss %xmm0,%xmm1,%xmm2
+ libdis_test+0x4b: c4 e2 71 ad 10 vfnmadd213ss (%rax),%xmm1,%xmm2
+ libdis_test+0x50: c4 e2 71 bd d0 vfnmadd231ss %xmm0,%xmm1,%xmm2
+ libdis_test+0x55: c4 e2 71 bd 10 vfnmadd231ss (%rax),%xmm1,%xmm2
+ libdis_test+0x5a: c4 e2 71 9f d0 vfnmsub132ss %xmm0,%xmm1,%xmm2
+ libdis_test+0x5f: c4 e2 71 9f 10 vfnmsub132ss (%rax),%xmm1,%xmm2
+ libdis_test+0x64: c4 e2 71 af d0 vfnmsub213ss %xmm0,%xmm1,%xmm2
+ libdis_test+0x69: c4 e2 71 af 10 vfnmsub213ss (%rax),%xmm1,%xmm2
+ libdis_test+0x6e: c4 e2 71 bf d0 vfnmsub231ss %xmm0,%xmm1,%xmm2
+ libdis_test+0x73: c4 e2 71 bf 10 vfnmsub231ss (%rax),%xmm1,%xmm2
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.fma-ss.s b/usr/src/test/util-tests/tests/dis/i386/64.fma-ss.s
new file mode 100644
index 0000000000..a7de4445c5
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.fma-ss.s
@@ -0,0 +1,49 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test ADX related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ vfmadd132ss %xmm0, %xmm1, %xmm2
+ vfmadd132ss (%rax), %xmm1, %xmm2
+ vfmadd213ss %xmm0, %xmm1, %xmm2
+ vfmadd213ss (%rax), %xmm1, %xmm2
+ vfmadd231ss %xmm0, %xmm1, %xmm2
+ vfmadd231ss (%rax), %xmm1, %xmm2
+ vfmsub132ss %xmm0, %xmm1, %xmm2
+ vfmsub132ss (%rax), %xmm1, %xmm2
+ vfmsub213ss %xmm0, %xmm1, %xmm2
+ vfmsub213ss (%rax), %xmm1, %xmm2
+ vfmsub231ss %xmm0, %xmm1, %xmm2
+ vfmsub231ss (%rax), %xmm1, %xmm2
+ vfnmadd132ss %xmm0, %xmm1, %xmm2
+ vfnmadd132ss (%rax), %xmm1, %xmm2
+ vfnmadd213ss %xmm0, %xmm1, %xmm2
+ vfnmadd213ss (%rax), %xmm1, %xmm2
+ vfnmadd231ss %xmm0, %xmm1, %xmm2
+ vfnmadd231ss (%rax), %xmm1, %xmm2
+ vfnmsub132ss %xmm0, %xmm1, %xmm2
+ vfnmsub132ss (%rax), %xmm1, %xmm2
+ vfnmsub213ss %xmm0, %xmm1, %xmm2
+ vfnmsub213ss (%rax), %xmm1, %xmm2
+ vfnmsub231ss %xmm0, %xmm1, %xmm2
+ vfnmsub231ss (%rax), %xmm1, %xmm2
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.lzcnt.out b/usr/src/test/util-tests/tests/dis/i386/64.lzcnt.out
new file mode 100644
index 0000000000..c6994d2158
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.lzcnt.out
@@ -0,0 +1,6 @@
+ libdis_test: 66 f3 0f bd d8 lzcntw %ax,%bx
+ libdis_test+0x5: 66 f3 0f bd 18 lzcntw (%rax),%bx
+ libdis_test+0xa: f3 0f bd d8 lzcntl %eax,%ebx
+ libdis_test+0xe: f3 0f bd 18 lzcntl (%rax),%ebx
+ libdis_test+0x12: f3 48 0f bd d8 lzcntq %rax,%rbx
+ libdis_test+0x17: f3 48 0f bd 18 lzcntq (%rax),%rbx
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.lzcnt.s b/usr/src/test/util-tests/tests/dis/i386/64.lzcnt.s
new file mode 100644
index 0000000000..83591c5c4d
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.lzcnt.s
@@ -0,0 +1,31 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test lzcnt related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ lzcntw %ax, %bx
+ lzcntw (%rax), %bx
+ lzcntl %eax, %ebx
+ lzcntl (%rax), %ebx
+ lzcntq %rax, %rbx
+ lzcntq (%rax), %rbx
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.popcnt.out b/usr/src/test/util-tests/tests/dis/i386/64.popcnt.out
new file mode 100644
index 0000000000..b491e8c9ff
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.popcnt.out
@@ -0,0 +1,6 @@
+ libdis_test: 66 f3 0f b8 d8 popcntw %ax,%bx
+ libdis_test+0x5: 66 f3 0f b8 18 popcntw (%rax),%bx
+ libdis_test+0xa: f3 0f b8 d8 popcntl %eax,%ebx
+ libdis_test+0xe: f3 0f b8 18 popcntl (%rax),%ebx
+ libdis_test+0x12: f3 48 0f b8 d8 popcntq %rax,%rbx
+ libdis_test+0x17: f3 48 0f b8 18 popcntq (%rax),%rbx
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.popcnt.s b/usr/src/test/util-tests/tests/dis/i386/64.popcnt.s
new file mode 100644
index 0000000000..7d8cd9ef6c
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.popcnt.s
@@ -0,0 +1,31 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test popcnt related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ popcntw %ax, %bx
+ popcntw (%rax), %bx
+ popcntl %eax, %ebx
+ popcntl (%rax), %ebx
+ popcntq %rax, %rbx
+ popcntq (%rax), %rbx
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.random.out b/usr/src/test/util-tests/tests/dis/i386/64.random.out
new file mode 100644
index 0000000000..84f896f865
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.random.out
@@ -0,0 +1,2 @@
+ libdis_test: 48 0f c7 f3 rdrand %rbx
+ libdis_test+0x4: 48 0f c7 fb rdseed %rbx
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.random.s b/usr/src/test/util-tests/tests/dis/i386/64.random.s
new file mode 100644
index 0000000000..4c41e0466b
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.random.s
@@ -0,0 +1,27 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test 64-bit random related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ rdrand %rbx
+ rdseed %rbx
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.sse-4.2.out b/usr/src/test/util-tests/tests/dis/i386/64.sse-4.2.out
new file mode 100644
index 0000000000..e9b998e666
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.sse-4.2.out
@@ -0,0 +1,19 @@
+ libdis_test: f2 0f 38 f0 d8 crc32b %al,%ebx
+ libdis_test+0x5: f2 48 0f 38 f0 d8 crc32b %al,%rbx
+ libdis_test+0xb: f2 0f 38 f0 18 crc32b (%rax),%ebx
+ libdis_test+0x10: 66 f2 0f 38 f1 d8 crc32w %ax,%ebx
+ libdis_test+0x16: 66 f2 0f 38 f1 18 crc32w (%rax),%ebx
+ libdis_test+0x1c: f2 0f 38 f1 d8 crc32l %eax,%ebx
+ libdis_test+0x21: f2 0f 38 f1 18 crc32l (%rax),%ebx
+ libdis_test+0x26: f2 48 0f 38 f1 d8 crc32q %rax,%rbx
+ libdis_test+0x2c: f2 48 0f 38 f1 18 crc32q (%rax),%rbx
+ libdis_test+0x32: 66 0f 3a 61 c8 23 pcmpestri $0x23,%xmm0,%xmm1
+ libdis_test+0x38: 66 0f 3a 61 08 23 pcmpestri $0x23,(%rax),%xmm1
+ libdis_test+0x3e: 66 0f 3a 60 c8 23 pcmpestrm $0x23,%xmm0,%xmm1
+ libdis_test+0x44: 66 0f 3a 60 08 23 pcmpestrm $0x23,(%rax),%xmm1
+ libdis_test+0x4a: 66 0f 38 37 c8 pcmpgtq %xmm0,%xmm1
+ libdis_test+0x4f: 66 0f 38 37 08 pcmpgtq (%rax),%xmm1
+ libdis_test+0x54: 66 0f 3a 63 c8 23 pcmpistri $0x23,%xmm0,%xmm1
+ libdis_test+0x5a: 66 0f 3a 63 08 23 pcmpistri $0x23,(%rax),%xmm1
+ libdis_test+0x60: 66 0f 3a 62 c8 23 pcmpistrm $0x23,%xmm0,%xmm1
+ libdis_test+0x66: 66 0f 3a 62 08 23 pcmpistrm $0x23,(%rax),%xmm1
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.sse-4.2.s b/usr/src/test/util-tests/tests/dis/i386/64.sse-4.2.s
new file mode 100644
index 0000000000..26d61710e4
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.sse-4.2.s
@@ -0,0 +1,44 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test SSE 4.2 related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ crc32b %al, %ebx
+ crc32b %al, %rbx
+ crc32b (%rax), %ebx
+ crc32w %ax, %ebx
+ crc32w (%rax), %ebx
+ crc32l %eax, %ebx
+ crc32l (%rax), %ebx
+ crc32q %rax, %rbx
+ crc32q (%rax), %rbx
+ pcmpestri $0x23, %xmm0, %xmm1
+ pcmpestri $0x23, (%rax), %xmm1
+ pcmpestrm $0x23, %xmm0, %xmm1
+ pcmpestrm $0x23, (%rax), %xmm1
+ pcmpgtq %xmm0, %xmm1
+ pcmpgtq (%rax), %xmm1
+ pcmpistri $0x23, %xmm0, %xmm1
+ pcmpistri $0x23, (%rax), %xmm1
+ pcmpistrm $0x23, %xmm0, %xmm1
+ pcmpistrm $0x23, (%rax), %xmm1
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.ssse3.out b/usr/src/test/util-tests/tests/dis/i386/64.ssse3.out
new file mode 100644
index 0000000000..c617bca453
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.ssse3.out
@@ -0,0 +1,64 @@
+ libdis_test: 0f 38 1c c8 pabsb %mm0,%mm1
+ libdis_test+0x4: 0f 38 1c 08 pabsb (%rax),%mm1
+ libdis_test+0x8: 66 0f 38 1c c8 pabsb %xmm0,%xmm1
+ libdis_test+0xd: 66 0f 38 1c 08 pabsb (%rax),%xmm1
+ libdis_test+0x12: 0f 38 1e c8 pabsd %mm0,%mm1
+ libdis_test+0x16: 0f 38 1e 08 pabsd (%rax),%mm1
+ libdis_test+0x1a: 66 0f 38 1e c8 pabsd %xmm0,%xmm1
+ libdis_test+0x1f: 66 0f 38 1e 08 pabsd (%rax),%xmm1
+ libdis_test+0x24: 0f 38 1d c8 pabsw %mm0,%mm1
+ libdis_test+0x28: 0f 38 1d 08 pabsw (%rax),%mm1
+ libdis_test+0x2c: 66 0f 38 1d c8 pabsw %xmm0,%xmm1
+ libdis_test+0x31: 66 0f 38 1d 08 pabsw (%rax),%xmm1
+ libdis_test+0x36: 0f 3a 0f c8 23 palignr $0x23,%mm0,%mm1
+ libdis_test+0x3b: 0f 3a 0f 08 23 palignr $0x23,(%rax),%mm1
+ libdis_test+0x40: 66 0f 3a 0f c8 23 palignr $0x23,%xmm0,%xmm1
+ libdis_test+0x46: 66 0f 3a 0f 08 23 palignr $0x23,(%rax),%xmm1
+ libdis_test+0x4c: 0f 38 02 c8 phaddd %mm0,%mm1
+ libdis_test+0x50: 0f 38 02 08 phaddd (%rax),%mm1
+ libdis_test+0x54: 66 0f 38 02 c8 phaddd %xmm0,%xmm1
+ libdis_test+0x59: 66 0f 38 02 08 phaddd (%rax),%xmm1
+ libdis_test+0x5e: 0f 38 01 c8 phaddw %mm0,%mm1
+ libdis_test+0x62: 0f 38 01 08 phaddw (%rax),%mm1
+ libdis_test+0x66: 66 0f 38 01 c8 phaddw %xmm0,%xmm1
+ libdis_test+0x6b: 66 0f 38 01 08 phaddw (%rax),%xmm1
+ libdis_test+0x70: 0f 38 03 c8 phaddsw %mm0,%mm1
+ libdis_test+0x74: 0f 38 03 08 phaddsw (%rax),%mm1
+ libdis_test+0x78: 66 0f 38 03 c8 phaddsw %xmm0,%xmm1
+ libdis_test+0x7d: 66 0f 38 03 08 phaddsw (%rax),%xmm1
+ libdis_test+0x82: 0f 38 06 c8 phsubd %mm0,%mm1
+ libdis_test+0x86: 0f 38 06 08 phsubd (%rax),%mm1
+ libdis_test+0x8a: 66 0f 38 06 c8 phsubd %xmm0,%xmm1
+ libdis_test+0x8f: 66 0f 38 06 08 phsubd (%rax),%xmm1
+ libdis_test+0x94: 0f 38 05 c8 phsubw %mm0,%mm1
+ libdis_test+0x98: 0f 38 05 08 phsubw (%rax),%mm1
+ libdis_test+0x9c: 66 0f 38 05 c8 phsubw %xmm0,%xmm1
+ libdis_test+0xa1: 66 0f 38 05 08 phsubw (%rax),%xmm1
+ libdis_test+0xa6: 0f 38 07 c8 phsubsw %mm0,%mm1
+ libdis_test+0xaa: 0f 38 07 08 phsubsw (%rax),%mm1
+ libdis_test+0xae: 66 0f 38 07 c8 phsubsw %xmm0,%xmm1
+ libdis_test+0xb3: 66 0f 38 07 08 phsubsw (%rax),%xmm1
+ libdis_test+0xb8: 0f 38 04 c8 pmaddubsw %mm0,%mm1
+ libdis_test+0xbc: 0f 38 04 08 pmaddubsw (%rax),%mm1
+ libdis_test+0xc0: 66 0f 38 04 c8 pmaddubsw %xmm0,%xmm1
+ libdis_test+0xc5: 66 0f 38 04 08 pmaddubsw (%rax),%xmm1
+ libdis_test+0xca: 0f 38 0b c8 pmulhrsw %mm0,%mm1
+ libdis_test+0xce: 0f 38 0b 08 pmulhrsw (%rax),%mm1
+ libdis_test+0xd2: 66 0f 38 0b c8 pmulhrsw %xmm0,%xmm1
+ libdis_test+0xd7: 66 0f 38 0b 08 pmulhrsw (%rax),%xmm1
+ libdis_test+0xdc: 0f 38 00 c8 pshufb %mm0,%mm1
+ libdis_test+0xe0: 0f 38 00 08 pshufb (%rax),%mm1
+ libdis_test+0xe4: 66 0f 38 00 c8 pshufb %xmm0,%xmm1
+ libdis_test+0xe9: 66 0f 38 00 08 pshufb (%rax),%xmm1
+ libdis_test+0xee: 0f 38 08 c8 psignb %mm0,%mm1
+ libdis_test+0xf2: 0f 38 08 08 psignb (%rax),%mm1
+ libdis_test+0xf6: 66 0f 38 08 c8 psignb %xmm0,%xmm1
+ libdis_test+0xfb: 66 0f 38 08 08 psignb (%rax),%xmm1
+ libdis_test+0x100: 0f 38 0a c8 psignd %mm0,%mm1
+ libdis_test+0x104: 0f 38 0a 08 psignd (%rax),%mm1
+ libdis_test+0x108: 66 0f 38 0a c8 psignd %xmm0,%xmm1
+ libdis_test+0x10d: 66 0f 38 0a 08 psignd (%rax),%xmm1
+ libdis_test+0x112: 0f 38 09 c8 psignw %mm0,%mm1
+ libdis_test+0x116: 0f 38 09 08 psignw (%rax),%mm1
+ libdis_test+0x11a: 66 0f 38 09 c8 psignw %xmm0,%xmm1
+ libdis_test+0x11f: 66 0f 38 09 08 psignw (%rax),%xmm1
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.ssse3.s b/usr/src/test/util-tests/tests/dis/i386/64.ssse3.s
new file mode 100644
index 0000000000..8015ea075a
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.ssse3.s
@@ -0,0 +1,89 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test SSSE3 related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ pabsb %mm0, %mm1
+ pabsb (%rax), %mm1
+ pabsb %xmm0, %xmm1
+ pabsb (%rax), %xmm1
+ pabsd %mm0, %mm1
+ pabsd (%rax), %mm1
+ pabsd %xmm0, %xmm1
+ pabsd (%rax), %xmm1
+ pabsw %mm0, %mm1
+ pabsw (%rax), %mm1
+ pabsw %xmm0, %xmm1
+ pabsw (%rax), %xmm1
+ palignr $0x23, %mm0, %mm1
+ palignr $0x23, (%rax), %mm1
+ palignr $0x23, %xmm0, %xmm1
+ palignr $0x23, (%rax), %xmm1
+ phaddd %mm0, %mm1
+ phaddd (%rax), %mm1
+ phaddd %xmm0, %xmm1
+ phaddd (%rax), %xmm1
+ phaddw %mm0, %mm1
+ phaddw (%rax), %mm1
+ phaddw %xmm0, %xmm1
+ phaddw (%rax), %xmm1
+ phaddsw %mm0, %mm1
+ phaddsw (%rax), %mm1
+ phaddsw %xmm0, %xmm1
+ phaddsw (%rax), %xmm1
+ phsubd %mm0, %mm1
+ phsubd (%rax), %mm1
+ phsubd %xmm0, %xmm1
+ phsubd (%rax), %xmm1
+ phsubw %mm0, %mm1
+ phsubw (%rax), %mm1
+ phsubw %xmm0, %xmm1
+ phsubw (%rax), %xmm1
+ phsubsw %mm0, %mm1
+ phsubsw (%rax), %mm1
+ phsubsw %xmm0, %xmm1
+ phsubsw (%rax), %xmm1
+ pmaddubsw %mm0, %mm1
+ pmaddubsw (%rax), %mm1
+ pmaddubsw %xmm0, %xmm1
+ pmaddubsw (%rax), %xmm1
+ pmulhrsw %mm0, %mm1
+ pmulhrsw (%rax), %mm1
+ pmulhrsw %xmm0, %xmm1
+ pmulhrsw (%rax), %xmm1
+ pshufb %mm0, %mm1
+ pshufb (%rax), %mm1
+ pshufb %xmm0, %xmm1
+ pshufb (%rax), %xmm1
+ psignb %mm0, %mm1
+ psignb (%rax), %mm1
+ psignb %xmm0, %xmm1
+ psignb (%rax), %xmm1
+ psignd %mm0, %mm1
+ psignd (%rax), %mm1
+ psignd %xmm0, %xmm1
+ psignd (%rax), %xmm1
+ psignw %mm0, %mm1
+ psignw (%rax), %mm1
+ psignw %xmm0, %xmm1
+ psignw (%rax), %xmm1
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.vmx.out b/usr/src/test/util-tests/tests/dis/i386/64.vmx.out
new file mode 100644
index 0000000000..053b9cdd0d
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.vmx.out
@@ -0,0 +1,11 @@
+ libdis_test: 66 0f c7 30 vmclear (%rax)
+ libdis_test+0x4: 0f c7 30 vmptrld (%rax)
+ libdis_test+0x7: 0f c7 38 vmptrst (%rax)
+ libdis_test+0xa: 0f 78 d8 vmread %rbx,%rax
+ libdis_test+0xd: 0f 78 18 vmread %rbx,(%rax)
+ libdis_test+0x10: 0f 78 d8 vmread %rbx,%rax
+ libdis_test+0x13: 0f 78 18 vmread %rbx,(%rax)
+ libdis_test+0x16: 0f 79 d8 vmwrite %rax,%rbx
+ libdis_test+0x19: 0f 79 18 vmwrite (%rax),%rbx
+ libdis_test+0x1c: 0f 79 d8 vmwrite %rax,%rbx
+ libdis_test+0x1f: 0f 79 18 vmwrite (%rax),%rbx
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.vmx.s b/usr/src/test/util-tests/tests/dis/i386/64.vmx.s
new file mode 100644
index 0000000000..da9e118fd9
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.vmx.s
@@ -0,0 +1,36 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test 64-bit specific VMX related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ vmclear (%rax)
+ vmptrld (%rax)
+ vmptrst (%rax)
+ vmread %rbx, %rax
+ vmread %rbx, (%rax)
+ vmreadq %rbx, %rax
+ vmreadq %rbx, (%rax)
+ vmwrite %rax, %rbx
+ vmwrite (%rax), %rbx
+ vmwriteq %rax, %rbx
+ vmwriteq (%rax), %rbx
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.xsave.out b/usr/src/test/util-tests/tests/dis/i386/64.xsave.out
new file mode 100644
index 0000000000..7e07b6c1ec
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.xsave.out
@@ -0,0 +1,4 @@
+ libdis_test: 0f ae 28 xrstor (%rax)
+ libdis_test+0x3: 0f ae 20 xsave (%rax)
+ libdis_test+0x6: 0f 01 d0 xgetbv
+ libdis_test+0x9: 0f 01 d1 xsetbv
diff --git a/usr/src/test/util-tests/tests/dis/i386/64.xsave.s b/usr/src/test/util-tests/tests/dis/i386/64.xsave.s
new file mode 100644
index 0000000000..7f4627e691
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/64.xsave.s
@@ -0,0 +1,30 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test 32-bit xsave related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ xrstor (%rax)
+ xsave (%rax)
+
+ xgetbv
+ xsetbv
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/tst.mwait.out b/usr/src/test/util-tests/tests/dis/i386/tst.mwait.out
new file mode 100644
index 0000000000..8a6b07233e
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/tst.mwait.out
@@ -0,0 +1,2 @@
+ libdis_test: 0f 01 c8 monitor
+ libdis_test+0x3: 0f 01 c9 mwait
diff --git a/usr/src/test/util-tests/tests/dis/i386/tst.mwait.s b/usr/src/test/util-tests/tests/dis/i386/tst.mwait.s
new file mode 100644
index 0000000000..5ce9422a3b
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/tst.mwait.s
@@ -0,0 +1,27 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test monitor/mawit related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ monitor
+ mwait
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/tst.random.out b/usr/src/test/util-tests/tests/dis/i386/tst.random.out
new file mode 100644
index 0000000000..9a233bdf69
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/tst.random.out
@@ -0,0 +1,4 @@
+ libdis_test: 66 0f c7 f3 rdrand %bx
+ libdis_test+0x4: 66 0f c7 f3 rdrand %bx
+ libdis_test+0x8: 0f c7 fb rdseed %ebx
+ libdis_test+0xb: 0f c7 fb rdseed %ebx
diff --git a/usr/src/test/util-tests/tests/dis/i386/tst.random.s b/usr/src/test/util-tests/tests/dis/i386/tst.random.s
new file mode 100644
index 0000000000..10a13856a3
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/tst.random.s
@@ -0,0 +1,29 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test random related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ rdrand %bx
+ rdrand %bx
+ rdseed %ebx
+ rdseed %ebx
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/tst.smap.out b/usr/src/test/util-tests/tests/dis/i386/tst.smap.out
new file mode 100644
index 0000000000..bc78291a4e
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/tst.smap.out
@@ -0,0 +1,2 @@
+ libdis_test: 0f 01 cb stac
+ libdis_test+0x3: 0f 01 ca clac
diff --git a/usr/src/test/util-tests/tests/dis/i386/tst.smap.s b/usr/src/test/util-tests/tests/dis/i386/tst.smap.s
new file mode 100644
index 0000000000..6a92d5f14e
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/tst.smap.s
@@ -0,0 +1,27 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test SMAP related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ stac
+ clac
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/i386/tst.vmx.out b/usr/src/test/util-tests/tests/dis/i386/tst.vmx.out
new file mode 100644
index 0000000000..7dd41d0750
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/tst.vmx.out
@@ -0,0 +1,4 @@
+ libdis_test: 0f 01 c1 vmcall
+ libdis_test+0x3: 0f 01 c2 vmlaunch
+ libdis_test+0x6: 0f 01 c3 vmresume
+ libdis_test+0x9: 0f 01 c4 vmxoff
diff --git a/usr/src/test/util-tests/tests/dis/i386/tst.vmx.s b/usr/src/test/util-tests/tests/dis/i386/tst.vmx.s
new file mode 100644
index 0000000000..0b8db8aa6d
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/i386/tst.vmx.s
@@ -0,0 +1,29 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test general VMX related instructions
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ vmcall
+ vmlaunch
+ vmresume
+ vmxoff
+.size libdis_test, [.-libdis_test]
diff --git a/usr/src/test/util-tests/tests/dis/sparc/tst.regs.out b/usr/src/test/util-tests/tests/dis/sparc/tst.regs.out
new file mode 100644
index 0000000000..6ea5bee772
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/sparc/tst.regs.out
@@ -0,0 +1,30 @@
+ libdis_test: 84 00 00 01 add %g0, %g1, %g2
+ libdis_test+0x4: 86 00 40 02 add %g1, %g2, %g3
+ libdis_test+0x8: 88 00 80 03 add %g2, %g3, %g4
+ libdis_test+0xc: 8a 00 c0 04 add %g3, %g4, %g5
+ libdis_test+0x10: 8c 01 00 05 add %g4, %g5, %g6
+ libdis_test+0x14: 8e 01 40 06 add %g5, %g6, %g7
+ libdis_test+0x18: 90 01 80 07 add %g6, %g7, %o0
+ libdis_test+0x1c: 92 01 c0 08 add %g7, %o0, %o1
+ libdis_test+0x20: 94 02 00 09 add %o0, %o1, %o2
+ libdis_test+0x24: 96 02 40 0a add %o1, %o2, %o3
+ libdis_test+0x28: 98 02 80 0b add %o2, %o3, %o4
+ libdis_test+0x2c: 9a 02 c0 0c add %o3, %o4, %o5
+ libdis_test+0x30: 9c 03 00 0d add %o4, %o5, %sp
+ libdis_test+0x34: 9e 03 40 0e add %o5, %sp, %o7
+ libdis_test+0x38: a0 03 80 0f add %sp, %o7, %l0
+ libdis_test+0x3c: a2 03 c0 10 add %o7, %l0, %l1
+ libdis_test+0x40: a4 04 00 11 add %l0, %l1, %l2
+ libdis_test+0x44: a6 04 40 12 add %l1, %l2, %l3
+ libdis_test+0x48: a8 04 80 13 add %l2, %l3, %l4
+ libdis_test+0x4c: aa 04 c0 14 add %l3, %l4, %l5
+ libdis_test+0x50: ac 05 00 15 add %l4, %l5, %l6
+ libdis_test+0x54: ae 05 40 16 add %l5, %l6, %l7
+ libdis_test+0x58: b0 05 80 17 add %l6, %l7, %i0
+ libdis_test+0x5c: b2 05 c0 18 add %l7, %i0, %i1
+ libdis_test+0x60: b4 06 00 19 add %i0, %i1, %i2
+ libdis_test+0x64: b6 06 40 1a add %i1, %i2, %i3
+ libdis_test+0x68: b8 06 80 1b add %i2, %i3, %i4
+ libdis_test+0x6c: ba 06 c0 1c add %i3, %i4, %i5
+ libdis_test+0x70: bc 07 00 1d add %i4, %i5, %fp
+ libdis_test+0x74: be 07 40 1e add %i5, %fp, %i7
diff --git a/usr/src/test/util-tests/tests/dis/sparc/tst.regs.s b/usr/src/test/util-tests/tests/dis/sparc/tst.regs.s
new file mode 100644
index 0000000000..4071397735
--- /dev/null
+++ b/usr/src/test/util-tests/tests/dis/sparc/tst.regs.s
@@ -0,0 +1,55 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2016 Joyent, Inc.
+ */
+
+/*
+ * Test basic register naming
+ */
+
+.text
+.align 16
+.globl libdis_test
+.type libdis_test, @function
+libdis_test:
+ add %g0, %g1, %g2
+ add %g1, %g2, %g3
+ add %g2, %g3, %g4
+ add %g3, %g4, %g5
+ add %g4, %g5, %g6
+ add %g5, %g6, %g7
+ add %g6, %g7, %o0
+ add %g7, %o0, %o1
+ add %o0, %o1, %o2
+ add %o1, %o2, %o3
+ add %o2, %o3, %o4
+ add %o3, %o4, %o5
+ add %o4, %o5, %sp
+ add %o5, %sp, %o7
+ add %sp, %o7, %l0
+ add %o7, %l0, %l1
+ add %l0, %l1, %l2
+ add %l1, %l2, %l3
+ add %l2, %l3, %l4
+ add %l3, %l4, %l5
+ add %l4, %l5, %l6
+ add %l5, %l6, %l7
+ add %l6, %l7, %i0
+ add %l7, %i0, %i1
+ add %i0, %i1, %i2
+ add %i1, %i2, %i3
+ add %i2, %i3, %i4
+ add %i3, %i4, %i5
+ add %i4, %i5, %fp
+ add %i5, %fp, %i7
+.size libdis_test, [.-libdis_test]