This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] sim: h8300 SBR initial value fix
- From: Yoshinori Sato <ysato at users dot sourceforge dot jp>
- To: gdb-patches at sourceware dot org
- Cc: Yoshinori Sato <ysato at users dot sourceforge dot jp>
- Date: Fri, 27 May 2016 13:38:55 +0900
- Subject: [PATCH] sim: h8300 SBR initial value fix
- Authentication-results: sourceware.org; auth=none
SBR is initialize to 0xFFFFFF00.
2016-05-27 Yoshinori Sato <ysao@users.sourceforge.jp>
* compile.c (init_pointer): SBR initialize to 0xFFFFFF00
(sim_open): Remove missing initialize.
---
sim/h8300/compile.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c
index c1c61d8..c892379 100644
--- a/sim/h8300/compile.c
+++ b/sim/h8300/compile.c
@@ -1764,6 +1764,7 @@ init_pointers (SIM_DESC sd)
h8_set_mask (sd, memory_size - 1);
memset (h8_get_reg_buf (sd), 0, sizeof (((STATE_CPU (sd, 0))->regs)));
+ h8_set_sbr (sd, 0xFFFFFF00);
for (i = 0; i < 8; i++)
{
@@ -4843,7 +4844,6 @@ sim_open (SIM_OPEN_KIND kind,
cpu = STATE_CPU (sd, 0);
SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
- cpu->regs[SBR_REGNUM] = 0xFFFFFF00;
/* sim_cpu object is new, so some initialization is needed. */
init_pointers_needed = 1;
--
2.7.0