summaryrefslogtreecommitdiffstats
path: root/arch/arm/include
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-09-13 23:11:23 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2019-10-01 22:34:08 +0200
commit1d9cc19aa742bff1aa848c48aad58e8d1166037d (patch)
tree796942ab0be0106bf793518f59d8f3fb5068bbb8 /arch/arm/include
parentf56b18cdc7595f981878e6aed21d128b59798e24 (diff)
downloadbarebox-1d9cc19aa742bff1aa848c48aad58e8d1166037d.tar.gz
barebox-1d9cc19aa742bff1aa848c48aad58e8d1166037d.tar.xz
ARM: aarch64: Re-implement most of barebox_arm_entry() in assembly
GCC9 now produces the following warning: common.h:51:2: warning: listing the stack pointer register ‘sp’ in a clobber list is deprecated [-Wdeprecated] 51 | __asm__ __volatile__("mov sp, %0" | ^~~~~~~ common.h:51:2: note: the value of the stack pointer after an ‘asm’ statement must be the same as it was before the statement Stack pointer was added to clobber list in commit f9fc8254b2 ("ARM: Mark SP as being clobbered in arm_setup_stack()") to prevent GCC from generating code that would corrupt 'boarddata' pointer by trying to restore it from invalid stack frame. Interestingly enough, seemingly unrelated change in commit 64d95896cf ("ARM: aarch64: compile with general-regs-only") changed generated code such that adding SP to clobber list became no longer necessary. While the above can probably be a fix by itself, it seems a better and more future proof approach would be to address the problem at its root and re-implement offending startup sequence in assembly. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/common.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/arm/include/asm/common.h b/arch/arm/include/asm/common.h
index c32cdfe5ec..d03ee6273f 100644
--- a/arch/arm/include/asm/common.h
+++ b/arch/arm/include/asm/common.h
@@ -50,8 +50,7 @@ static inline void arm_setup_stack(unsigned long top)
{
__asm__ __volatile__("mov sp, %0"
:
- : "r"(top)
- : "sp");
+ : "r"(top));
}
#endif /* __ASM_ARM_COMMON_H */