Cc: Lucas Stach <l.stach@xxxxxxxxxxxxxx> Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> --- arch/arm/include/asm/common.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/include/asm/common.h b/arch/arm/include/asm/common.h index c32cdfe5ec2f..72ac988cc131 100644 --- a/arch/arm/include/asm/common.h +++ b/arch/arm/include/asm/common.h @@ -46,6 +46,12 @@ static inline unsigned long get_sp(void) return sp; } +/* + * At least with GCC 7.3.1, listing sp in the clobber register can generate + * erroneous accesses to the fp, even in __naked functions. Therefore _always_ + * branch to a noinline function as soon as possible (usually after relocation + * and c_setup). + */ static inline void arm_setup_stack(unsigned long top) { __asm__ __volatile__("mov sp, %0" -- 2.19.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox