Skip to content

Commit

Permalink
[ASL+AArch64] Allow access to UDF under variant
Browse files Browse the repository at this point in the history
  • Loading branch information
HadrienRenaud committed Oct 10, 2024
1 parent a1932ce commit 4e158bb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions herd/AArch64ASLSem.ml
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,8 @@ module Make (TopConf : AArch64Sig.Config) (V : Value.AArch64ASL) :
"domain" ^= var (barrier_domain dom);
"types" ^= var (barrier_typ btyp);
] )
| I_UDF k when C.variant Variant.ASL_AArch64_UDF ->
Some ("udf/UDF_only_perm_undef.opn", stmt [ "imm16" ^= litbv 16 k ])
| i ->
let () =
if _dbg then
Expand Down
7 changes: 6 additions & 1 deletion herd/variant.ml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ type t =
| ASLType of [`Warn|`Silence|`TypeCheck]
(* Activate ASL experimental mode *)
| ASLExperimental
(* UDF control in AArch64 mode *)
| ASL_AArch64_UDF
(* Signed Int128 types *)
| S128
(* Strict interpretation of variant, e.g. -variant asl,strict *)
Expand All @@ -119,7 +121,7 @@ let tags =
"pte-squared"; "PhantomOnLoad"; "OptRfRMW"; "ConstrainedUnpredictable";
"exp"; "self"; "cos-opt"; "test"; "T[0-9][0-9]"; "asl"; "strict";
"warn"; "S128"; "ASLType+Warn"; "ASLType+Silence"; "ASLType+Check";
"ASL+Experimental"; "telechat"; "OldSolver"; "oota";]
"ASL+Experimental"; "ASL+AArch64+UDF"; "telechat"; "OldSolver"; "oota";]

let parse s = match Misc.lowercase s with
| "success" -> Some Success
Expand Down Expand Up @@ -173,6 +175,7 @@ let parse s = match Misc.lowercase s with
| "asltype+silence"-> Some (ASLType `Silence)
| "asltype+check" -> Some (ASLType `TypeCheck)
| "asl+experimental"|"asl+exp" -> Some ASLExperimental
| "asl+aarch64+udf" -> Some ASL_AArch64_UDF
| "s128" -> Some S128
| "strict" -> Some Strict
| "warn" -> Some Warn
Expand Down Expand Up @@ -276,6 +279,7 @@ let pp = function
| ASLType `Silence -> "ASLType+Silence"
| ASLType `TypeCheck -> "ASLType+Check"
| ASLExperimental -> "ASL+Experimental"
| ASL_AArch64_UDF -> "ASL+AArch64+UDF"
| Telechat -> "telechat"
| NV2 -> "NV2"
| OldSolver -> "OldSolver"
Expand Down Expand Up @@ -332,4 +336,5 @@ let set_sme_length r = function

let check_tag = function
| ASLExperimental -> [ASL;ASLExperimental;]
| ASL_AArch64_UDF -> [ASL;ASL_AArch64_UDF;]
| tag -> [tag]
2 changes: 2 additions & 0 deletions herd/variant.mli
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ type t =
| ASLType of [`Warn|`Silence|`TypeCheck]
(* Activate ASL experimental mode *)
| ASLExperimental
(* UDF control in ASL+AArch64 mode *)
| ASL_AArch64_UDF
(* Signed Int128 types *)
| S128
(* Strict interpretation of variant, e.g. -variant asl,strict *)
Expand Down

0 comments on commit 4e158bb

Please sign in to comment.