[U-Boot] arm: arm64: only use general regs
Peng Fan
peng.fan at nxp.com
Sun Dec 3 10:37:39 UTC 2017
> -----Original Message-----
> From: Tom Rini [mailto:trini at konsulko.com]
> Sent: Sunday, December 03, 2017 12:02 PM
> To: Peng Fan <peng.fan at nxp.com>
> Cc: albert.u.boot at aribaud.net; sjg at chromium.org; York Sun
> <york.sun at nxp.com>; u-boot at lists.denx.de
> Subject: Re: [U-Boot] arm: arm64: only use general regs
>
> On Tue, Nov 28, 2017 at 10:09:37AM +0800, Peng Fan wrote:
>
> > 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 at nxp.com>
> > Reviewed-by: Simon Glass <sjg at chromium.org>
>
> This breaks s32v234evb building, please look into that, thanks!
I have no idea why use float here.
board/freescale/s32v234evb/clock.c: In function 'program_pll.constprop':
board/freescale/s32v234evb/clock.c:91:7: error: '-mgeneral-regs-only' is incompatible with floating-point code
fvco =
~~~~~^
(refclk_freq / plldv_prediv) * (plldv_mfd +
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pllfd_mfn / (float)20480);
~~~~~~~~~~~~~~~~~~~~~~~~~
Eddy,
Could you help explain why use float to cast 20480? Could this cast be removed?
Thanks,
Peng.
>
> --
> Tom
More information about the U-Boot
mailing list