From 173b1c982aa0a176d06c50421fdec23508b4b9eb Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Thu, 19 Jun 2003 00:49:33 +0000 Subject: [PATCH] 2003-06-05 Michael Snyder * compile.c (sim_fetch_register): Handle SBR, VBR, MACH, MACL. (sim_store_register): Ditto. --- sim/h8300/ChangeLog | 7 ++++++- sim/h8300/compile.c | 32 +++++++++++++++++++++++++++----- 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog index e35d2b7eb7c..0c0c5a637f0 100644 --- a/sim/h8300/ChangeLog +++ b/sim/h8300/ChangeLog @@ -1,8 +1,13 @@ +2003-06-05 Michael Snyder + + * compile.c (sim_fetch_register): Handle SBR, VBR, MACH, MACL. + (sim_store_register): Ditto. + 2003-06-04 Michael Snyder * compile.c (sim_info): Fix typo in output. - * h8300/compile.c (set_h8300h): Replace 'flag' arguments + * compile.c (set_h8300h): Replace 'flag' arguments with a bfd_machine argument, and decode it inline. Check for bfd_mach_h8300hn and bfd_mach_h8300sn. diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c index c71658e5c8b..e82fe636623 100644 --- a/sim/h8300/compile.c +++ b/sim/h8300/compile.c @@ -4569,9 +4569,6 @@ sim_store_register (SIM_DESC sd, int rn, unsigned char *value, int length) init_pointers (sd); switch (rn) { - case PC_REGNUM: - h8_set_pc (sd, intval); - break; default: (*sim_callback->printf_filtered) (sim_callback, "sim_store_register: bad regnum %d.\n", @@ -4586,20 +4583,33 @@ sim_store_register (SIM_DESC sd, int rn, unsigned char *value, int length) case R7_REGNUM: h8_set_reg (sd, rn, intval); break; + case PC_REGNUM: + h8_set_pc (sd, intval); + break; case CCR_REGNUM: h8_set_ccr (sd, intval); break; case EXR_REGNUM: h8_set_exr (sd, intval); break; + case SBR_REGNUM: + h8_set_sbr (sd, intval); + break; + case VBR_REGNUM: + h8_set_vbr (sd, intval); + break; + case MACH_REGNUM: + h8_set_mach (sd, intval); + break; + case MACL_REGNUM: + h8_set_macl (sd, intval); + break; case CYCLE_REGNUM: h8_set_cycles (sd, longval); break; - case INST_REGNUM: h8_set_insts (sd, longval); break; - case TICK_REGNUM: h8_set_ticks (sd, longval); break; @@ -4634,6 +4644,18 @@ sim_fetch_register (SIM_DESC sd, int rn, unsigned char *buf, int length) case PC_REGNUM: v = h8_get_pc (sd); break; + case SBR_REGNUM: + v = h8_get_sbr (sd); + break; + case VBR_REGNUM: + v = h8_get_vbr (sd); + break; + case MACH_REGNUM: + v = h8_get_mach (sd); + break; + case MACL_REGNUM: + v = h8_get_macl (sd); + break; case R0_REGNUM: case R1_REGNUM: case R2_REGNUM: -- 2.30.2