[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200324084821.29944-9-masahiroy@kernel.org>
Date: Tue, 24 Mar 2020 17:48:13 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: linux-kernel@...r.kernel.org
Cc: "David S . Miller" <davem@...emloft.net>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Kees Cook <keescook@...omium.org>,
clang-built-linux@...glegroups.com,
Herbert Xu <herbert@...dor.apana.org.au>,
linux-crypto@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Borislav Petkov <bp@...en8.de>,
Peter Zijlstra <peterz@...radead.org>,
"H . Peter Anvin" <hpa@...or.com>, x86@...nel.org,
linux-kbuild@...r.kernel.org,
Masahiro Yamada <masahiroy@...nel.org>
Subject: [PATCH 08/16] x86: add comments about the binutils version to support code in as-instr
We raise the minimal supported binutils version from time to time.
The last bump was commit 1fb12b35e5ff ("kbuild: Raise the minimum
required binutils version to 2.21").
We need to keep these as-instr checks because binutils 2.21 does not
support them.
I hope this will be a good hint which one can be dropped when we
bump the minimal binutils version next time.
As for the Clang/LLVM builds, we require very new LLVM version,
so the LLVM integrated assembler supports all of them.
Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
Acked-by: Jason A. Donenfeld <Jason@...c4.com>
---
arch/x86/Makefile | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index f32ef7b8d5ca..4c57cb3018fb 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -178,10 +178,15 @@ ifeq ($(ACCUMULATE_OUTGOING_ARGS), 1)
endif
# does binutils support specific instructions?
+# binutils >= 2.22
avx2_instr :=$(call as-instr,vpbroadcastb %xmm0$(comma)%ymm1,-DCONFIG_AS_AVX2=1)
+# binutils >= 2.25
avx512_instr :=$(call as-instr,vpmovm2b %k1$(comma)%zmm5,-DCONFIG_AS_AVX512=1)
+# binutils >= 2.24
sha1_ni_instr :=$(call as-instr,sha1msg1 %xmm0$(comma)%xmm1,-DCONFIG_AS_SHA1_NI=1)
+# binutils >= 2.24
sha256_ni_instr :=$(call as-instr,sha256msg1 %xmm0$(comma)%xmm1,-DCONFIG_AS_SHA256_NI=1)
+# binutils >= 2.23
adx_instr := $(call as-instr,adox %r10$(comma)%r10,-DCONFIG_AS_ADX=1)
KBUILD_AFLAGS += $(avx2_instr) $(avx512_instr) $(sha1_ni_instr) $(sha256_ni_instr) $(adx_instr)
--
2.17.1
Powered by blists - more mailing lists