Skip to content

Commit c41672b

Browse files
ardbiesheuvelherbertx
authored andcommitted
crypto: x86/ghash - 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>
1 parent 3695536 commit c41672b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/crypto/ghash-clmulni-intel_asm.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ SYM_FUNC_START(clmul_ghash_mul)
9393
FRAME_BEGIN
9494
movups (%rdi), DATA
9595
movups (%rsi), SHASH
96-
movaps .Lbswap_mask, BSWAP
96+
movaps .Lbswap_mask(%rip), BSWAP
9797
pshufb BSWAP, DATA
9898
call __clmul_gf128mul_ble
9999
pshufb BSWAP, DATA
@@ -110,7 +110,7 @@ SYM_FUNC_START(clmul_ghash_update)
110110
FRAME_BEGIN
111111
cmp $16, %rdx
112112
jb .Lupdate_just_ret # check length
113-
movaps .Lbswap_mask, BSWAP
113+
movaps .Lbswap_mask(%rip), BSWAP
114114
movups (%rdi), DATA
115115
movups (%rcx), SHASH
116116
pshufb BSWAP, DATA

0 commit comments

Comments
 (0)