@@ -6655,20 +6655,12 @@ static int
load_insn_p (void)
{
unsigned int dest;
- int any_vex_p = is_any_vex_encoding (&i.tm);
unsigned int base_opcode = i.tm.base_opcode | 1;
- if (!any_vex_p)
- {
- /* Anysize insns: lea, invlpg, clflush, prefetch*, bndmk, bndcl, bndcu,
- bndcn, bndstx, bndldx, clflushopt, clwb, cldemote. */
- if (i.tm.opcode_modifier.operandconstraint == ANY_SIZE)
- return 0;
-
- /* pop. */
- if (i.tm.mnem_off == MN_pop)
- return 1;
- }
+ /* Anysize insns: lea, invlpg, clflush, prefetch*, bndmk, bndcl, bndcu,
+ bndcn, bndstx, bndldx, clflushopt, clwb, cldemote. */
+ if (i.tm.opcode_modifier.operandconstraint == ANY_SIZE)
+ return 0;
if (i.tm.opcode_space == SPACE_BASE)
{
@@ -6691,9 +6683,15 @@ load_insn_p (void)
/* No memory operand. */
if (!i.mem_operands)
+ {
+ /* pop. */
+ if (i.tm.mnem_off == MN_pop)
+ return 1;
+
return 0;
+ }
- if (any_vex_p)
+ if (is_any_vex_encoding (&i.tm))
{
if (i.tm.mnem_off == MN_vldmxcsr)
return 1;
@@ -6705,8 +6703,8 @@ load_insn_p (void)
|| (base_opcode | 2) == 0x87)
return 1;
- /* test, not, neg, mul, imul, div, idiv. */
- if (base_opcode == 0xf7 && i.tm.extension_opcode != 1)
+ /* test, neg, mul, imul, div, idiv. */
+ if (base_opcode == 0xf7 && i.tm.extension_opcode != 2)
return 1;
/* inc, dec. */
@@ -6719,7 +6717,9 @@ load_insn_p (void)
/* rol, ror, rcl, rcr, shl/sal, shr, sar. */
if ((base_opcode == 0xc1 || (base_opcode | 2) == 0xd3)
- && i.tm.extension_opcode != 6)
+ && (!operand_type_check (i.types[0], imm)
+ || i.op[0].imms->X_op != O_constant
+ || i.op[0].imms->X_add_number != 0))
return 1;
/* arpl. (Also movxsd, which otherwise would be covered towards
@@ -6776,7 +6776,10 @@ load_insn_p (void)
return 1;
/* shld, shrd. */
- if ((base_opcode | 8) == 0xad)
+ if ((base_opcode | 8) == 0xad
+ && (!operand_type_check (i.types[0], imm)
+ || i.op[0].imms->X_op != O_constant
+ || i.op[0].imms->X_add_number != 0))
return 1;
/* cmpxchg8b, cmpxchg16b, xrstors, vmptrld, vmxon, vmclear, vmptrst. */
@@ -6806,17 +6809,22 @@ load_insn_p (void)
|| (i.tm.extension_opcode | 1) == 5))
return 1;
- /* lgdt, lidt, lmsw. */
+ /* lgdt, lmsw. */
if (i.tm.base_opcode == 0x01
- && (i.tm.extension_opcode == 2
- || i.tm.extension_opcode == 3
- || i.tm.extension_opcode == 6))
+ && (i.tm.extension_opcode | 4) == 6)
return 1;
/* cmpxchg, xadd. */
if (base_opcode == 0xb1 || base_opcode == 0xc1)
return 1;
}
+ else if (i.tm.opcode_space == SPACE_0F38)
+ {
+ /* invpcid. */
+ if (i.tm.base_opcode == 0x82
+ && i.tm.opcode_modifier.opcodeprefix == PREFIX_0X66)
+ return 0;
+ }
dest = i.operands - 1;
@@ -13,6 +13,7 @@ Disassembly of section .text:
+[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: 0f 01 55 00 lgdtl 0x0\(%ebp\)
+[a-f0-9]+: 0f ae e8 lfence
+ +[a-f0-9]+: 0f 01 5d 00 lidtl 0x0\(%ebp\)
+[a-f0-9]+: 0f c7 75 00 vmptrld 0x0\(%ebp\)
+[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: 0f c7 7d 00 vmptrst 0x0\(%ebp\)
@@ -24,7 +25,6 @@ Disassembly of section .text:
+[a-f0-9]+: 0f 78 0b vmread %ecx,\(%ebx\)
+[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: 66 0f 38 82 55 00 invpcid 0x0\(%ebp\),%edx
- +[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: 0f 01 7d 00 invlpg 0x0\(%ebp\)
+[a-f0-9]+: 0f ae 7d 00 clflush 0x0\(%ebp\)
+[a-f0-9]+: 66 0f ae 7d 00 clflushopt 0x0\(%ebp\)
@@ -92,17 +92,16 @@ Disassembly of section .text:
+[a-f0-9]+: 0f 0f 66 02 b0 pfcmpeq 0x2\(%esi\),%mm4
+[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: 8f 00 pop \(%eax\)
- +[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: 58 pop %eax
+[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: 66 d1 11 rclw \$1,\(%ecx\)
+[a-f0-9]+: 0f ae e8 lfence
+ +[a-f0-9]+: c0 19 00 rcrb \$(0x)?0,\(%ecx\)
+[a-f0-9]+: f7 01 01 00 00 00 testl \$0x1,\(%ecx\)
+[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: ff 01 incl \(%ecx\)
+[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: f7 11 notl \(%ecx\)
- +[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: f7 31 divl \(%ecx\)
+[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: f7 21 mull \(%ecx\)
@@ -131,6 +130,7 @@ Disassembly of section .text:
+[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: 0f a3 01 bt %eax,\(%ecx\)
+[a-f0-9]+: 0f ae e8 lfence
+ +[a-f0-9]+: 0f a4 01 00 shld \$(0x)?0,%eax,\(%ecx\)
+[a-f0-9]+: 0f a4 01 01 shld \$(0x)?1,%eax,\(%ecx\)
+[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: 0f ad 01 shrd %cl,%eax,\(%ecx\)
@@ -2,6 +2,7 @@
_start:
vldmxcsr (%ebp)
lgdt (%ebp)
+ lidt (%ebp)
vmptrld (%ebp)
vmptrst (%ebp)
vmclear (%ebp)
@@ -57,6 +58,7 @@ _start:
popl (%eax)
popl %eax
rclw (%ecx)
+ rcrb $0,(%ecx)
testl $1,(%ecx)
incl (%ecx)
notl (%ecx)
@@ -75,6 +77,7 @@ _start:
addl $1, (%eax)
btl $1, (%eax)
bt %eax, (%ecx)
+ shld $0, %eax, (%ecx)
shld $1, %eax, (%ecx)
shrd %cl, %eax, (%ecx)
cmpxchg %eax, (%ebx)
@@ -13,6 +13,7 @@ Disassembly of section .text:
+[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: 0f 01 55 00 lgdt 0x0\(%rbp\)
+[a-f0-9]+: 0f ae e8 lfence
+ +[a-f0-9]+: 0f 01 5d 00 lidt 0x0\(%rbp\)
+[a-f0-9]+: 0f c7 75 00 vmptrld 0x0\(%rbp\)
+[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: 0f c7 7d 00 vmptrst 0x0\(%rbp\)
@@ -24,7 +25,6 @@ Disassembly of section .text:
+[a-f0-9]+: 0f 78 0b vmread %rcx,\(%rbx\)
+[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: 66 0f 38 82 55 00 invpcid 0x0\(%rbp\),%rdx
- +[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: 67 0f 01 38 invlpg \(%eax\)
+[a-f0-9]+: 0f ae 7d 00 clflush 0x0\(%rbp\)
+[a-f0-9]+: 66 0f ae 7d 00 clflushopt 0x0\(%rbp\)
@@ -99,17 +99,16 @@ Disassembly of section .text:
+[a-f0-9]+: 0f 0f 66 02 b0 pfcmpeq 0x2\(%rsi\),%mm4
+[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: 8f 00 pop \(%rax\)
- +[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: 58 pop %rax
+[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: 66 d1 11 rclw \$1,\(%rcx\)
+[a-f0-9]+: 0f ae e8 lfence
+ +[a-f0-9]+: 48 c1 19 00 rcrq \$(0x)?0,\(%rcx\)
+[a-f0-9]+: f7 01 01 00 00 00 testl \$0x1,\(%rcx\)
+[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: ff 01 incl \(%rcx\)
+[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: f7 11 notl \(%rcx\)
- +[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: f7 31 divl \(%rcx\)
+[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: f7 21 mull \(%rcx\)
@@ -138,6 +137,7 @@ Disassembly of section .text:
+[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: 0f bb 01 btc %eax,\(%rcx\)
+[a-f0-9]+: 0f ae e8 lfence
+ +[a-f0-9]+: 0f ac 01 00 shrd \$(0x)?0,%eax,\(%rcx\)
+[a-f0-9]+: 0f ac 01 01 shrd \$(0x)?1,%eax,\(%rcx\)
+[a-f0-9]+: 0f ae e8 lfence
+[a-f0-9]+: 0f a5 01 shld %cl,%eax,\(%rcx\)
@@ -2,6 +2,7 @@
_start:
vldmxcsr (%rbp)
lgdt (%rbp)
+ lidt (%rbp)
vmptrld (%rbp)
vmptrst (%rbp)
vmclear (%rbp)
@@ -64,6 +65,7 @@ _start:
popq (%rax)
popq %rax
rclw (%rcx)
+ rcrq $0,(%rcx)
testl $1,(%rcx)
incl (%rcx)
notl (%rcx)
@@ -82,6 +84,7 @@ _start:
addl $1, (%r11)
btl $1, (%r11)
btc %eax, (%rcx)
+ shrd $0, %eax, (%rcx)
shrd $1, %eax, (%rcx)
shld %cl, %eax, (%rcx)
cmpxchg %rax, (%rbx)