From edff4ba336735bcd1c244a4bd7fc8f5c4464e91b Mon Sep 17 00:00:00 2001 From: Robert Norton Date: Tue, 4 Apr 2017 10:34:42 +0100 Subject: Implement exit by raising Sail_exit exception --- src/gen_lib/sail_values.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gen_lib/sail_values.ml b/src/gen_lib/sail_values.ml index d287b2cd..86f8934a 100644 --- a/src/gen_lib/sail_values.ml +++ b/src/gen_lib/sail_values.ml @@ -13,6 +13,8 @@ type value = | Vregister of vbit array ref * int * bool * (string * (int * int)) list | Vbit of vbit (*Mostly for Vundef in place of undefined register place holders*) +exception Sail_exit + let string_of_bit = function | Vone -> "1" | Vzero -> "0" @@ -37,7 +39,7 @@ let is_one i = else Vzero -let exit _ = failwith "called exit" +let exit _ = raise Sail_exit let is_one_int i = -- cgit v1.2.3