aboutsummaryrefslogtreecommitdiff
path: root/sim/mips/gencode.c
diff options
context:
space:
mode:
authorJim Wilson <wilson@tuliptree.org>1996-12-10 19:39:55 +0000
committerJim Wilson <wilson@tuliptree.org>1996-12-10 19:39:55 +0000
commit6429b296981ad2010652bff478580ccbfcc114e1 (patch)
tree52d7b9ae1364830503e4b021cf0ac36c1aa889b1 /sim/mips/gencode.c
parent42aa243574a17375fff5b9cc53aec80da983fb7f (diff)
downloadgdb-6429b296981ad2010652bff478580ccbfcc114e1.zip
gdb-6429b296981ad2010652bff478580ccbfcc114e1.tar.gz
gdb-6429b296981ad2010652bff478580ccbfcc114e1.tar.bz2
For NEC 4100/4300 project
* gencode.c (build_instruction, case JUMP): Truncate PC to 32 bits. * interp.c (CHECKHILO): Define away. (simSIGINT): New macro. (membank_size): Increase from 1MB to 2MB. (control_c): New function. (sim_resume): Rename parameter signal to signal_number. Add local variable prev. Call signal before and after simulate. (sim_stop_reason): Add simSIGINT support. (sim_warning, sim_error, dotrace, SignalException): Define as stdarg functions always. (sim_warning): Delete call to SignalException. Do call printf_filtered if logfh is NULL. (AddressTranslation): Add #ifdef DEBUG around debugging message and a call to sim_warning.
Diffstat (limited to 'sim/mips/gencode.c')
-rw-r--r--sim/mips/gencode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sim/mips/gencode.c b/sim/mips/gencode.c
index 74b2ded..01f9e4a 100644
--- a/sim/mips/gencode.c
+++ b/sim/mips/gencode.c
@@ -1862,6 +1862,9 @@ build_instruction (doisa, features, mips16, insn)
if (insn->flags & NOT)
printf(" op1 ^= 1;\n");
+ printf(" /* NOTE: ??? Gdb gets confused if the PC is sign-extended,\n");
+ printf(" so we just truncate it to 32 bits here. */\n");
+ printf(" op1 = WORD64LO(op1);\n");
printf(" /* NOTE: The jump occurs AFTER the next instruction has been executed */\n");
printf(" DSPC = op1;\n");
printf(" DELAYSLOT();\n");