This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] sim: h8300 SBR initial value fix


On 27 May 2016 13:38, Yoshinori Sato wrote:
> 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;

OK for now, but the init_pointers() func really needs to die.
i just haven't finished ripping that cruft out yet.
-mike

Attachment: signature.asc
Description: Digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]