diff options
author | Frank Ch. Eigler <fche@redhat.com> | 1998-12-05 10:32:12 +0000 |
---|---|---|
committer | Frank Ch. Eigler <fche@redhat.com> | 1998-12-05 10:32:12 +0000 |
commit | 3e99af1bae18cf44ea630a3cd5d371651a57474b (patch) | |
tree | 355e9fb4f81b4ad7bdef35acffdf8908d2d0a45e /sim | |
parent | 1932239a58259d8edd7196fb394536cf3229651c (diff) | |
download | gdb-3e99af1bae18cf44ea630a3cd5d371651a57474b.zip gdb-3e99af1bae18cf44ea630a3cd5d371651a57474b.tar.gz gdb-3e99af1bae18cf44ea630a3cd5d371651a57474b.tar.bz2 |
* gx prototype: simulator I/O bug fix
1998-12-05 Frank Ch. Eigler <fche@elastic.org>
* gx-translate.c (m32r_emit_short_insn): Correct ABI result
handling for TRAP insn.
Diffstat (limited to 'sim')
-rw-r--r-- | sim/m32r-gx/ChangeLog | 5 | ||||
-rw-r--r-- | sim/m32r-gx/gx-translate.c | 10 |
2 files changed, 12 insertions, 3 deletions
diff --git a/sim/m32r-gx/ChangeLog b/sim/m32r-gx/ChangeLog index ad03dac..a04bd6f 100644 --- a/sim/m32r-gx/ChangeLog +++ b/sim/m32r-gx/ChangeLog @@ -1,3 +1,8 @@ +1998-12-05 Frank Ch. Eigler <fche@elastic.org> + + * gx-translate.c (m32r_emit_short_insn): Correct ABI result + handling for TRAP insn. + 1998-12-01 Frank Ch. Eigler <fche@elastic.org> * Makefile.in (SIM_OBJS): Don't build sim-core.o. diff --git a/sim/m32r-gx/gx-translate.c b/sim/m32r-gx/gx-translate.c index 461417c..aa0a0f1 100644 --- a/sim/m32r-gx/gx-translate.c +++ b/sim/m32r-gx/gx-translate.c @@ -433,7 +433,9 @@ m32r_emit_long_insn(sim_gx_block* gx, PCADDR pc, unsigned insn, int optimized) sim_gx_compiled_block* block = optimized ? gx->optimized_block : gx->learning_block; FILE* f = block->source_file; - ASSERT(block->source_file != NULL); + ASSERT(f != NULL); + + /* fprintf(f, " printf(\"0x%06x\\n\");\n", pc); */ if(op1 == 0x8 && op2 == 0x4 && r1 == 0) { @@ -834,6 +836,8 @@ m32r_emit_short_insn(sim_gx_block* gx, PCADDR pc, unsigned insn, int optimized) ASSERT(f != NULL); + /* fprintf(f, " printf(\"0x%06x\\n\");\n", pc); */ + if(0) ; /* place holder */ else if(op1 == 0x0 && op2 == 0x0) @@ -1017,8 +1021,8 @@ m32r_emit_short_insn(sim_gx_block* gx, PCADDR pc, unsigned insn, int optimized) fprintf(f, " tgx_syscall_data d = { 0x%08x, gr0, gr1, gr2, gr3 };\n", (unsigned) pc); fprintf(f, " (*(callbacks->syscall))(info, &d);\n"); fprintf(f, " gr2 = d.errcode;\n"); - fprintf(f, " gr1 = d.result;\n"); - fprintf(f, " gr0 = d.result2;\n"); + fprintf(f, " gr0 = d.result;\n"); + fprintf(f, " gr1 = d.result2;\n"); fprintf(f, " }\n"); } else if (r2 == 1) /* gdb breakpoint */ |