summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorGabriel Kerneis2014-02-28 18:11:23 +0000
committerGabriel Kerneis2014-02-28 18:11:23 +0000
commit75788ce047418b88738635597d6eebf5c31f9752 (patch)
treebd210670451e66622690c95eaea6845fc5f6c1b2 /src/test
parent0a1013cde6b79e9e588a1055d8143250599d6f9c (diff)
Fix endianness
In fact, increasing order is big-endian, not little-endian. This is good news for us, because it means we do not need any switch for the POWER spec.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run_power.ml9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/test/run_power.ml b/src/test/run_power.ml
index e8f47d64..91bb0448 100644
--- a/src/test/run_power.ml
+++ b/src/test/run_power.ml
@@ -14,19 +14,14 @@ let rec foldli f acc ?(i=0) = function
| x::xs -> foldli f (f i acc x) ~i:(i+1) xs
;;
-let little_endian = false ;;
+let big_endian = true ;;
let hex_to_big_int s = Big_int.big_int_of_int64 (Int64.of_string s) ;;
-(* XXX POWER is big-endian - cheating until we have Kathy's switch *)
-let flip_vec (V_vector (i, inc, l)) = V_vector (i, not inc, l)
-
let big_int_to_vec b size =
- flip_vec (
- (if little_endian then to_vec_inc else to_vec_dec)
+ (if big_endian then to_vec_inc else to_vec_dec)
size
(V_lit (L_aux (L_num b, Unknown)))
- )
;;
let mem = ref Mem.empty ;;