source: Daodan/src/beaengine/Includes/instr_set/opcodes_Grp9.c@ 1032

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

Daodan: TV code

File size: 3.3 KB
RevLine 
[984]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/* ====================================================================
21 * 0fc7h
22 * ==================================================================== */
23void __bea_callspec__ G9_(PDISASM pMyDisasm)
24{
25 GV.REGOPCODE = ((*((UInt8*)(UIntPtr) (GV.EIP_+1))) >> 3) & 0x7;
26 GV.MemDecoration = Arg2qword;
27 MOD_RM(&(*pMyDisasm).Argument2, pMyDisasm);
28 if (GV.REGOPCODE == 1) {
29 if (GV.REX.W_ == 1) {
30 GV.MemDecoration = Arg2dqword;
31 (*pMyDisasm).Instruction.Category = GENERAL_PURPOSE_INSTRUCTION+DATA_TRANSFER;
32 #ifndef BEA_LIGHT_DISASSEMBLY
33 (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "cmpxchg16b ");
34 #endif
35 (*pMyDisasm).Argument1.ArgType = REGISTER_TYPE+GENERAL_REG+REG0+REG2;
36 (*pMyDisasm).Argument1.ArgSize = 128;
37 (*pMyDisasm).Argument1.AccessMode = READ;
38 FillFlags(pMyDisasm, 23);
39 GV.EIP_ += GV.DECALAGE_EIP+2;
40 }
41 else {
42 (*pMyDisasm).Instruction.Category = GENERAL_PURPOSE_INSTRUCTION+DATA_TRANSFER;
43 #ifndef BEA_LIGHT_DISASSEMBLY
44 (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "cmpxchg8b ");
45 #endif
46 (*pMyDisasm).Argument1.ArgType = REGISTER_TYPE+GENERAL_REG+REG0+REG2;
47 (*pMyDisasm).Argument1.ArgSize = 64;
48 (*pMyDisasm).Argument1.AccessMode = READ;
49 FillFlags(pMyDisasm, 23);
50 GV.EIP_ += GV.DECALAGE_EIP+2;
51 }
52 }
53 else if (GV.REGOPCODE == 6) {
54 (*pMyDisasm).Instruction.Category = VM_INSTRUCTION;
55 if (GV.OperandSize == 16) {
56 #ifndef BEA_LIGHT_DISASSEMBLY
57 (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "vmclear ");
58 #endif
59 }
60 else if (GV.PrefRepe == 1) {
61 #ifndef BEA_LIGHT_DISASSEMBLY
62 (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "vmxon ");
63 #endif
64 }
65 else {
66 #ifndef BEA_LIGHT_DISASSEMBLY
67 (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "vmptrld ");
68 #endif
69 }
70 GV.EIP_ += GV.DECALAGE_EIP+2;
71
72 }
73 else if (GV.REGOPCODE == 7) {
74 (*pMyDisasm).Instruction.Category = VM_INSTRUCTION;
75 #ifndef BEA_LIGHT_DISASSEMBLY
76 (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "vmptrst ");
77 #endif
78 GV.EIP_ += GV.DECALAGE_EIP+2;
79 }
80 else {
81 FailDecode(pMyDisasm);
82 }
83
84}
Note: See TracBrowser for help on using the repository browser.