2003-07-17 Michael Snyder <msnyder@redhat.com>
* compile.c (decode): IMM16 is always zero-extended.
This commit is contained in:
parent
61fdd1259b
commit
0f42aa719d
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2003-07-17 Michael Snyder <msnyder@redhat.com>
|
||||||
|
|
||||||
|
* compile.c (decode): IMM16 is always zero-extended.
|
||||||
|
|
||||||
2003-06-24 Michael Snyder <msnyder@redhat.com>
|
2003-06-24 Michael Snyder <msnyder@redhat.com>
|
||||||
|
|
||||||
* sim-main.h (SIM_WIFSTOPPED, SIM_WSTOPSIG): Define.
|
* sim-main.h (SIM_WIFSTOPPED, SIM_WSTOPSIG): Define.
|
||||||
|
|
|
@ -818,7 +818,9 @@ decode (SIM_DESC sd, int addr, unsigned char *data, decoded_inst *dst)
|
||||||
(looking_for & SIZE) == L_16U)
|
(looking_for & SIZE) == L_16U)
|
||||||
{
|
{
|
||||||
cst[opnum] = (data[len / 2] << 8) + data[len / 2 + 1];
|
cst[opnum] = (data[len / 2] << 8) + data[len / 2 + 1];
|
||||||
if ((looking_for & SIZE) != L_16U)
|
/* Immediates are always unsigned. */
|
||||||
|
if ((looking_for & SIZE) != L_16U &&
|
||||||
|
(looking_for & MODE) != IMM)
|
||||||
cst[opnum] = (short) cst[opnum]; /* Sign extend. */
|
cst[opnum] = (short) cst[opnum]; /* Sign extend. */
|
||||||
}
|
}
|
||||||
else if (looking_for & ABSJMP)
|
else if (looking_for & ABSJMP)
|
||||||
|
|
Loading…
Reference in a new issue