+Wed Apr 15 18:31:54 1998 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * mips.igen (DSRAV): Use function do_dsrav.
+ (SRAV): Use new function do_srav.
+
+ * m16.igen (BEQZ, BNEZ): Compare GPR[TRX] not GPR[RX].
+ (B): Sign extend 11 bit immediate.
+ (EXT-B*): Shift 16 bit immediate left by 1.
+ (ADDIU*): Don't sign extend immediate value.
+
Wed Apr 15 10:32:15 1998 Andrew Cagney <cagney@b1.cygnus.com>
* m16run.c (sim_engine_run): Restore CIA after handling an event.
}
-:function:::void:do_srav:int rs, int rt, int rd
+:function:::void:do_dsrav:int rs, int rt, int rd
{
int s = MASKED64 (GPR[rs], 5, 0);
TRACE_ALU_INPUT2 (GPR[rt], s);
*tx19:
// end-sanitize-tx19
{
- do_srav (SD_, RS, RT, RD);
+ do_dsrav (SD_, RS, RT, RD);
}
00000000000,5.RT,5.RD,5.SHIFT,111010:SPECIAL:64::DSRL
-"dsrav r<RD>, r<RT>, <SHIFT>"
+"dsrl r<RD>, r<RT>, <SHIFT>"
*mipsIII:
*mipsIV:
*vr5000:
}
+
+:function:::void:do_srav:int rs, int rt, int rd
+{
+ int s = MASKED (GPR[rs], 4, 0);
+ signed32 temp = (signed32) GPR[rt] >> s;
+ TRACE_ALU_INPUT2 (GPR[rt], s);
+ GPR[rd] = EXTEND32 (temp);
+ TRACE_ALU_RESULT (GPR[rd]);
+}
+
000000,5.RS,5.RT,5.RD,00000000111:SPECIAL:32::SRAV
"srav r<RD>, r<RT>, r<RS>"
*mipsI,mipsII,mipsIII,mipsIV:
*tx19:
// end-sanitize-tx19
{
- int s = MASKED (GPR[RS], 4, 0);
- signed32 temp = (signed32) GPR[RT] >> s;
- GPR[RD] = EXTEND32 (temp);
+ do_srav (SD_, RS, RT, RD);
}
+
:function:::void:do_srl:int rt, int rd, int shift
{
unsigned32 temp = (unsigned32) GPR[rt] >> shift;