Skip to content

Commit

Permalink
Tag test now also tests CSC writing a zero tag
Browse files Browse the repository at this point in the history
  • Loading branch information
marnovandermaas committed Jan 17, 2025
1 parent a9d126f commit 4a52971
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions sw/cheri/checks/tag_test.S
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,32 @@ captags:
clc ct1, 16(ct0)
cgettag t2, ct1
bnez t2, fail
// Store valid capabilities
csc ct0, 0(ct0)
csc ct0, 8(ct0)
csc ct0, 16(ct0)
// Check that tags are all valid
clc ct1, 0(ct0)
cgettag t2, ct1
beqz t2, fail
clc ct1, 8(ct0)
cgettag t2, ct1
beqz t2, fail
clc ct1, 16(ct0)
cgettag t2, ct1
beqz t2, fail
// Store null cap to second capability
csc cnull, 8(ct0)
// Check that tags are 1,0,1
clc ct1, 0(ct0)
cgettag t2, ct1
beqz t2, fail
clc ct1, 8(ct0)
cgettag t2, ct1
bnez t2, fail
clc ct1, 16(ct0)
cgettag t2, ct1
beqz t2, fail

// Test for revocation tags
revtags:
Expand Down

0 comments on commit 4a52971

Please sign in to comment.