diff options
| author | Robert Norton | 2018-03-02 13:43:57 +0000 |
|---|---|---|
| committer | Robert Norton | 2018-03-02 13:44:11 +0000 |
| commit | 7cfbb697db209b96449a5c311b395d64d99e20a8 (patch) | |
| tree | a5780c16ef0980414848fba8859c87b2b8e2dadd /cheri | |
| parent | bfb7331e0d1df763e51c59016f9d42e1ff7f90c5 (diff) | |
work around bug in ocaml foreach generation -- end point not included in loop (see #8).
Diffstat (limited to 'cheri')
| -rw-r--r-- | cheri/cheri_prelude_common.sail | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cheri/cheri_prelude_common.sail b/cheri/cheri_prelude_common.sail index 02a6d408..fb3f456e 100644 --- a/cheri/cheri_prelude_common.sail +++ b/cheri/cheri_prelude_common.sail @@ -385,7 +385,7 @@ function init_cp2_state () = { PCC = defaultBits; nextPCC = defaultBits; delayedPCC = defaultBits; - foreach(i from 0 to 31) { + foreach(i from 0 to 32) { let idx = to_bits(5, i) in writeCapReg(idx, default_cap); } @@ -418,7 +418,7 @@ function capToString cap = function dump_cp2_state () = { print(concat_str("DEBUG CAP PCC", capToString(capRegToCapStruct(PCC)))); - foreach(i from 0 to 31) { + foreach(i from 0 to 32) { print(concat_str("DEBUG CAP REG ", concat_str(string_of_int(i), capToString(readCapReg(to_bits(5, i)))))) } }
\ No newline at end of file |
