Skip to content

Commit 1e6ac0c

Browse files
committed
[herd] Add test
The new test checks that size mismatches are delayed. Currently, it also reveals a problem with the ASL+VMSA mode.
1 parent b82fb4f commit 1e6ac0c

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
AArch64 A031
2+
(* Test the delaying of size check *)
3+
TTHM=P1:HA
4+
{
5+
int z=1;
6+
int x=2;
7+
[PTE(z)]=(oa:PA(z),af:0);
8+
pteval_t 0:X15=(oa:PA(x),af:0); 0:X14=PTE(z);
9+
1:X6=p;
10+
int *p = &z;
11+
}
12+
P0 | P1 ;
13+
STR X15,[X14] | LDR X4,[X6] ;
14+
| LDR W5,[X4] ;
15+
~exists [PTE(z)]=(oa:PA(x), af:0) /\ 1:X5=2
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Test A031 Forbidden
2+
States 3
3+
1:X5=1; [PTE(z)]=(oa:PA(x), af:0);
4+
1:X5=1; [PTE(z)]=(oa:PA(x));
5+
1:X5=2; [PTE(z)]=(oa:PA(x));
6+
Ok
7+
Witnesses
8+
Positive: 14 Negative: 0
9+
Flag requires-BBM
10+
Condition ~exists ([PTE(z)]=(oa:PA(x), af:0) /\ 1:X5=2)
11+
Observation A031 Never 0 14
12+
Hash=b49f887241d4043b0d917f97925e00ab
13+

herd/tests/instructions/AArch64.kvm/asl-vmsa.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ nonames A006,F006
1717
nonames A024,A025
1818
# CAS fail - revisit semantic
1919
nonames A029,A030
20+
# Pending bug, some executions that should be rejected by model persist
21+
nonames A031

0 commit comments

Comments
 (0)