From: Hesham Almatary <heshamelmat...@gmail.com> Sent: Thursday, October 22, 2020 14:51 To: Kinsey Moore <kinsey.mo...@oarcorp.com> Cc: devel@rtems.org Subject: Re: [PATCH] score/aarch64: Size saved SP register for ABI
On Thu, 22 Oct 2020 at 20:07, Kinsey Moore <kinsey.mo...@oarcorp.com<mailto:kinsey.mo...@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
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel