]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: x86/sha256 - Add parentheses around macros' single arguments
authorFangrui Song <maskray@google.com>
Wed, 14 Aug 2024 04:48:02 +0000 (21:48 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 24 Aug 2024 13:36:07 +0000 (21:36 +0800)
commit3363c460ef726ba693704dbcd73b7e7214ccc788
treec7e543a85a76b1980f57c77736cdf370fa6d21da
parent86c85d6657e478c516c825d3d4a2a61aef627934
crypto: x86/sha256 - Add parentheses around macros' single arguments

The macros FOUR_ROUNDS_AND_SCHED and DO_4ROUNDS rely on an
unexpected/undocumented behavior of the GNU assembler, which might
change in the future
(https://sourceware.org/bugzilla/show_bug.cgi?id=32073).

    M (1) (2) // 1 arg !? Future: 2 args
    M 1 + 2   // 1 arg !? Future: 3 args

    M 1 2     // 2 args

Add parentheses around the single arguments to support future GNU
assembler and LLVM integrated assembler (when the IsOperator hack from
the following link is dropped).

Link: https://github.com/llvm/llvm-project/commit/055006475e22014b28a070db1bff41ca15f322f0
Signed-off-by: Fangrui Song <maskray@google.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/sha256-avx2-asm.S