|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 using System; |
|
18 using System.Collections.Generic; |
|
19 using System.Text; |
|
20 using SymbianUtils.BasicTypes; |
|
21 using SymbianStructuresLib.Arm; |
|
22 using SymbianStructuresLib; |
|
23 using SymbianStructuresLib.Arm.Registers; |
|
24 |
|
25 namespace SymbianStructuresLib.Arm.Instructions |
|
26 { |
|
27 public interface IArmInstruction |
|
28 { |
|
29 #region Properties |
|
30 |
|
31 /// <summary> |
|
32 /// The instruction set encoding for the |
|
33 /// instruction |
|
34 /// </summary> |
|
35 TArmInstructionSet AIType |
|
36 { |
|
37 get; |
|
38 } |
|
39 |
|
40 /// <summary> |
|
41 /// The instruction group/categorisation |
|
42 /// </summary> |
|
43 TArmInstructionGroup AIGroup |
|
44 { |
|
45 get; |
|
46 } |
|
47 |
|
48 /// <summary> |
|
49 /// The arm entity which the instruction operates upon |
|
50 /// </summary> |
|
51 TArmInstructionTarget AITarget |
|
52 { |
|
53 get; |
|
54 } |
|
55 |
|
56 /// <summary> |
|
57 /// The condition codes associated with the instruction |
|
58 /// </summary> |
|
59 TArmInstructionCondition AIConditionCode |
|
60 { |
|
61 get; |
|
62 } |
|
63 |
|
64 /// <summary> |
|
65 /// The raw instruction as a 32bit value |
|
66 /// </summary> |
|
67 SymUInt32 AIRawValue |
|
68 { |
|
69 get; |
|
70 } |
|
71 |
|
72 /// <summary> |
|
73 /// The raw instruction in binary notation, encoded as a string. |
|
74 /// No leading prefix. |
|
75 /// </summary> |
|
76 string AIBinaryString |
|
77 { |
|
78 get; |
|
79 } |
|
80 |
|
81 /// <summary> |
|
82 /// The raw instruction in hexadecimal notation, encoded as a string. |
|
83 /// No leading prefix. |
|
84 /// </summary> |
|
85 string AIHexString |
|
86 { |
|
87 get; |
|
88 } |
|
89 |
|
90 /// <summary> |
|
91 /// An optional disassembled interpretation of the instruction. |
|
92 /// </summary> |
|
93 string AIDisassembly |
|
94 { |
|
95 get; |
|
96 } |
|
97 |
|
98 /// <summary> |
|
99 /// The address from which the instruction was read. |
|
100 /// </summary> |
|
101 uint AIAddress |
|
102 { |
|
103 get; |
|
104 } |
|
105 |
|
106 /// <summary> |
|
107 /// The size, in bytes, of the instruction. E.g. ARM=4, THUMB=2 etc. |
|
108 /// </summary> |
|
109 uint AISize |
|
110 { |
|
111 get; |
|
112 } |
|
113 |
|
114 /// <summary> |
|
115 /// If the instruction was not recognised, then this returns true |
|
116 /// </summary> |
|
117 bool AIIsUnknown |
|
118 { |
|
119 get; |
|
120 } |
|
121 |
|
122 /// <summary> |
|
123 /// Get a bit by index |
|
124 /// </summary> |
|
125 SymBit this[ int aIndex ] |
|
126 { |
|
127 get; |
|
128 } |
|
129 |
|
130 #endregion |
|
131 |
|
132 #region API |
|
133 bool QueryInvolvement( TArmRegisterType aRegister ); |
|
134 |
|
135 bool QueryInvolvementAsSource( TArmRegisterType aRegister ); |
|
136 |
|
137 bool QueryInvolvementAsDestination( TArmRegisterType aRegister ); |
|
138 #endregion |
|
139 } |
|
140 } |