Skip to content

Commit 3b519dc

Browse files
ardbiesheuvelherbertx
authored andcommitted
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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 7f8ec31 commit 3b519dc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/x86/crypto/crc32c-pcl-intel-asm_64.S

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ continue_block:
168168
xor crc2, crc2
169169

170170
## branch into array
171-
mov jump_table(,%rax,8), %bufp
171+
leaq jump_table(%rip), %bufp
172+
mov (%bufp,%rax,8), %bufp
172173
JMP_NOSPEC bufp
173174

174175
################################################################

0 commit comments

Comments
 (0)