diff options
| author | Shaked Flur | 2017-03-24 21:23:17 +0000 |
|---|---|---|
| committer | Shaked Flur | 2017-03-24 21:23:17 +0000 |
| commit | bf9946ba6ad6ffed0d6449f5c0688590f7cd22cc (patch) | |
| tree | 48d04525d968e637b1cb9a53b8f76585a3376f4f /src/lem_interp/sail_impl_base.lem | |
| parent | 7920ee969ee365fea6a6ab7201420d3dd193b2f4 (diff) | |
fixed endianness
Diffstat (limited to 'src/lem_interp/sail_impl_base.lem')
| -rw-r--r-- | src/lem_interp/sail_impl_base.lem | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lem_interp/sail_impl_base.lem b/src/lem_interp/sail_impl_base.lem index 76d6c993..9ee0d011 100644 --- a/src/lem_interp/sail_impl_base.lem +++ b/src/lem_interp/sail_impl_base.lem @@ -95,10 +95,10 @@ type memory_byte = byte_lifted (* of length 8 *) (*MSB first everywhere*) type memory_value = list memory_byte (* the list is of length >=1 *) (* the head of the list is the byte stored at the lowest address; -when calling a Sail function with a wmv effect, the list significant 8 +when calling a Sail function with a wmv effect, the least significant 8 bits of the bit vector passed to the function will be interpreted as the lowest address byte; similarly, when calling a Sail function with -rmem effect, the lowest address byte will be placed in the list +rmem effect, the lowest address byte will be placed in the least significant 8 bits of the bit vector returned by the function; this behaviour is consistent with little-endian. *) @@ -940,8 +940,8 @@ let memory_value_undef (width:nat) : memory_value = val match_endianness : forall 'a. end_flag -> list 'a -> list 'a let match_endianness endian l = match endian with - | E_little_endian -> l - | E_big_endian -> List.reverse l + | E_little_endian -> List.reverse l + | E_big_endian -> l end (* lengths *) |
