diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2017-04-26 17:11:32 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-05-18 13:19:52 +0800 |
commit | f4857f4c2ee9aa4e2aacac1a845352b00197fb57 (patch) | |
tree | ad60487f74b59fdda78a38fef7ad133c4bab2cb4 /arch/arm64/crypto/sha2-ce-core.S | |
parent | ac50b78b22cddb8a85b264b1f172c4239e826fd2 (diff) | |
download | op-kernel-dev-f4857f4c2ee9aa4e2aacac1a845352b00197fb57.zip op-kernel-dev-f4857f4c2ee9aa4e2aacac1a845352b00197fb57.tar.gz |
crypto: arm64/sha - avoid non-standard inline asm tricks
Replace the inline asm which exports struct offsets as ELF symbols
with proper const variables exposing the same values. This works
around an issue with Clang which does not interpret the "i" (or "I")
constraints in the same way as GCC.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/arm64/crypto/sha2-ce-core.S')
-rw-r--r-- | arch/arm64/crypto/sha2-ce-core.S | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm64/crypto/sha2-ce-core.S b/arch/arm64/crypto/sha2-ce-core.S index 01cfee0..679c6c0 100644 --- a/arch/arm64/crypto/sha2-ce-core.S +++ b/arch/arm64/crypto/sha2-ce-core.S @@ -88,7 +88,8 @@ ENTRY(sha2_ce_transform) ld1 {dgav.4s, dgbv.4s}, [x0] /* load sha256_ce_state::finalize */ - ldr w4, [x0, #:lo12:sha256_ce_offsetof_finalize] + ldr_l w4, sha256_ce_offsetof_finalize, x4 + ldr w4, [x0, x4] /* load input */ 0: ld1 {v16.4s-v19.4s}, [x1], #64 @@ -136,7 +137,8 @@ CPU_LE( rev32 v19.16b, v19.16b ) * the padding is handled by the C code in that case. */ cbz x4, 3f - ldr x4, [x0, #:lo12:sha256_ce_offsetof_count] + ldr_l w4, sha256_ce_offsetof_count, x4 + ldr x4, [x0, x4] movi v17.2d, #0 mov x8, #0x80000000 movi v18.2d, #0 |