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/gencode.c | |
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/gencode.c')
-rw-r--r-- | sim/mips/gencode.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sim/mips/gencode.c b/sim/mips/gencode.c index 928b88e..2e5ed28 100644 --- a/sim/mips/gencode.c +++ b/sim/mips/gencode.c @@ -2716,6 +2716,24 @@ build_instruction (doisa, features, mips16, insn) break ; case BREAK: + + printf(" unsigned int break_code = instruction & HALT_INSTRUCTION_MASK;\n"); + printf(" if ( break_code == (HALT_INSTRUCTION & HALT_INSTRUCTION_MASK)\n"); + printf(" || break_code == (HALT_INSTRUCTION2 & HALT_INSTRUCTION_MASK))\n"); + printf(" {\n"); + printf(" sim_engine_halt (SD, CPU, NULL, cia,\n"); + printf(" sim_exited, (unsigned int)(A0 & 0xFFFFFFFF));\n"); + printf(" }\n"); + printf(" else if ( break_code == (BREAKPOINT_INSTRUCTION & HALT_INSTRUCTION_MASK)\n"); + printf(" || break_code == (BREAKPOINT_INSTRUCTION2 & HALT_INSTRUCTION_MASK))\n"); + printf(" {\n"); + printf(" if (STATE & simDELAYSLOT)\n"); + printf(" PC = cia - 4; /* reference the branch instruction */\n"); + printf(" else\n"); + printf(" PC = cia;\n"); + printf(" sim_engine_halt (SD, CPU, NULL, cia, sim_stopped, SIM_SIGTRAP);\n"); + printf(" }\n"); + printf(" SignalException(BreakPoint,instruction);\n"); break ; |