|
@@ -142,7 +142,7 @@ UnwResult UnwStartArm(UnwState * const state) {
|
142
|
142
|
|
143
|
143
|
/* MRS */
|
144
|
144
|
else if ((instr & 0xFFBF0FFF) == 0xE10F0000) {
|
145
|
|
-#if defined(UNW_DEBUG)
|
|
145
|
+#ifdef UNW_DEBUG
|
146
|
146
|
bool R = (instr & 0x00400000) ? true : false;
|
147
|
147
|
#endif
|
148
|
148
|
uint8_t rd = (instr & 0x0000F000) >> 12;
|
|
@@ -154,7 +154,7 @@ UnwResult UnwStartArm(UnwState * const state) {
|
154
|
154
|
}
|
155
|
155
|
/* MSR */
|
156
|
156
|
else if ((instr & 0xFFB0F000) == 0xE120F000) {
|
157
|
|
-#if defined(UNW_DEBUG)
|
|
157
|
+#ifdef UNW_DEBUG
|
158
|
158
|
bool R = (instr & 0x00400000) ? true : false;
|
159
|
159
|
|
160
|
160
|
UnwPrintd2("MSR %s_?, ???", R ? "SPSR" : "CPSR");
|
|
@@ -172,7 +172,7 @@ UnwResult UnwStartArm(UnwState * const state) {
|
172
|
172
|
else if (isDataProc(instr)) {
|
173
|
173
|
bool I = (instr & 0x02000000) ? true : false;
|
174
|
174
|
uint8_t opcode = (instr & 0x01E00000) >> 21;
|
175
|
|
-#if defined(UNW_DEBUG)
|
|
175
|
+#ifdef UNW_DEBUG
|
176
|
176
|
bool S = (instr & 0x00100000) ? true : false;
|
177
|
177
|
#endif
|
178
|
178
|
uint8_t rn = (instr & 0x000F0000) >> 16;
|
|
@@ -220,7 +220,7 @@ UnwResult UnwStartArm(UnwState * const state) {
|
220
|
220
|
uint8_t regShift = (operand2 & 0x0010) ? true : false;
|
221
|
221
|
uint8_t shiftType = (operand2 & 0x0060) >> 5;
|
222
|
222
|
uint32_t shiftDist;
|
223
|
|
-#if defined(UNW_DEBUG)
|
|
223
|
+#ifdef UNW_DEBUG
|
224
|
224
|
const char * const shiftMnu[4] = { "LSL", "LSR", "ASR", "ROR" };
|
225
|
225
|
#endif
|
226
|
226
|
UnwPrintd2("r%d ", rm);
|
|
@@ -453,7 +453,7 @@ UnwResult UnwStartArm(UnwState * const state) {
|
453
|
453
|
bool addrValid = M_IsOriginValid(state->regData[baseReg].o);
|
454
|
454
|
int8_t r;
|
455
|
455
|
|
456
|
|
-#if defined(UNW_DEBUG)
|
|
456
|
+#ifdef UNW_DEBUG
|
457
|
457
|
/* Display the instruction */
|
458
|
458
|
if (L) {
|
459
|
459
|
UnwPrintd6("LDM%c%c r%d%s, {reglist}%s\n", P ? 'E' : 'F', U ? 'D' : 'A', baseReg, W ? "!" : "", S ? "^" : "");
|