aboutsummaryrefslogtreecommitdiff
path: root/sim/mips/sim-main.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1997-11-20 09:17:06 +0000
committerAndrew Cagney <cagney@redhat.com>1997-11-20 09:17:06 +0000
commita09a30d2986c11d9a971fe98952e90301e3c1a99 (patch)
tree4c8141eafd29aa7721033e765da88827a269e842 /sim/mips/sim-main.h
parent942f33aeb1f4452b276e37946a1788550c5f9d1c (diff)
downloadgdb-a09a30d2986c11d9a971fe98952e90301e3c1a99.zip
gdb-a09a30d2986c11d9a971fe98952e90301e3c1a99.tar.gz
gdb-a09a30d2986c11d9a971fe98952e90301e3c1a99.tar.bz2
Allow reads/writes to C0_CONFIG register.
Diffstat (limited to 'sim/mips/sim-main.h')
-rw-r--r--sim/mips/sim-main.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/sim/mips/sim-main.h b/sim/mips/sim-main.h
index 4b61ca2..c6f3ab2 100644
--- a/sim/mips/sim-main.h
+++ b/sim/mips/sim-main.h
@@ -97,6 +97,8 @@ typedef enum {
range, and are used in the register status vector. */
fmt_unknown = 0x10000000,
fmt_uninterpreted = 0x20000000,
+ fmt_uninterpreted_32 = 0x40000000,
+ fmt_uninterpreted_64 = 0x80000000,
} FP_formats;
unsigned64 value_fpr PARAMS ((SIM_DESC sd, address_word cia, int fpr, FP_formats));
@@ -339,7 +341,19 @@ struct _sim_cpu {
#define simSIGINT (1 << 28) /* 0 = do nothing; 1 = SIGINT has occured */
#define simJALDELAYSLOT (1 << 29) /* 1 = in jal delay slot */
-
+#define ENGINE_ISSUE_PREFIX_HOOK() \
+ { \
+ /* Set previous flag, depending on current: */ \
+ if (STATE & simPCOC0) \
+ STATE |= simPCOC1; \
+ else \
+ STATE &= ~simPCOC1; \
+ /* and update the current value: */ \
+ if (GETFCC(0)) \
+ STATE |= simPCOC0; \
+ else \
+ STATE &= ~simPCOC0; \
+ }
/* This is nasty, since we have to rely on matching the register
@@ -385,6 +399,9 @@ struct _sim_cpu {
#define EPC (REGISTERS[88])
#define COCIDX (LAST_EMBED_REGNUM + 2) /* special case : outside the normal range */
+ unsigned_word c0_config_reg;
+#define C0_CONFIG ((STATE_CPU (sd,0))->c0_config_reg)
+
/* The following are pseudonyms for standard registers */
#define ZERO (REGISTERS[0])
#define V0 (REGISTERS[2])