summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/arm/skyeye_common/armdefs.h23
-rw-r--r--src/core/arm/skyeye_common/armemu.h28
2 files changed, 30 insertions, 21 deletions
diff --git a/src/core/arm/skyeye_common/armdefs.h b/src/core/arm/skyeye_common/armdefs.h
index ff9296e0f..97a341767 100644
--- a/src/core/arm/skyeye_common/armdefs.h
+++ b/src/core/arm/skyeye_common/armdefs.h
@@ -35,15 +35,20 @@
35#define BITS(s, a, b) ((s << ((sizeof(s) * 8 - 1) - b)) >> (sizeof(s) * 8 - b + a - 1)) 35#define BITS(s, a, b) ((s << ((sizeof(s) * 8 - 1) - b)) >> (sizeof(s) * 8 - b + a - 1))
36#define BIT(s, n) ((s >> (n)) & 1) 36#define BIT(s, n) ((s >> (n)) & 1)
37 37
38#define LOW 0 38// Signal levels
39#define HIGH 1 39enum {
40#define LOWHIGH 1 40 LOW = 0,
41#define HIGHLOW 2 41 HIGH = 1,
42 42 LOWHIGH = 1,
43//the define of cachetype 43 HIGHLOW = 2
44#define NONCACHE 0 44};
45#define DATACACHE 1 45
46#define INSTCACHE 2 46// Cache types
47enum {
48 NONCACHE = 0,
49 DATACACHE = 1,
50 INSTCACHE = 2,
51};
47 52
48#define POS(i) ( (~(i)) >> 31 ) 53#define POS(i) ( (~(i)) >> 31 )
49#define NEG(i) ( (i) >> 31 ) 54#define NEG(i) ( (i) >> 31 )
diff --git a/src/core/arm/skyeye_common/armemu.h b/src/core/arm/skyeye_common/armemu.h
index beee54c9a..5d4c06837 100644
--- a/src/core/arm/skyeye_common/armemu.h
+++ b/src/core/arm/skyeye_common/armemu.h
@@ -76,24 +76,28 @@
76#define R15MODE (state->Reg[15] & R15MODEBITS) 76#define R15MODE (state->Reg[15] & R15MODEBITS)
77 77
78// Different ways to start the next instruction. 78// Different ways to start the next instruction.
79#define SEQ 0 79enum {
80#define NONSEQ 1 80 SEQ = 0,
81#define PCINCEDSEQ 2 81 NONSEQ = 1,
82#define PCINCEDNONSEQ 3 82 PCINCEDSEQ = 2,
83#define PRIMEPIPE 4 83 PCINCEDNONSEQ = 3,
84#define RESUME 8 84 PRIMEPIPE = 4,
85 RESUME = 8
86};
87
88// Values for Emulate.
89enum {
90 STOP = 0, // Stop
91 CHANGEMODE = 1, // Change mode
92 ONCE = 2, // Execute just one interation
93 RUN = 3 // Continuous execution
94};
85 95
86#define FLUSHPIPE state->NextInstr |= PRIMEPIPE 96#define FLUSHPIPE state->NextInstr |= PRIMEPIPE
87 97
88// Macro to rotate n right by b bits. 98// Macro to rotate n right by b bits.
89#define ROTATER(n, b) (((n) >> (b)) | ((n) << (32 - (b)))) 99#define ROTATER(n, b) (((n) >> (b)) | ((n) << (32 - (b))))
90 100
91// Values for Emulate.
92#define STOP 0 // stop
93#define CHANGEMODE 1 // change mode
94#define ONCE 2 // execute just one interation
95#define RUN 3 // continuous execution
96
97// Stuff that is shared across modes. 101// Stuff that is shared across modes.
98extern unsigned ARMul_MultTable[]; // Number of I cycles for a mult. 102extern unsigned ARMul_MultTable[]; // Number of I cycles for a mult.
99extern ARMword ARMul_ImmedTable[]; // Immediate DP LHS values. 103extern ARMword ARMul_ImmedTable[]; // Immediate DP LHS values.