diff options
| author | Brian Campbell | 2018-02-16 15:57:27 +0000 |
|---|---|---|
| committer | Brian Campbell | 2018-02-16 15:58:21 +0000 |
| commit | d864aa242ac00ecee08d6d2792a0803ba5450d86 (patch) | |
| tree | 8a7ee43bff6dc10cc3a48cac871ddbe78b74bf97 /aarch64/mono/BigEndianReverse.sail | |
| parent | 00ca0aa4dce0abdcba574ce907e9a8a62d9d2255 (diff) | |
Add alternative definitions of aarch64 functions for monomorphisation
Diffstat (limited to 'aarch64/mono/BigEndianReverse.sail')
| -rw-r--r-- | aarch64/mono/BigEndianReverse.sail | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/aarch64/mono/BigEndianReverse.sail b/aarch64/mono/BigEndianReverse.sail new file mode 100644 index 00000000..23b222f4 --- /dev/null +++ b/aarch64/mono/BigEndianReverse.sail @@ -0,0 +1,10 @@ +val BigEndianReverse : forall ('width : Int), 'width >= 0 & 'width >= 0. + bits('width) -> bits('width) effect {escape} + +function BigEndianReverse value_name = { + assert(('width == 8) | (('width == 16) | (('width == 32) | (('width == 64) | ('width == 128))))); + result : bits('width) = replicate_bits(0b0,'width); + foreach (i from 0 to ('width - 1) by 8) + result[i+7 .. i] = (value_name['width-i - 1 .. 'width-i - 8] : bits(8)); + return result +} |
