aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/arm
diff options
context:
space:
mode:
authorGravatar Lioncash <mathew1800@gmail.com>2015-02-10 12:37:28 -0500
committerGravatar Lioncash <mathew1800@gmail.com>2015-02-10 13:09:41 -0500
commit088fab743fcff848b342efd52bfccaf6ee62a72f (patch)
tree0360a62cfffaee5da99568e28cdd35f13c91aec1 /src/core/arm
parent67db6aa4ce1f57f7d99406c8924ed41e74d36dbe (diff)
arm: Remove TRUE/FALSE defines
- Removed the Debug parameter from ARMul_State since it isn't used. - Changed ARMul_CoProInit to a void function. It always returned true.
Diffstat (limited to 'src/core/arm')
-rw-r--r--src/core/arm/interpreter/armcopro.cpp7
-rw-r--r--src/core/arm/interpreter/arminit.cpp14
-rw-r--r--src/core/arm/skyeye_common/armdefs.h12
-rw-r--r--src/core/arm/skyeye_common/armemu.h14
4 files changed, 19 insertions, 28 deletions
diff --git a/src/core/arm/interpreter/armcopro.cpp b/src/core/arm/interpreter/armcopro.cpp
index bb9ca98f..4ae0c52e 100644
--- a/src/core/arm/interpreter/armcopro.cpp
+++ b/src/core/arm/interpreter/armcopro.cpp
@@ -47,7 +47,7 @@ static unsigned int NoCoPro5W(ARMul_State* state, unsigned int a, ARMword b, ARM
}
// Install co-processor instruction handlers in this routine.
-unsigned int ARMul_CoProInit(ARMul_State* state)
+void ARMul_CoProInit(ARMul_State* state)
{
// Initialise tham all first.
for (unsigned int i = 0; i < 16; i++)
@@ -71,11 +71,10 @@ unsigned int ARMul_CoProInit(ARMul_State* state)
// No handlers below here.
// Call all the initialisation routines.
- for (unsigned int i = 0; i < 16; i++)
+ for (unsigned int i = 0; i < 16; i++) {
if (state->CPInit[i])
(state->CPInit[i]) (state);
-
- return TRUE;
+ }
}
// Install co-processor finalisation routines in this routine.
diff --git a/src/core/arm/interpreter/arminit.cpp b/src/core/arm/interpreter/arminit.cpp
index a52d1496..7b502e24 100644
--- a/src/core/arm/interpreter/arminit.cpp
+++ b/src/core/arm/interpreter/arminit.cpp
@@ -63,24 +63,22 @@ void ARMul_EmulateInit()
\***************************************************************************/
ARMul_State* ARMul_NewState(ARMul_State* state)
{
- unsigned i, j;
-
memset (state, 0, sizeof (ARMul_State));
state->Emulate = RUN;
- for (i = 0; i < 16; i++) {
+ for (unsigned int i = 0; i < 16; i++) {
state->Reg[i] = 0;
- for (j = 0; j < 7; j++)
+ for (unsigned int j = 0; j < 7; j++)
state->RegBank[j][i] = 0;
}
- for (i = 0; i < 7; i++)
+ for (unsigned int i = 0; i < 7; i++)
state->Spsr[i] = 0;
+
state->Mode = 0;
- state->Debug = FALSE;
state->VectorCatch = 0;
- state->Aborted = FALSE;
- state->Reseted = FALSE;
+ state->Aborted = false;
+ state->Reseted = false;
state->Inted = 3;
state->LastInted = 3;
diff --git a/src/core/arm/skyeye_common/armdefs.h b/src/core/arm/skyeye_common/armdefs.h
index 77886878..ff9296e0 100644
--- a/src/core/arm/skyeye_common/armdefs.h
+++ b/src/core/arm/skyeye_common/armdefs.h
@@ -35,11 +35,6 @@
#define BITS(s, a, b) ((s << ((sizeof(s) * 8 - 1) - b)) >> (sizeof(s) * 8 - b + a - 1))
#define BIT(s, n) ((s >> (n)) & 1)
-#ifndef FALSE
-#define FALSE 0
-#define TRUE 1
-#endif
-
#define LOW 0
#define HIGH 1
#define LOWHIGH 1
@@ -135,7 +130,6 @@ struct ARMul_State
unsigned char* CPData[16]; // Coprocessor data
unsigned char const* CPRegWords[16]; // Map of coprocessor register sizes
- unsigned Debug; // Show instructions as they are executed
unsigned NresetSig; // Reset the processor
unsigned NfiqSig;
unsigned NirqSig;
@@ -180,12 +174,12 @@ So, if lateabtSig=1, then it means Late Abort Model(Base Updated Abort Model)
*/
unsigned lateabtSig;
- ARMword Vector; // Synthesize aborts in cycle modes
- ARMword Aborted; // Sticky flag for aborts
- ARMword Reseted; // Sticky flag for Reset
+ bool Aborted; // Sticky flag for aborts
+ bool Reseted; // Sticky flag for Reset
ARMword Inted, LastInted; // Sticky flags for interrupts
ARMword Base; // Extra hand for base writeback
ARMword AbortAddr; // To keep track of Prefetch aborts
+ ARMword Vector; // Synthesize aborts in cycle modes
// For differentiating ARM core emulaiton.
bool is_v4; // Are we emulating a v4 architecture (or higher)?
diff --git a/src/core/arm/skyeye_common/armemu.h b/src/core/arm/skyeye_common/armemu.h
index 6071d447..beee54c9 100644
--- a/src/core/arm/skyeye_common/armemu.h
+++ b/src/core/arm/skyeye_common/armemu.h
@@ -100,10 +100,10 @@ extern ARMword ARMul_ImmedTable[]; // Immediate DP LHS values.
extern char ARMul_BitList[]; // Number of bits in a byte table.
// Coprocessor support functions.
-extern unsigned ARMul_CoProInit (ARMul_State *);
-extern void ARMul_CoProExit (ARMul_State *);
-extern void ARMul_CoProAttach (ARMul_State *, unsigned, ARMul_CPInits *,
- ARMul_CPExits *, ARMul_LDCs *, ARMul_STCs *,
- ARMul_MRCs *, ARMul_MCRs *, ARMul_MRRCs *, ARMul_MCRRs *,
- ARMul_CDPs *, ARMul_CPReads *, ARMul_CPWrites *);
-extern void ARMul_CoProDetach (ARMul_State *, unsigned);
+extern void ARMul_CoProInit(ARMul_State*);
+extern void ARMul_CoProExit(ARMul_State*);
+extern void ARMul_CoProAttach(ARMul_State*, unsigned, ARMul_CPInits*,
+ ARMul_CPExits*, ARMul_LDCs*, ARMul_STCs*,
+ ARMul_MRCs*, ARMul_MCRs*, ARMul_MRRCs*, ARMul_MCRRs*,
+ ARMul_CDPs*, ARMul_CPReads*, ARMul_CPWrites*);
+extern void ARMul_CoProDetach(ARMul_State*, unsigned);