summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/power.sail9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/test/power.sail b/src/test/power.sail
index a01e8cfa..e75e24ef 100644
--- a/src/test/power.sail
+++ b/src/test/power.sail
@@ -96,7 +96,7 @@ val extern ( nat , nat ) -> (bit[64]) effect { wmem , rmem } MEM
(* XXX effect for trap? *)
val extern unit -> unit effect pure trap
-(* XXX *)
+(* XXX should be register<bool>, this is a workaround for limitations in coercions *)
let (bit) mode64bit = bitone
scattered function unit execute
@@ -206,6 +206,13 @@ function unit init() = {
only saved in restore in our simple example. *)
GPR31 := 0;
+ (* unused in practice, but must be set for bclr computation *)
+ CTR := 0;
+ CR := 0;
+ (* return address -- I have no idea what to put there, let's make an
+ infinite loop! *)
+ LR := CIA;
+
}