diff options
| author | Robert Norton | 2016-01-28 17:32:05 +0000 |
|---|---|---|
| committer | Robert Norton | 2016-01-28 17:32:05 +0000 |
| commit | 18b5be634007e84ce93b3de0bd5a07b5bbb64160 (patch) | |
| tree | 539d22ec1ec62d22b40ef535214e67e22a6ebc74 /mips/mips.sail | |
| parent | 537fa693fc97ba138fcdf51712f5979be2a01e35 (diff) | |
Add test for sltu. Fixed decode function which was returning wrong ast node but test still does not pass, apparently because sail is doing signed comparison for <
Diffstat (limited to 'mips/mips.sail')
| -rw-r--r-- | mips/mips.sail | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mips/mips.sail b/mips/mips.sail index 1bf97a0e..4df6f72c 100644 --- a/mips/mips.sail +++ b/mips/mips.sail @@ -185,7 +185,7 @@ function (option<Exception>, option<bit[64]>) TranslateAddress ((bit[64]) vAddr, case (0b1111111111111111111111111111111, 0b00) -> (None, Some(EXTZ(vAddr[28..0]))) (* kseg0 unmapped cached 32-bit compat *) case (_, _) -> (err, None) (* xkseg mapped TODO *) } - case 0b10 -> (None, Some(EXTZ(vAddr[58..0]))) (* xkphys bits 61-59 are cache mode which we ignore *) + case 0b10 -> (None, Some(vAddr)) (* xkphys bits 61-59 are cache mode which we ignore *) case 0b01 -> (err, None) (* xsseg - supervisor mapped TODO *) case 0b00 -> (err, None) (* xuseg - user mapped TODO *) } @@ -765,7 +765,7 @@ function clause execute (SLTI(rs, rt, imm)) = union ast member regregreg SLTU function clause decode (0b000000 : (regno) rs : (regno) rt : (regno) rd : 0b00000 : 0b101011) = - Some(SLT(rs, rt, rd)) + Some(SLTU(rs, rt, rd)) function clause execute (SLTU(rs, rt, rd)) = { wGPR(rd) := if (rGPR(rs) < rGPR(rt)) then 1 else 0 |
