source: Daodan/src/beaengine/Includes/instr_set/opcodes_Grp6.c@ 1080

Last change on this file since 1080 was 984, checked in by alloc, 11 years ago

Daodan: TV code

File size: 4.5 KB
Line 
1/* Copyright 2006-2009, BeatriX
2 * File coded by BeatriX
3 *
4 * This file is part of BeaEngine.
5 *
6 * BeaEngine is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * BeaEngine is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with BeaEngine. If not, see <http://www.gnu.org/licenses/>. */
18
19/* ====================================================================
20 * 0f00h
21 * ==================================================================== */
22void __bea_callspec__ G6_(PDISASM pMyDisasm)
23{
24 Int32 OperandSizeOld = 0;
25
26 (*pMyDisasm).Instruction.Category = SYSTEM_INSTRUCTION;
27 OperandSizeOld = GV.OperandSize;
28 GV.OperandSize = 16;
29 GV.REGOPCODE = ((*((UInt8*)(UIntPtr) (GV.EIP_+1))) >> 3) & 0x7;
30 GV.MOD_= ((*((UInt8*)(UIntPtr) (GV.EIP_+1))) >> 6) & 0x3;
31
32 if (GV.REGOPCODE == 0) {
33 if ((OperandSizeOld == 64) && (GV.MOD_== 0x3)) {
34 GV.OperandSize = OperandSizeOld;
35 }
36 else {
37 GV.MemDecoration = Arg1word;
38 }
39 MOD_RM(&(*pMyDisasm).Argument1, pMyDisasm);
40 #ifndef BEA_LIGHT_DISASSEMBLY
41 (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "sldt ");
42 #endif
43 (*pMyDisasm).Argument2.ArgType = REGISTER_TYPE+MEMORY_MANAGEMENT_REG+REG1;
44 (*pMyDisasm).Argument2.ArgSize = 32;
45 GV.OperandSize = OperandSizeOld;
46 GV.EIP_+= GV.DECALAGE_EIP+2;
47 }
48 else if (GV.REGOPCODE == 1) {
49 if ((OperandSizeOld == 64) && (GV.MOD_== 0x3)) {
50 GV.OperandSize = OperandSizeOld;
51 }
52 else {
53 GV.MemDecoration = Arg1word;
54 }
55 MOD_RM(&(*pMyDisasm).Argument1, pMyDisasm);
56 #ifndef BEA_LIGHT_DISASSEMBLY
57 (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "str ");
58 #endif
59 (*pMyDisasm).Argument2.ArgType = REGISTER_TYPE+MEMORY_MANAGEMENT_REG+REG3;
60 (*pMyDisasm).Argument2.ArgSize = 16;
61 GV.OperandSize = OperandSizeOld;
62 GV.EIP_+= GV.DECALAGE_EIP+2;
63 }
64 else if (GV.REGOPCODE == 2) {
65 GV.MemDecoration = Arg2word;
66 MOD_RM(&(*pMyDisasm).Argument2, pMyDisasm);
67 #ifndef BEA_LIGHT_DISASSEMBLY
68 (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "lldt ");
69 #endif
70 (*pMyDisasm).Argument1.ArgType = REGISTER_TYPE+MEMORY_MANAGEMENT_REG+REG1;
71 (*pMyDisasm).Argument1.ArgSize = 16;
72 GV.OperandSize = OperandSizeOld;
73 GV.EIP_+= GV.DECALAGE_EIP+2;
74 }
75 else if (GV.REGOPCODE == 3) {
76 GV.MemDecoration = Arg2word;
77 MOD_RM(&(*pMyDisasm).Argument2, pMyDisasm);
78 #ifndef BEA_LIGHT_DISASSEMBLY
79 (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "ltr ");
80 #endif
81 (*pMyDisasm).Argument1.ArgType = REGISTER_TYPE+MEMORY_MANAGEMENT_REG+REG3;
82 (*pMyDisasm).Argument1.ArgSize = 16;
83 GV.OperandSize = OperandSizeOld;
84 GV.EIP_+= GV.DECALAGE_EIP+2;
85 }
86 else if (GV.REGOPCODE == 4) {
87 GV.MemDecoration = Arg1word;
88 MOD_RM(&(*pMyDisasm).Argument1, pMyDisasm);
89 #ifndef BEA_LIGHT_DISASSEMBLY
90 (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "verr ");
91 #endif
92 (*pMyDisasm).Argument2.ArgType = REGISTER_TYPE+SPECIAL_REG+REG0;
93 (*pMyDisasm).Argument2.ArgSize = 16;
94 GV.OperandSize = OperandSizeOld;
95 GV.EIP_+= GV.DECALAGE_EIP+2;
96 }
97 else if (GV.REGOPCODE == 5) {
98 GV.MemDecoration = Arg1word;
99 MOD_RM(&(*pMyDisasm).Argument1, pMyDisasm);
100 #ifndef BEA_LIGHT_DISASSEMBLY
101 (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "verw ");
102 #endif
103 (*pMyDisasm).Argument2.ArgType = REGISTER_TYPE+SPECIAL_REG+REG0;
104 (*pMyDisasm).Argument2.ArgSize = 16;
105 GV.OperandSize = OperandSizeOld;
106 GV.EIP_+= GV.DECALAGE_EIP+2;
107 }
108 else if (GV.REGOPCODE == 6) {
109 FailDecode(pMyDisasm);
110 GV.OperandSize = OperandSizeOld;
111 }
112 else {
113 FailDecode(pMyDisasm);
114 GV.OperandSize = OperandSizeOld;
115 }
116}
117
Note: See TracBrowser for help on using the repository browser.