summaryrefslogtreecommitdiff
path: root/arch/x86/crypto/crc32c-pcl-intel-asm_64.S
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2023-04-12 14:00:29 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2023-04-20 13:20:04 +0300
commit3b519dc878a5d19593bbb1773abedbf39a619f66 (patch)
tree993c26acc37676c13652cfd1614403339ae8cf35 /arch/x86/crypto/crc32c-pcl-intel-asm_64.S
parent7f8ec316480bf68d88c4ecc6a948ad1e00fafc71 (diff)
downloadlinux-3b519dc878a5d19593bbb1773abedbf39a619f66.tar.xz
crypto: x86/crc32c - Use RIP-relative addressing
Prefer RIP-relative addressing where possible, which removes the need for boot time relocation fixups. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/x86/crypto/crc32c-pcl-intel-asm_64.S')
-rw-r--r--arch/x86/crypto/crc32c-pcl-intel-asm_64.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/crypto/crc32c-pcl-intel-asm_64.S b/arch/x86/crypto/crc32c-pcl-intel-asm_64.S
index ec35915f0901..5f843dce77f1 100644
--- a/arch/x86/crypto/crc32c-pcl-intel-asm_64.S
+++ b/arch/x86/crypto/crc32c-pcl-intel-asm_64.S
@@ -168,7 +168,8 @@ continue_block:
xor crc2, crc2
## branch into array
- mov jump_table(,%rax,8), %bufp
+ leaq jump_table(%rip), %bufp
+ mov (%bufp,%rax,8), %bufp
JMP_NOSPEC bufp
################################################################