diff options
| author | Robert Norton | 2017-04-21 13:11:47 +0100 |
|---|---|---|
| committer | Robert Norton | 2017-04-21 13:11:47 +0100 |
| commit | 8f4a6b668e2fa02aa3eb37a62e964e6320b02ee6 (patch) | |
| tree | 73d5b163e2604c80758ade2fb27c3da1786453a7 | |
| parent | 74c337e3d6ff293eb9c2a39f045c2192f132d164 (diff) | |
remove unnecessary cast in incrementCP0Count (run every instruction) for potential speedup.
| -rw-r--r-- | mips/mips_prelude.sail | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mips/mips_prelude.sail b/mips/mips_prelude.sail index 22e2f138..fcac3d98 100644 --- a/mips/mips_prelude.sail +++ b/mips/mips_prelude.sail @@ -483,11 +483,11 @@ function unit checkCP0Access () = } function unit incrementCP0Count() = { - TLBRandom := (if (unsigned(TLBRandom) == unsigned(TLBWired)) + TLBRandom := (if (TLBRandom == TLBWired) then (TLBIndexMax) else (TLBRandom - 1)); CP0Count := (CP0Count + 1); - if (unsigned(CP0Count) == unsigned(CP0Compare)) then { + if (CP0Count == CP0Compare) then { (CP0Cause[15]) := bitone; (* XXX indexing IP field here doesn't seem to work *) }; |
