When compiling with android toolchain, there is an instruction
"str q0, [x8],#16", but x8 is not 16bytes aligned,
this instruction will trigger sync abort.
So, following Linux kernel, only use general regs for arm64.
If not, compiler may use simd registers Q[x]. We need to avoid
using simd registers in U-Boot, because load/store Q[x] has
restriction that 128bits aligned when str/ldr.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
186ccd8de53f986c5913432638dfaca9bdc97e89)
(cherry picked from commit
8f3f0d339783e066f7815408949677b62e465b62)
$(call cc-option, -march=armv7))
arch-$(CONFIG_CPU_V7M) =-march=armv7-m
arch-$(CONFIG_CPU_V7R) =-march=armv7-r
-arch-$(CONFIG_ARM64) =-march=armv8-a
+arch-$(CONFIG_ARM64) =-march=armv8-a -mgeneral-regs-only
# On Tegra systems we must build SPL for the armv4 core on the device
# but otherwise we can use the value in CONFIG_SYS_ARM_ARCH