aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2003-06-19 00:49:33 +0000
committerMichael Snyder <msnyder@vmware.com>2003-06-19 00:49:33 +0000
commit173b1c982aa0a176d06c50421fdec23508b4b9eb (patch)
treeda1546356d8b42856f5abddf9fbccc7c3c9e1aa1 /sim
parentec0d51413fcbd000055f8491e18d0e6a02566e97 (diff)
downloadgdb-173b1c982aa0a176d06c50421fdec23508b4b9eb.zip
gdb-173b1c982aa0a176d06c50421fdec23508b4b9eb.tar.gz
gdb-173b1c982aa0a176d06c50421fdec23508b4b9eb.tar.bz2
2003-06-05 Michael Snyder <msnyder@redhat.com>
* compile.c (sim_fetch_register): Handle SBR, VBR, MACH, MACL. (sim_store_register): Ditto.
Diffstat (limited to 'sim')
-rw-r--r--sim/h8300/ChangeLog7
-rw-r--r--sim/h8300/compile.c32
2 files changed, 33 insertions, 6 deletions
diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog
index e35d2b7..0c0c5a6 100644
--- a/sim/h8300/ChangeLog
+++ b/sim/h8300/ChangeLog
@@ -1,8 +1,13 @@
+2003-06-05 Michael Snyder <msnyder@redhat.com>
+
+ * compile.c (sim_fetch_register): Handle SBR, VBR, MACH, MACL.
+ (sim_store_register): Ditto.
+
2003-06-04 Michael Snyder <msnyder@redhat.com>
* 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 c71658e..e82fe63 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: