diff options
| author | Alasdair Armstrong | 2018-01-23 01:24:01 +0000 |
|---|---|---|
| committer | Alasdair Armstrong | 2018-01-23 01:24:01 +0000 |
| commit | c5db705ca228421b4035b4361aba9823750fd67c (patch) | |
| tree | cee5ab3a1f742a26a942d686e550e7122f9e42ef /src/value.ml | |
| parent | b3f5dd5bac689bee9770081215bd0b1fe1071084 (diff) | |
Added additional tests, and fixed ocaml build of ARM tests
Diffstat (limited to 'src/value.ml')
| -rw-r--r-- | src/value.ml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/value.ml b/src/value.ml index 0b50ee1f..a871c1be 100644 --- a/src/value.ml +++ b/src/value.ml @@ -366,7 +366,10 @@ let value_write_ram = function | _ -> failwith "value write_ram" let value_putchar = function - | [v] -> Sail_lib.putchar (coerce_int v); V_unit + | [v] -> + output_char !print_chan (char_of_int (Big_int.to_int (coerce_int v))); + flush !print_chan; + V_unit | _ -> failwith "value putchar" let value_print_bits = function @@ -384,7 +387,7 @@ let primops = [ ("and_bool", and_bool); ("or_bool", or_bool); ("print_endline", value_print); - ("prerr_endline", value_print); + ("prerr_endline", fun vs -> (prerr_endline (string_of_value (List.hd vs)); V_unit)); ("putchar", value_putchar); ("string_of_int", fun vs -> V_string (string_of_value (List.hd vs))); ("string_of_bits", fun vs -> V_string (string_of_value (List.hd vs))); |
