When they detect corruption the fp-stress test loads print load specific diagnostics and exits with a failure status. In preparation for building versions intended to run as KVM guests factor the exits into asm-utils-linux.S.
No functional change. Signed-off-by: Mark Brown <[email protected]> --- tools/testing/selftests/arm64/fp/asm-utils-linux.S | 8 ++++++++ tools/testing/selftests/arm64/fp/fpsimd-test.S | 4 +--- tools/testing/selftests/arm64/fp/sve-test.S | 8 ++------ tools/testing/selftests/arm64/fp/za-test.S | 8 ++------ tools/testing/selftests/arm64/fp/zt-test.S | 4 +--- 5 files changed, 14 insertions(+), 18 deletions(-) diff --git a/tools/testing/selftests/arm64/fp/asm-utils-linux.S b/tools/testing/selftests/arm64/fp/asm-utils-linux.S index 3effeb1fbf50..9cd31dc47709 100644 --- a/tools/testing/selftests/arm64/fp/asm-utils-linux.S +++ b/tools/testing/selftests/arm64/fp/asm-utils-linux.S @@ -84,3 +84,11 @@ function tickle_handler ret endfunction .globl tickle_handler + +// Terminate the program, reporting failure. Does not return. +function exit_error + mov x0, #1 + mov x8, #__NR_exit + svc #0 +endfunction +.globl exit_error diff --git a/tools/testing/selftests/arm64/fp/fpsimd-test.S b/tools/testing/selftests/arm64/fp/fpsimd-test.S index 9db7b5419397..5ee8ef51ea4e 100644 --- a/tools/testing/selftests/arm64/fp/fpsimd-test.S +++ b/tools/testing/selftests/arm64/fp/fpsimd-test.S @@ -298,7 +298,5 @@ function barf bl dumphex puts "]\n" - mov x8, #__NR_exit - mov x1, #1 - svc #0 + b exit_error endfunction diff --git a/tools/testing/selftests/arm64/fp/sve-test.S b/tools/testing/selftests/arm64/fp/sve-test.S index 2aadb5c3c0f3..3447fe0e5554 100644 --- a/tools/testing/selftests/arm64/fp/sve-test.S +++ b/tools/testing/selftests/arm64/fp/sve-test.S @@ -543,9 +543,7 @@ function vl_barf mov x0, x10 bl putdecn - mov x8, #__NR_exit - mov x1, #1 - svc #0 + b exit_error endfunction function svcr_barf @@ -555,7 +553,5 @@ function svcr_barf mov x0, x10 bl putdecn - mov x8, #__NR_exit - mov x1, #1 - svc #0 + b exit_error endfunction diff --git a/tools/testing/selftests/arm64/fp/za-test.S b/tools/testing/selftests/arm64/fp/za-test.S index 84e63e510f23..33dc4ce8bfa1 100644 --- a/tools/testing/selftests/arm64/fp/za-test.S +++ b/tools/testing/selftests/arm64/fp/za-test.S @@ -354,9 +354,7 @@ function vl_barf mov x0, x10 bl putdecn - mov x8, #__NR_exit - mov x1, #1 - svc #0 + b exit_error endfunction function svcr_barf @@ -366,7 +364,5 @@ function svcr_barf mov x0, x10 bl putdecn - mov x8, #__NR_exit - mov x1, #1 - svc #0 + b exit_error endfunction diff --git a/tools/testing/selftests/arm64/fp/zt-test.S b/tools/testing/selftests/arm64/fp/zt-test.S index afcadb5aff23..c67242c2d5ab 100644 --- a/tools/testing/selftests/arm64/fp/zt-test.S +++ b/tools/testing/selftests/arm64/fp/zt-test.S @@ -284,7 +284,5 @@ function svcr_barf mov x0, x10 bl putdecn - mov x8, #__NR_exit - mov x1, #1 - svc #0 + b exit_error endfunction -- 2.47.3

