Commit 2b02ed55 authored by Josh Poimboeuf's avatar Josh Poimboeuf

x86/crypto/crc32c-pcl-intel: Standardize jump table

Simplify the jump table code so that it resembles a compiler-generated
table.

This enables ORC unwinding by allowing objtool to follow all the
potential code paths.
Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
Tested-by: default avatarArd Biesheuvel <ardb@kernel.org>
Acked-by: default avatarArd Biesheuvel <ardb@kernel.org>
Tested-by: default avatarSami Tolvanen <samitolvanen@google.com>
Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Link: https://lore.kernel.org/r/5357a039def90b8ef6b5874ef12cda008ecf18ba.1614182415.git.jpoimboe@redhat.com
parent dabe5167
......@@ -53,7 +53,7 @@
.endm
.macro JMPTBL_ENTRY i
.word crc_\i - crc_array
.quad crc_\i
.endm
.macro JNC_LESS_THAN j
......@@ -168,10 +168,7 @@ continue_block:
xor crc2, crc2
## branch into array
lea jump_table(%rip), %bufp
movzwq (%bufp, %rax, 2), len
lea crc_array(%rip), %bufp
lea (%bufp, len, 1), %bufp
mov jump_table(,%rax,8), %bufp
JMP_NOSPEC bufp
################################################################
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment