]> gcc.gnu.org Git - gcc.git/commit
aarch64: Fix invalid subregs for BE svread/write_za
authorRichard Sandiford <richard.sandiford@arm.com>
Sun, 10 Dec 2023 19:46:07 +0000 (19:46 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Sun, 10 Dec 2023 19:46:06 +0000 (19:46 +0000)
commitb3aed459634654d295a1d00e6c149565ced7a9a2
treef0145da419e66fdd18d01560d6414a74c098fc98
parentf5c8d6bc050a8a6120aff2be25b6892d91baac99
aarch64: Fix invalid subregs for BE svread/write_za

Multi-register svread_za and svwrite_za are implemented using one
pattern per register count, with the register contents being bitcast
on entry (for writes) or return (for reads).  Previously we relied
on subregs for this, with the subreg for reads being handled by
target-independent code.  But using subregs isn't correct for many
big-endian cases, where following subreg rules often requires actual
instructions.  The semantics are instead supposed to be those of
svreinterpret.

gcc/
PR target/112931
PR target/112933
* config/aarch64/aarch64-protos.h (aarch64_sve_reinterpret): Declare.
* config/aarch64/aarch64.cc (aarch64_sve_reinterpret): New function.
* config/aarch64/aarch64-sve-builtins-sme.cc (svread_za_impl::expand)
(svwrite_za_impl::expand): Use it to cast the SVE register to the
right mode.
gcc/config/aarch64/aarch64-protos.h
gcc/config/aarch64/aarch64-sve-builtins-sme.cc
gcc/config/aarch64/aarch64.cc
This page took 0.058018 seconds and 6 git commands to generate.