diff options
author | Philipp Tomsich <philipp.tomsich@theobroma-systems.com> | 2017-10-10 16:21:13 +0200 |
---|---|---|
committer | Philipp Tomsich <philipp.tomsich@theobroma-systems.com> | 2017-11-21 23:57:22 +0100 |
commit | b4806d6f1f82f0a2d76b7206bdc5e4ba7d567b6f (patch) | |
tree | 603302f37d76a3e3a20ebfa01bfba45e6273caaf /arch/arm/lib/Makefile | |
parent | ff143d55564373c2a5e8a128a71223f26ee2420f (diff) | |
download | u-boot-b4806d6f1f82f0a2d76b7206bdc5e4ba7d567b6f.tar.gz u-boot-b4806d6f1f82f0a2d76b7206bdc5e4ba7d567b6f.tar.bz2 u-boot-b4806d6f1f82f0a2d76b7206bdc5e4ba7d567b6f.zip |
arm: provide a PCS-compliant setjmp implementation
The previous setjmp-implementation (as a static inline function that
contained an 'asm volatile' sequence) was extremely fragile: (some
versions of) GCC optimised the set of registers. One critical example
was the removal of 'r9' from the clobber list, if -ffixed-reg9 was
supplied.
To increase robustness and ensure PCS-compliant behaviour, the setjmp
and longjmp implementation are now in assembly and closely match what
one would expect to find in a libc implementation.
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Andy Yan <andy.yan@rock-chips.com>
Diffstat (limited to 'arch/arm/lib/Makefile')
-rw-r--r-- | arch/arm/lib/Makefile | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 6e1c436933..abffa10c85 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -17,6 +17,12 @@ else obj-y += vectors.o crt0.o endif +ifdef CONFIG_ARM64 +obj-y += setjmp_aarch64.o +else +obj-y += setjmp.o +endif + ifndef CONFIG_SPL_BUILD ifdef CONFIG_ARM64 obj-y += relocate_64.o |