Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FMV][AArch64] Add runtime test for memtag. #173

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions SingleSource/UnitTests/AArch64/acle-fmv-features.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,15 @@ CHECK(mops, mops, mops, false, {
: : "cc", "memory"
);
})
// We can't use any FEAT_MTE2 instruction in this test since they are undefined
// at EL0. Therefore passing IS_EXEMPT = true here allows the default version to
// UPASS on a system which doesn't have FEAT_MTE2 but has FEAT_MTE.
CHECK(memtag, memtag, memtag, true, {
asm volatile (
"irg x0, sp"
: : : "x0"
);
})

static bool safe_try_feature(bool (*try_feature)(void), bool is_exempt) {
int child = fork();
Expand Down Expand Up @@ -428,6 +437,7 @@ int main(int, const char **) {
check_sme_f64f64();
check_sme_i16i64();
check_mops();
check_memtag();

return any_fails ? -1 : 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ sm4
sme-f64f64
sme-i16i64
mops
memtag
exit 0