aboutsummaryrefslogtreecommitdiff
path: root/sim/mips/sim-main.h
diff options
context:
space:
mode:
authorIan Carmichael <iancarm@cygnus>1998-06-09 16:54:08 +0000
committerIan Carmichael <iancarm@cygnus>1998-06-09 16:54:08 +0000
commit895a7dc2aa8fc1903f0bd3e160ae2eccfbb328f4 (patch)
treed5db18596895078a6ffc0fadf96063eea675f55d /sim/mips/sim-main.h
parent18993a6868f5a295f156a0209948f15545841b73 (diff)
downloadgdb-895a7dc2aa8fc1903f0bd3e160ae2eccfbb328f4.zip
gdb-895a7dc2aa8fc1903f0bd3e160ae2eccfbb328f4.tar.gz
gdb-895a7dc2aa8fc1903f0bd3e160ae2eccfbb328f4.tar.bz2
* Handle 10 and 20-bit versions of Break instruction. Move handling
* of special values from signal_exception() in interp.c into mips.igen. * * Modified: gencode.c interp.c mips.igen sim-main.h
Diffstat (limited to 'sim/mips/sim-main.h')
-rw-r--r--sim/mips/sim-main.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/sim/mips/sim-main.h b/sim/mips/sim-main.h
index 295b127..4a632ab 100644
--- a/sim/mips/sim-main.h
+++ b/sim/mips/sim-main.h
@@ -212,7 +212,7 @@ typedef struct _hilo_history {
#define ALU32_END(ANS) \
if (ALU32_HAD_OVERFLOW) \
SignalExceptionIntegerOverflow (); \
- (ANS) = ALU32_OVERFLOW_RESULT
+ (ANS) = (signed32) ALU32_OVERFLOW_RESULT
#define ALU64_END(ANS) \
@@ -838,6 +838,24 @@ struct sim_state {
run-time errors in the simulator. */
#define SimulatorFault (0xFFFFFFFF)
+/* The following break instructions are reserved for use by the
+ simulator. The first is used to halt the simulation. The second
+ is used by gdb for break-points. NOTE: Care must be taken, since
+ this value may be used in later revisions of the MIPS ISA. */
+#define HALT_INSTRUCTION_MASK (0x03FFFFC0)
+
+#define HALT_INSTRUCTION (0x03ff000d)
+#define HALT_INSTRUCTION2 (0x0000ffcd)
+
+/* start-sanitize-sky */
+#define HALT_INSTRUCTION_PASS (0x03fffc0d)
+#define HALT_INSTRUCTION_FAIL (0x03ffffcd)
+/* end-sanitize-sky */
+
+#define BREAKPOINT_INSTRUCTION (0x0005000d)
+#define BREAKPOINT_INSTRUCTION2 (0x0000014d)
+
+
void signal_exception (SIM_DESC sd, sim_cpu *cpu, address_word cia, int exception, ...);
#define SignalException(exc,instruction) signal_exception (SD, CPU, cia, (exc), (instruction))
#define SignalExceptionInterrupt() signal_exception (SD, CPU, cia, Interrupt)