summaryrefslogtreecommitdiff
path: root/src/util.mli
diff options
context:
space:
mode:
authorAlasdair Armstrong2018-05-09 20:08:54 +0100
committerAlasdair Armstrong2018-05-31 18:10:03 +0100
commit6a360137340c86006b4f3a7c6564717299cb1761 (patch)
tree9a727423bfc7654483a92732386d2ff44353f304 /src/util.mli
parent3babc5a0c35a2774904d2ee44f3c69e79c54876f (diff)
Fixes to get ARM u-boot working in Sail.
Also fixes to C backend for compiling MIPS spec to C - Fix an issue with const correctness in internal_vector_update functions generated by C backend - Add builtins for MIPS to sail.h - Fix an issue where reg_deref didn't work when called on pointers to large bitvectors, i.e. vectors containing references to large bitfields as in the MIPS TLB code - Various bug fixes and changes for running U-boot on ARM model, including for interpreter and OCaml compilation. - Fix memory leak issues and incorrect shadowing for foreach loops - Update C header file. Fixes memory leak in memory read/write builtins. - Add aux constructor to ANF representation to hold environment information. - Fix undefined behavior caused by optimisation left shifting uint64_t vectors 64 or more times. Unfortunately there's more issues because the same happens for X >> 64 right shifts. It would make sense for this to be zero, because that would guarantee the property that ((X >> n) >> m) == (X >> (n + m)) but we probably need to do (X >> (n - 1) >> 1) in the optimisation to ensure that we don't cause UB. Shifting by 63 and then by 1 is well-defined, but shifting by 64 in one go isn't according to the C standard. This issue with right-shifts only occurs for zero-length vectors, so it's not a huge deal, but it's still annoying. - Add versions of print_bits and print_int that print to stderr. Follows OCaml convention of print/prerr. Should make things more explicit. Different backends had different ideas about where print should output to, not every backend needs to have this (e.g. theorem prover backends don't need to print) but having both stderr and stdout seperate and clear is useful for executable models (UART needs to be stdout, debug messages should be stderr).
Diffstat (limited to 'src/util.mli')
-rw-r--r--src/util.mli2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util.mli b/src/util.mli
index 7a20a6dd..bb7aa70d 100644
--- a/src/util.mli
+++ b/src/util.mli
@@ -252,3 +252,5 @@ val warn : string -> unit
val zencode_string : string -> string
val zencode_upper_string : string -> string
+
+val log_line : string -> int -> string -> string