summaryrefslogtreecommitdiff
path: root/mips
diff options
context:
space:
mode:
authorShaked Flur2018-02-08 12:06:00 +0000
committerShaked Flur2018-02-08 12:06:00 +0000
commit043ea8ec3faecadf34ef9010bdd539f595f9c6da (patch)
treeeb44af3b9dec8e1a222872f56d4e32781596fa9e /mips
parent151d86b911c9a266465638ee3514156dfb178e92 (diff)
replaced NIA_LR/CTR/register with NIA_indirect;
removed IK_cond_branch, and added IK_branch
Diffstat (limited to 'mips')
-rw-r--r--mips/mips_regfp.sail16
1 files changed, 6 insertions, 10 deletions
diff --git a/mips/mips_regfp.sail b/mips/mips_regfp.sail
index 36750583..13165f67 100644
--- a/mips/mips_regfp.sail
+++ b/mips/mips_regfp.sail
@@ -322,38 +322,34 @@ function (regfps,regfps,regfps,niafps,diafp,instruction_kind) initial_analysis (
oR := RFull("HI") :: RFull ("LO") :: oR;
}
case (J(offset)) -> {
- (* XXX actually unconditional jump *)
- (*ik := IK_cond_branch;*)
+ ik := IK_branch;
Dia := DIAFP_concrete((PC + 4)[63..28] : offset : 0b00);
}
case (JAL(offset)) -> {
- (* XXX actually unconditional jump *)
- (*ik := IK_cond_branch;*)
+ ik := IK_branch;
oR := RFull("GPR31") :: oR;
Dia := DIAFP_concrete((PC + 4)[63..28] : offset : 0b00);
}
case (JR(rs)) -> {
- (* XXX actually unconditional jump *)
- (*ik := IK_cond_branch;*)
+ ik := IK_branch;
iR := RFull(GPRs[rs]) :: iR;
Dia := DIAFP_reg(RFull(GPRs[rs]));
}
case (JALR(rs, rd)) -> {
- (* XXX actually unconditional jump *)
- (*ik := IK_cond_branch;*)
+ ik := IK_branch;
iR := RFull(GPRs[rs]) :: iR;
oR := RFull("GPR31") :: oR;
Dia := DIAFP_reg(RFull(GPRs[rs]));
}
case (BEQ(rs, rd, imm, ne, likely)) -> {
- ik := IK_cond_branch;
+ ik := IK_branch;
if rs == 0 then () else iR := RFull(GPRs[rs]) :: iR;
if rd == 0 then () else iR := RFull(GPRs[rd]) :: iR;
let (bit[64]) offset = (EXTS(imm : 0b00) + 4) in
Dia := DIAFP_concrete (PC + offset);
}
case (BCMPZ(rs, imm, cmp, link, likely)) -> {
- ik := IK_cond_branch;
+ ik := IK_branch;
if rs == 0 then () else iR := RFull(GPRs[rs]) :: iR;
if link then
oR := RFull("GPR31") :: oR;