Skip to content
Commit f43312c9 authored by Samuel Holland's avatar Samuel Holland Committed by Tom Rini
Browse files

ARM: Prevent the compiler from using NEON registers



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: default avatarSamuel Holland <samuel@sholland.org>
Acked-by: default avatarAndre Przywara <andre.przywara@arm.com>
parent e0bd6f31
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment