summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/common/dis/i386/dis_tables.c21
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.xsave.out12
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/32.xsave.s9
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.xsave.out12
-rw-r--r--usr/src/test/util-tests/tests/dis/i386/64.xsave.s10
5 files changed, 47 insertions, 17 deletions
diff --git a/usr/src/common/dis/i386/dis_tables.c b/usr/src/common/dis/i386/dis_tables.c
index 4204f8ab9e..beb1296f57 100644
--- a/usr/src/common/dis/i386/dis_tables.c
+++ b/usr/src/common/dis/i386/dis_tables.c
@@ -573,8 +573,8 @@ const instable_t dis_op0FBA[8] = {
const instable_t dis_op0FC7[8] = {
-/* [0] */ INVALID, TNS("cmpxchg8b",M), INVALID, INVALID,
-/* [4] */ INVALID, INVALID, TNS("vmptrld",MG9), TNS("vmptrst",MG9),
+/* [0] */ INVALID, TNS("cmpxchg8b",M), INVALID, TNS("xrstors",MG9),
+/* [4] */ TNS("xsavec",MG9), TNS("xsaves",MG9), TNS("vmptrld",MG9), TNS("vmptrst",MG9),
};
/*
@@ -3597,6 +3597,12 @@ dtrace_disx86(dis86_t *x, uint_t cpu_mode)
opnd_size_prefix = 0;
if (opnd_size == SIZE16)
opnd_size = SIZE32;
+ } else if (reg == 4 || reg == 5) {
+ /*
+ * We have xsavec (4) or xsaves (5), so rewrite.
+ */
+ dp = (instable_t *)&dis_op0FC7[reg];
+ break;
}
break;
@@ -4829,7 +4835,8 @@ xmmprm:
case XMMFENCE:
/*
- * XRSTOR and LFENCE share the same opcode but differ in mode
+ * XRSTOR, XSAVEOPT and LFENCE share the same opcode but
+ * differ in mode and reg.
*/
dtrace_get_modrm(x, &mode, &reg, &r_m);
@@ -4845,7 +4852,13 @@ xmmprm:
goto error;
} else {
#ifdef DIS_TEXT
- (void) strncpy(x->d86_mnem, "xrstor", OPLEN);
+ if (reg == 5) {
+ (void) strncpy(x->d86_mnem, "xrstor", OPLEN);
+ } else if (reg == 6) {
+ (void) strncpy(x->d86_mnem, "xsaveopt", OPLEN);
+ } else {
+ goto error;
+ }
#endif
dtrace_rex_adjust(rex_prefix, mode, &reg, &r_m);
dtrace_get_operand(x, mode, r_m, BYTE_OPND, 0);
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
index 4ad87bd36c..7b43ae4934 100644
--- a/usr/src/test/util-tests/tests/dis/i386/32.xsave.out
+++ b/usr/src/test/util-tests/tests/dis/i386/32.xsave.out
@@ -1,4 +1,8 @@
- 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
+ libdis_test: 0f ae 20 xsave (%eax)
+ libdis_test+0x3: 0f ae 28 xrstor (%eax)
+ libdis_test+0x6: 0f c7 20 xsavec (%eax)
+ libdis_test+0x9: 0f ae 30 xsaveopt (%eax)
+ libdis_test+0xc: 0f c7 28 xsaves (%eax)
+ libdis_test+0xf: 0f c7 18 xrstors (%eax)
+ libdis_test+0x12: 0f 01 d0 xgetbv
+ libdis_test+0x15: 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
index 7f50b17b86..1fe2d35a39 100644
--- a/usr/src/test/util-tests/tests/dis/i386/32.xsave.s
+++ b/usr/src/test/util-tests/tests/dis/i386/32.xsave.s
@@ -10,7 +10,7 @@
*/
/*
- * Copyright 2016 Joyent, Inc.
+ * Copyright 2017 Joyent, Inc.
*/
/*
@@ -22,8 +22,13 @@
.globl libdis_test
.type libdis_test, @function
libdis_test:
- xrstor (%eax)
xsave (%eax)
+ xrstor (%eax)
+ xsavec (%eax)
+ xsaveopt (%eax)
+ xsaves (%eax)
+ xrstors (%eax)
+
xgetbv
xsetbv
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
index 7e07b6c1ec..b987aa1562 100644
--- a/usr/src/test/util-tests/tests/dis/i386/64.xsave.out
+++ b/usr/src/test/util-tests/tests/dis/i386/64.xsave.out
@@ -1,4 +1,8 @@
- 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
+ libdis_test: 0f ae 20 xsave (%rax)
+ libdis_test+0x3: 0f ae 28 xrstor (%rax)
+ libdis_test+0x6: 0f c7 20 xsavec (%rax)
+ libdis_test+0x9: 0f ae 30 xsaveopt (%rax)
+ libdis_test+0xc: 0f c7 28 xsaves (%rax)
+ libdis_test+0xf: 0f c7 18 xrstors (%rax)
+ libdis_test+0x12: 0f 01 d0 xgetbv
+ libdis_test+0x15: 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
index 7f4627e691..b56a22e2dd 100644
--- a/usr/src/test/util-tests/tests/dis/i386/64.xsave.s
+++ b/usr/src/test/util-tests/tests/dis/i386/64.xsave.s
@@ -10,11 +10,11 @@
*/
/*
- * Copyright 2016 Joyent, Inc.
+ * Copyright 2017 Joyent, Inc.
*/
/*
- * Test 32-bit xsave related instructions
+ * Test 64-bit xsave related instructions
*/
.text
@@ -22,8 +22,12 @@
.globl libdis_test
.type libdis_test, @function
libdis_test:
- xrstor (%rax)
xsave (%rax)
+ xrstor (%rax)
+ xsavec (%rax)
+ xsaveopt (%rax)
+ xsaves (%rax)
+ xrstors (%rax)
xgetbv
xsetbv