[openssl/openssl] a97ca3: Restrict the Arm 'LDR REG, =VALUE' pseudo instruct...

Tom Cosgrove noreply at github.com
Wed Feb 8 14:35:33 UTC 2023


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: a97ca33f83cc6201fe11d6c76a035c05dbaaf5bc
      https://github.com/openssl/openssl/commit/a97ca33f83cc6201fe11d6c76a035c05dbaaf5bc
  Author: Tom Cosgrove <tom.cosgrove at arm.com>
  Date:   2023-02-08 (Wed, 08 Feb 2023)

  Changed paths:
    M crypto/perlasm/arm-xlate.pl

  Log Message:
  -----------
  Restrict the Arm 'LDR REG, =VALUE' pseudo instruction on Neon, to appease clang

Unlike gcc, the clang assembler has issues with the maximum value of the literal
in the `ldr REG, #VALUE` pseudo-instruction (where the assembler places the
value into a literal pool and generates a PC-relative load from that pool) when
used with Neon registers.

Specifically, while dN refers to 64-bit Neon registers, and qN refers to 128-bit
Neon registers, clang assembly only supports a maximum of 32-bit loads to
either with this instruction.

Therefore restrict accordingly to avoid breakage when building with clang.

clang appears to support the correct maximums with the scalar registers xN etc.

This will prevent the kind of breakage we saw when #19914 was merged (which has
since been fixed by #20202) - assembly authors will need to manually apply the
literal load, as is done in #20202.

None of the Arm assembler code uses this pseudo-instruction anyway, as it
doesn't seem to avoid duplication of constants.

Change-Id: If52f6ce22c10feb1cc334d996ff71b1efed3218e

Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
Reviewed-by: Todd Short <todd.short at me.com>
(Merged from https://github.com/openssl/openssl/pull/20222)




More information about the openssl-commits mailing list