From c5db705ca228421b4035b4361aba9823750fd67c Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Tue, 23 Jan 2018 01:24:01 +0000 Subject: Added additional tests, and fixed ocaml build of ARM tests --- src/value.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/value.ml') 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))); -- cgit v1.2.3