summaryrefslogtreecommitdiff
path: root/src/gen_lib/sail_values_word.lem
AgeCommit message (Collapse)Author
2017-08-24Begin refactoring Sail libraryThomas Bauereiss
- Add back support for bit list representation of bit vectors, for backwards compatibility in order to ease integration with the interpreter. For this purpose, split out a file sail_operators.lem from sail_values.lem, and add a variant sail_operators_mwords.lem for the machine word representation of bitvectors. Currently, Sail is hardcoded to use machine words for the sequential state monad, and bit lists for the free monad, but this could be turned into a command line flag. - Add a prelude_wrappers.sail file for glueing the Sail prelude to the Lem library. The wrappers make use of sizeof expressions to extract type information from bitvectors (length, start index) in order to pass it to the Lem functions. - Add early return support to the free monad, using a new constructor "Return of 'r". As with the sequential monad, functions with early return are wrapped into "catch_early_return", which extracts the return value at the end of the function execution.
2017-06-22fix three different copies of the hardware_quot function to do proper ↵Robert Norton
trucation towards zero. Previous version was incorrect if result was exact and a<0 and b>0.
2017-06-14Add a work-in-progress version of sail_values.lemBrian Campbell
that uses the new Lem machine words library.