[PATCH] score/aarch64: Size saved SP register for ABI
Kinsey Moore
kinsey.moore at oarcorp.com
Thu Oct 22 20:35:52 UTC 2020
From: Hesham Almatary <heshamelmatary at gmail.com>
Sent: Thursday, October 22, 2020 14:51
To: Kinsey Moore <kinsey.moore at oarcorp.com>
Cc: devel at rtems.org
Subject: Re: [PATCH] score/aarch64: Size saved SP register for ABI
On Thu, 22 Oct 2020 at 20:07, Kinsey Moore <kinsey.moore at oarcorp.com<mailto:kinsey.moore at oarcorp.com>> wrote:
This ensures that the saved SP register is sized appropriately depending
on the chosen ABI and prevents a warning in the libmisc stack checker.
---
cpukit/score/cpu/aarch64/include/rtems/score/cpu.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/cpukit/score/cpu/aarch64/include/rtems/score/cpu.h b/cpukit/score/cpu/aarch64/include/rtems/score/cpu.h
index da2140a2a8..b33f6a1c85 100644
--- a/cpukit/score/cpu/aarch64/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/aarch64/include/rtems/score/cpu.h
@@ -489,7 +489,10 @@ typedef struct {
#ifdef AARCH64_MULTILIB_ARCH_V8_ILP32
uint32_t _register_lr_top;
#endif
- uint64_t register_sp;
+ uintptr_t register_sp;
+#ifdef AARCH64_MULTILIB_ARCH_V8_ILP32
+ uint32_t _register_sp_top;
Won’t uintptr_t work here (and for all of the other integer registers) as well and consequently we get rid of all of such multiarch ifdefs?
It doesn’t get rid of the multiarch ifdefs, it would just move them to the offsets #define block above and into the assembly for generating the stack frame. I’d much rather have the exception frame be a static size and avoid adjusting the assembly and offsets based on ABI since from the machine’s perspective it’s still a 64bit pointer even if C and C++ view it as a 32bit pointer.
Kinsey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20201022/ae9ca5a0/attachment-0001.html>
More information about the devel
mailing list