[PATCH v2] ARM: Prevent the compiler from using NEON registers

Tom Rini trini at konsulko.com
Fri Sep 3 00:42:18 CEST 2021


On Sat, Aug 21, 2021 at 07:54:02PM -0500, Samuel Holland wrote:

> For ARMv8-A, NEON is standard, so the compiler can use it even when no
> special target flags are provided. For example, it can use stores from
> NEON registers to zero-initialize large structures. GCC 11 decides to
> do this inside the DRAM init code for the Allwinner H6.
> 
> However, GCC 11 has a bug where it generates misaligned NEON register
> stores even with -mstrict-align. Since the MMU is not enabled this early
> in SPL, the misaligned store causes an exception and breaks booting.
> 
> Work around this issue by restricting the compiler to using GPRs only,
> not vector registers. This prevents any future surprises relating to
> NEON use as well.
> 
> Signed-off-by: Samuel Holland <samuel at sholland.org>
> Acked-by: Andre Przywara <andre.przywara at arm.com>

Applied to u-boot/next, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210902/462f99ea/attachment.sig>


More information about the U-Boot mailing list