2003-07-02 Michael Snyder * compile.c (decode): IMM16 is always zero-extended. Index: compile.c =================================================================== RCS file: /cvs/cvsfiles/devo/sim/h8sx/compile.c,v retrieving revision 1.84 retrieving revision 1.85 diff -p -r1.84 -r1.85 *** compile.c 2003/06/19 04:18:52 1.84 --- compile.c 2003/07/02 19:09:27 1.85 *************** decode (SIM_DESC sd, int addr, unsigned *** 818,824 **** (looking_for & SIZE) == L_16U) { cst[opnum] = (data[len / 2] << 8) + data[len / 2 + 1]; ! if ((looking_for & SIZE) != L_16U) cst[opnum] = (short) cst[opnum]; /* Sign extend. */ } else if (looking_for & ABSJMP) --- 818,826 ---- (looking_for & SIZE) == L_16U) { cst[opnum] = (data[len / 2] << 8) + data[len / 2 + 1]; ! /* Immediates are always unsigned. */ ! if ((looking_for & SIZE) != L_16U && ! (looking_for & MODE) != IMM) cst[opnum] = (short) cst[opnum]; /* Sign extend. */ } else if (looking_for & ABSJMP)