diff options
-rw-r--r-- | tests/prctl-sve.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/tests/prctl-sve.c b/tests/prctl-sve.c index 4cef149cf..216ebfc3f 100644 --- a/tests/prctl-sve.c +++ b/tests/prctl-sve.c @@ -43,12 +43,28 @@ main(void) (unsigned long) 0xff, sprintrc(rc)); rc = syscall(__NR_prctl, PR_SVE_GET_VL); - printf("prctl(PR_SVE_GET_VL) = %s", sprintrc(rc)); + printf("prctl(PR_SVE_GET_VL) = "); if (rc >= 0) { - printf(" (PR_SVE_SET_VL_ONEXEC|PR_SVE_VL_INHERIT|%#lx)", - (unsigned long) 0xff); + printf("%#lx", rc); + if (rc > 0xffff) { + printf(" ("); + if (rc & PR_SVE_SET_VL_ONEXEC) + printf("PR_SVE_SET_VL_ONEXEC"); + if (rc & PR_SVE_VL_INHERIT) { + printf("%sPR_SVE_VL_INHERIT", + rc & PR_SVE_SET_VL_ONEXEC ? "|" : ""); + } + if (rc & ~0x6ffffU) { + printf("%s%#lx", + rc & 0x60000 ? "|" : "", rc & ~0x6ffffU); + } + printf("|%#lx)\n", rc & 0xffffU); + } else { + puts(""); + } + } else { + puts(sprintrc(rc)); } - puts(""); puts("+++ exited with 0 +++"); return 0; |