File tree Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 40
40
#define OPC_ARITH 0x30 /* arithmetic opcodes */
41
41
#define OPC_FARITH 0x40 /* FPU arithmetic opcodes */
42
42
#define OPC_TEST 0x50 /* test opcodes */
43
+ #define OPC_0F01 0x60 /* 0x0f01XX (group 7, XX is 2nd opcode,
44
+ no operands and unstructured mod/rm) */
43
45
#define OPCT_IS (v ,i ) (((v) & OPCT_MASK) == (i))
44
46
45
47
#define OPC_0F 0x100 /* Is secondary map (0x0f prefix) */
@@ -1072,6 +1074,8 @@ ST_FUNC void asm_opcode(TCCState *s1, int opcode)
1072
1074
}
1073
1075
if (OPCT_IS (pa -> instr_type , OPC_TEST ))
1074
1076
v += test_bits [opcode - pa -> sym ];
1077
+ else if (OPCT_IS (pa -> instr_type , OPC_0F01 ))
1078
+ v |= 0x0f0100 ;
1075
1079
op1 = v >> 16 ;
1076
1080
if (op1 )
1077
1081
g (op1 );
Original file line number Diff line number Diff line change @@ -632,10 +632,19 @@ int $0x10
632
632
leave
633
633
int3
634
634
iret
635
+ iretw
636
+ iretl
637
+ #ifdef __x86_64__
638
+ iretq
639
+ #endif
635
640
rsm
636
641
hlt
637
642
wait
638
643
nop
644
+ vmcall
645
+ vmlaunch
646
+ vmresume
647
+ vmxoff
639
648
640
649
/* XXX: handle prefixes */
641
650
#if 0
Original file line number Diff line number Diff line change 30
30
DEF_ASM_OP0 (int3 , 0xcc )
31
31
DEF_ASM_OP0 (into , 0xce )
32
32
DEF_ASM_OP0 (iret , 0xcf )
33
+ DEF_ASM_OP0 (iretw , 0x66cf )
34
+ DEF_ASM_OP0 (iretl , 0xcf )
35
+ DEF_ASM_OP0 (iretq , 0x48cf )
33
36
DEF_ASM_OP0 (rsm , 0x0faa )
34
37
DEF_ASM_OP0 (hlt , 0xf4 )
35
38
DEF_ASM_OP0 (wait , 0x9b )
36
39
DEF_ASM_OP0 (nop , 0x90 )
37
40
DEF_ASM_OP0 (pause , 0xf390 )
38
41
DEF_ASM_OP0 (xlat , 0xd7 )
39
42
43
+ DEF_ASM_OP0L (vmcall , 0xc1 , 0 , OPC_0F01 )
44
+ DEF_ASM_OP0L (vmlaunch , 0xc2 , 0 , OPC_0F01 )
45
+ DEF_ASM_OP0L (vmresume , 0xc3 , 0 , OPC_0F01 )
46
+ DEF_ASM_OP0L (vmxoff , 0xc4 , 0 , OPC_0F01 )
47
+
40
48
/* strings */
41
49
ALT (DEF_ASM_OP0L (cmpsb , 0xa6 , 0 , OPC_BWLX ))
42
50
ALT (DEF_ASM_OP0L (scmpb , 0xa6 , 0 , OPC_BWLX ))
You can’t perform that action at this time.
0 commit comments