* interp.c (sim_fetch_register): Only store a single byte for

1 byte registers.
This commit is contained in:
Stephane Carrez 2003-03-01 16:00:09 +00:00
parent eadc1c87eb
commit 00416c6ed6
2 changed files with 14 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2003-03-01 Stephane Carrez <stcarrez@nerim.fr>
* interp.c (sim_fetch_register): Only store a single byte for
1 byte registers.
2003-02-27 Andrew Cagney <cagney@redhat.com>
* interp.c (sim_prepare_for_program, sim_open)

View file

@ -554,8 +554,15 @@ sim_fetch_register (SIM_DESC sd, int rn, unsigned char *memory, int length)
val = 0;
break;
}
memory[0] = val >> 8;
memory[1] = val & 0x0FF;
if (size == 1)
{
memory[0] = val;
}
else
{
memory[0] = val >> 8;
memory[1] = val & 0x0FF;
}
return size;
}