diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2023-04-12 14:00:26 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2023-04-20 13:20:04 +0300 |
commit | 24ff1e9d726001767c544bdee3aab8abc0a30199 (patch) | |
tree | 45d07f6b57af42f433a400dfd9df2f6debbbf531 /arch/x86/crypto/camellia-x86_64-asm_64.S | |
parent | 52fc482a12af96a28a1200c9587d599055bff8b6 (diff) | |
download | linux-24ff1e9d726001767c544bdee3aab8abc0a30199.tar.xz |
crypto: x86/camellia - Use RIP-relative addressing
Prefer RIP-relative addressing where possible, which removes the need
for boot time relocation fixups.
Co-developed-by: Thomas Garnier <thgarnie@chromium.org>
Signed-off-by: Thomas Garnier <thgarnie@chromium.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/x86/crypto/camellia-x86_64-asm_64.S')
-rw-r--r-- | arch/x86/crypto/camellia-x86_64-asm_64.S | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/crypto/camellia-x86_64-asm_64.S b/arch/x86/crypto/camellia-x86_64-asm_64.S index 347c059f5940..816b6bb8bded 100644 --- a/arch/x86/crypto/camellia-x86_64-asm_64.S +++ b/arch/x86/crypto/camellia-x86_64-asm_64.S @@ -77,11 +77,13 @@ #define RXORbl %r9b #define xor2ror16(T0, T1, tmp1, tmp2, ab, dst) \ + leaq T0(%rip), tmp1; \ movzbl ab ## bl, tmp2 ## d; \ + xorq (tmp1, tmp2, 8), dst; \ + leaq T1(%rip), tmp2; \ movzbl ab ## bh, tmp1 ## d; \ rorq $16, ab; \ - xorq T0(, tmp2, 8), dst; \ - xorq T1(, tmp1, 8), dst; + xorq (tmp2, tmp1, 8), dst; /********************************************************************** 1-way camellia |