summaryrefslogtreecommitdiff
path: root/src/test/test3.sail
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/test3.sail')
-rw-r--r--src/test/test3.sail11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/test3.sail b/src/test/test3.sail
index 154ce5b6..e6bf4cdd 100644
--- a/src/test/test3.sail
+++ b/src/test/test3.sail
@@ -6,6 +6,8 @@ val nat -> nat effect { wmem , rmem } MEM
val nat -> nat effect { wmem , rmem } MEM_GPU
val ( nat * nat ) -> nat effect { wmem , rmem } MEM_SIZE
+val nat -> (bit[8]) effect { wmem , rmem } MEM_WORD
+
function unit ignore(x) = ()
(* extern functions *)
@@ -24,6 +26,15 @@ function nat main _ = {
(* register read, thanks to register declaration *)
ignore(dummy_reg);
+
+ MEM_WORD(0) := 0b10101010;
+ (MEM_WORD(0))[3..4] := 0b10;
+ (* XXX this one is broken - I don't what it should do,
+ or even if we should accept it, but the current result
+ is to eat up one bit, ending up with a 7-bit word. *)
+ (MEM_WORD(0))[4..3] := 0b10;
+ ignore(MEM_WORD(0));
+
(* infix call *)
ignore(7 * 9);