diff options
| author | Alasdair Armstrong | 2018-06-27 19:23:41 +0100 |
|---|---|---|
| committer | Alasdair Armstrong | 2018-06-27 19:24:17 +0100 |
| commit | 84e5c99514eddd1c8ea962dcf3e787bc5bc91101 (patch) | |
| tree | a004792ea73b611d801834ba79d974ab10e08cfe /src/bytecode_util.ml | |
| parent | f3f31252202ea745970e99805574eac39d1d9b7b (diff) | |
Fix reading reals from strings in C lib
Diffstat (limited to 'src/bytecode_util.ml')
| -rw-r--r-- | src/bytecode_util.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bytecode_util.ml b/src/bytecode_util.ml index 2e6e1e29..139763b1 100644 --- a/src/bytecode_util.ml +++ b/src/bytecode_util.ml @@ -135,14 +135,14 @@ let rec frag_rename from_id to_id = function (**************************************************************************) let string_of_value = function - | V_bits bs -> Sail2_values.show_bitlist bs ^ "ul" + | V_bits bs -> "UINT64_C(" ^ Sail2_values.show_bitlist bs ^ ")" | V_int i -> Big_int.to_string i ^ "l" | V_bool true -> "true" | V_bool false -> "false" | V_null -> "NULL" | V_unit -> "UNIT" - | V_bit Sail2_values.B0 -> "0ul" - | V_bit Sail2_values.B1 -> "1ul" + | V_bit Sail2_values.B0 -> "UINT64_C(0)" + | V_bit Sail2_values.B1 -> "UINT64_C(1)" | V_string str -> "\"" ^ str ^ "\"" | V_ctor_kind str -> "Kind_" ^ Util.zencode_string str | _ -> failwith "Cannot convert value to string" |
