diff options
author | Ian Carmichael <iancarm@cygnus> | 1998-06-09 16:54:08 +0000 |
---|---|---|
committer | Ian Carmichael <iancarm@cygnus> | 1998-06-09 16:54:08 +0000 |
commit | 895a7dc2aa8fc1903f0bd3e160ae2eccfbb328f4 (patch) | |
tree | d5db18596895078a6ffc0fadf96063eea675f55d /sim/mips/mips.igen | |
parent | 18993a6868f5a295f156a0209948f15545841b73 (diff) | |
download | gdb-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/mips.igen')
-rw-r--r-- | sim/mips/mips.igen | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sim/mips/mips.igen b/sim/mips/mips.igen index 10ed6b8..d6b247c 100644 --- a/sim/mips/mips.igen +++ b/sim/mips/mips.igen @@ -941,6 +941,36 @@ *tx19: // end-sanitize-tx19 { + /* Check for some break instruction which are reserved for use by the simulator. */ + unsigned int break_code = instruction_0 & HALT_INSTRUCTION_MASK; + if (break_code == (HALT_INSTRUCTION & HALT_INSTRUCTION_MASK) || + break_code == (HALT_INSTRUCTION2 & HALT_INSTRUCTION_MASK)) + { + sim_engine_halt (SD, CPU, NULL, cia, + sim_exited, (unsigned int)(A0 & 0xFFFFFFFF)); + } + else if (break_code == (BREAKPOINT_INSTRUCTION & HALT_INSTRUCTION_MASK) || + break_code == (BREAKPOINT_INSTRUCTION2 & HALT_INSTRUCTION_MASK)) + { + if (STATE & simDELAYSLOT) + PC = cia - 4; /* reference the branch instruction */ + else + PC = cia; + sim_engine_halt (SD, CPU, NULL, cia, sim_stopped, SIM_SIGTRAP); + } +// start-sanitize-sky + else if (break_code == (HALT_INSTRUCTION_PASS & HALT_INSTRUCTION_MASK)) + { + sim_engine_halt (SD, CPU, NULL, cia, sim_exited, 0); + } + else if (break_code == (HALT_INSTRUCTION_FAIL & HALT_INSTRUCTION_MASK)) + { + sim_engine_halt (SD, CPU, NULL, cia, sim_exited, 15); + } +// end-sanitize-sky + + /* If we get this far, we're not an instruction reserved by the sim. Raise + the exception. */ SignalException(BreakPoint, instruction_0); } |