]> www.infradead.org Git - users/dwmw2/linux.git/commit
selftests/x86: build fsgsbase_restore.c with clang
authorJohn Hubbard <jhubbard@nvidia.com>
Thu, 4 Jul 2024 07:24:27 +0000 (00:24 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 11 Jul 2024 17:23:55 +0000 (11:23 -0600)
commit1158655317b6b6e71980533939dce9ab91d9716b
treee3cb84d5b5370eedbbdeacb3f8f390cbb02a528a
parentbf967fb39e020f4426d13e634d21283758aea3c8
selftests/x86: build fsgsbase_restore.c with clang

When building with clang, via:

    make LLVM=1 -C tools/testing/selftests

Fix this by moving the inline asm to "pure" assembly, in two new files:
clang_helpers_32.S, clang_helpers_64.S.

As a bonus, the pure asm avoids the need for ifdefs, and is now very
simple and easy on the eyes.

Acked-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/x86/Makefile
tools/testing/selftests/x86/clang_helpers_32.S [new file with mode: 0644]
tools/testing/selftests/x86/clang_helpers_64.S [new file with mode: 0644]
tools/testing/selftests/x86/fsgsbase_restore.c