Home GnuPG

aarch64-asm: use ADR for getting pointers for local labels

Description

aarch64-asm: use ADR for getting pointers for local labels

* cipher/asm-common-aarch64.h (GET_DATA_POINTER): Remove.
(GET_LOCAL_POINTER): New.
* cipher/camellia-aarch64.S: Use GET_LOCAL_POINTER instead of ADR
instruction directly.
* cipher/chacha20-aarch64.S: Use GET_LOCAL_POINTER instead of
GET_DATA_POINTER.
* cipher/cipher-gcm-armv8-aarch64-ce.S: Likewise.
* cipher/crc-armv8-aarch64-ce.S: Likewise.
* cipher/sha1-armv8-aarch64-ce.S: Likewise.
* cipher/sha256-armv8-aarch64-ce.S: Likewise.
* cipher/sm3-aarch64.S: Likewise.
* cipher/sm3-armv8-aarch64-ce.S: Likewise.
* cipher/sm4-aarch64.S: Likewise.
---

Switch to use ADR instead of ADRP/LDR or ADRP/ADD for getting
data pointers within assembly files. ADR is more portable across
targets and does not require labels to be declared in GOT tables.

Reviewed-and-tested-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>

  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on May 12 2022, 8:06 AM
Parents
rCa9700956361d: cipher: move CBC/CFB/CTR self-tests to tests/basic
Branches
Unknown
Tags
Unknown