diff options
author | Kevin Buettner <kevinb@redhat.com> | 2010-09-23 23:42:53 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2010-09-23 23:42:53 +0000 |
commit | be380a3ea061110105f734192593b3e5472f3941 (patch) | |
tree | 149d4ddf302e28b5c0d34a1126f5f0f50211f044 | |
parent | 6607c80d6babc6e7cad8727c48069d11152d9aa7 (diff) | |
download | gdb-be380a3ea061110105f734192593b3e5472f3941.zip gdb-be380a3ea061110105f734192593b3e5472f3941.tar.gz gdb-be380a3ea061110105f734192593b3e5472f3941.tar.bz2 |
* cpu.h (reset_decoder): Declare.
* load.c (rx_load): Call `reset_decoder'.
* rx.c (reset_decoder): New function.
-rw-r--r-- | sim/rx/ChangeLog | 4 | ||||
-rw-r--r-- | sim/rx/cpu.h | 1 | ||||
-rw-r--r-- | sim/rx/load.c | 2 | ||||
-rw-r--r-- | sim/rx/rx.c | 8 |
4 files changed, 15 insertions, 0 deletions
diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog index 717816f..b810475 100644 --- a/sim/rx/ChangeLog +++ b/sim/rx/ChangeLog @@ -4,6 +4,10 @@ * rx.c (decode_opcode): Declare `rx' as unsigned. + * cpu.h (reset_decoder): Declare. + * load.c (rx_load): Call `reset_decoder'. + * rx.c (reset_decoder): New function. + 2010-07-29 DJ Delorie <dj@redhat.com> * rx.c (decode_cache_base): New. diff --git a/sim/rx/cpu.h b/sim/rx/cpu.h index 37ca7f8..6fc99a9 100644 --- a/sim/rx/cpu.h +++ b/sim/rx/cpu.h @@ -235,6 +235,7 @@ extern unsigned int heaptop; extern unsigned int heapbottom; extern int decode_opcode (void); +extern void reset_decoder (void); extern void reset_pipeline_stats (void); extern void halt_pipeline_stats (void); extern void pipeline_stats (void); diff --git a/sim/rx/load.c b/sim/rx/load.c index bea9baa..bcd8d82 100644 --- a/sim/rx/load.c +++ b/sim/rx/load.c @@ -142,6 +142,8 @@ rx_load (bfd *prog) heaptop = heapbottom = 0; } + reset_decoder (); + if (verbose > 1) fprintf (stderr, "[start pc=%08x %s]\n", (unsigned int) regs.r_pc, diff --git a/sim/rx/rx.c b/sim/rx/rx.c index fc12948..19b896b 100644 --- a/sim/rx/rx.c +++ b/sim/rx/rx.c @@ -298,6 +298,14 @@ static unsigned char *get_byte_base; static RX_Opcode_Decoded **decode_cache_base; static SI get_byte_page; +void +reset_decoder (void) +{ + get_byte_base = 0; + decode_cache_base = 0; + get_byte_page = 0; +} + static inline void maybe_get_mem_page (SI tpc) { |