]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: crc32-pclmul - remove useless relative addressing
authorMikulas Patocka <mpatocka@redhat.com>
Thu, 7 Sep 2017 02:41:21 +0000 (22:41 -0400)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 7 Oct 2017 04:10:30 +0000 (12:10 +0800)
commit0bf0bc243d4abcc54f730d0723e0797b119b8990
treef9a8400f86d11aca28a00e501da6e4cab4b26d2b
parent87edc77dc1ce48ba30fbcb7a0f7598c400f48be3
crypto: crc32-pclmul - remove useless relative addressing

In 32-bit mode, the x86 architecture can hold full 32-bit pointers.
Therefore, the code that copies the current address to the %ecx register
and uses %ecx-relative addressing is useless, we could just use absolute
addressing.

The processors have a stack of return addresses for branch prediction. If
we use a call instruction and pop the return address, it desynchronizes
the return stack and causes branch prediction misses.

This patch also moves the data to the .rodata section.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/crc32-pclmul_asm.S