summaryrefslogtreecommitdiff
path: root/mips/run_embed.ml
diff options
context:
space:
mode:
authorRobert Norton2017-04-06 22:19:05 +0100
committerRobert Norton2017-04-07 16:54:19 +0100
commita5ff1a848081f17d0785e4b5fbb3b89908cce3a5 (patch)
tree4769d633e6f06df72f5f37868fe1af56fd7a438f /mips/run_embed.ml
parent401f914c9e0ef6a3ac3f1d4e8668afe2ff8c7cff (diff)
read from uninitialsed memory returns undef (required to pass test_raw_cache_write_to_use test
Diffstat (limited to 'mips/run_embed.ml')
-rw-r--r--mips/run_embed.ml8
1 files changed, 7 insertions, 1 deletions
diff --git a/mips/run_embed.ml b/mips/run_embed.ml
index 42e36a6e..6a51063e 100644
--- a/mips/run_embed.ml
+++ b/mips/run_embed.ml
@@ -311,7 +311,13 @@ let time_it action arg =
(finish_time -. start_time, ret)
let rec debug_print_gprs start stop =
- resultf "DEBUG MIPS REG %.2d 0x%s\n" start (big_int_to_hex64 (unsigned_big(vector_access Mips_model._GPR (big_int_of_int start))));
+ let gpr_val = vector_access Mips_model._GPR (big_int_of_int start) in
+ let gpr_str =
+ if has_undef gpr_val then
+ "uuuuuuuuuuuuuuuu"
+ else
+ big_int_to_hex64 (unsigned_big(gpr_val)) in
+ resultf "DEBUG MIPS REG %.2d 0x%s\n" start gpr_str;
if start < stop
then debug_print_gprs (start + 1) stop
else ()