diff options
| author | Robert Norton | 2017-04-07 16:20:05 +0100 |
|---|---|---|
| committer | Robert Norton | 2017-04-07 16:54:20 +0100 |
| commit | 0f32be4f49c9ab4dbc7b0147d36e04fefc2b274c (patch) | |
| tree | c2e2815f92c4f8cc4467f2217f65ca02f44c6ed8 /src | |
| parent | a5ff1a848081f17d0785e4b5fbb3b89908cce3a5 (diff) | |
simplify xor using ocaml <> operator which also has the advantage of being more correct
Diffstat (limited to 'src')
| -rw-r--r-- | src/gen_lib/sail_values.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gen_lib/sail_values.ml b/src/gen_lib/sail_values.ml index ebde00a7..31605849 100644 --- a/src/gen_lib/sail_values.ml +++ b/src/gen_lib/sail_values.ml @@ -320,7 +320,7 @@ let bitwise_binop_bit op (l,r) = let bitwise_and_bit = bitwise_binop_bit (&&) let bitwise_or_bit = bitwise_binop_bit (||) -let bitwise_xor_bit = bitwise_binop_bit (fun x y -> (1 = (if x then 1 else 0) lxor (if y then 1 else 0))) +let bitwise_xor_bit = bitwise_binop_bit (<>) let bitwise_binop op (l,r) = let bop l arrayl arrayr = @@ -344,7 +344,7 @@ let bitwise_binop op (l,r) = let bitwise_and = bitwise_binop (&&) let bitwise_or = bitwise_binop (||) -let bitwise_xor = bitwise_binop (fun x y -> (1 = (if x then 1 else 0) lxor (if y then 0 else 1))) +let bitwise_xor = bitwise_binop (<>) let rec power_int base raiseto = if raiseto = 0 |
