Hi, Maamoun I thought that you were asking in general. All PowerPC ABI, except the original 32 bit ELF ABI, allow a red zone below the stack pointer. For other architectures, one needs to check each ABI.
Thanks, David On Wed, Dec 2, 2020 at 12:57 PM Maamoun TK <maamoun...@googlemail.com> wrote: > > I can't find a document other than 64-bit elf v2 abi specification > https://openpowerfoundation.org/?resource_lib=64-bit-elf-v2-abi-specification-power-architecture > which say it's safe to use the 288-byte volatile storage below the stack > pointer to hold saved registers and local variables. > However, I wrote a C file for the test and disassembled the compiled binary > on ELFv1, ELFv2, and AIX. All of them hold the saved registers right below > the stack pointer. Furthermore same as we did, the compiler try to avoid > modifying the stack pointer register when possible, the prologue of tested > binary looks like this: > std r30,-16(r1) > std r31,-8(r1) > li r0,-80 > stvx v28,r1,r0 > li r0,-64 > stvx v29,r1,r0 > li r0,-48 > stvx v30,r1,r0 > li r0,-32 > stvx v31,r1,r0 > > regards, > Mamone > > On Wed, Dec 2, 2020 at 7:31 PM David Edelsohn <dje....@gmail.com> wrote: >> >> On Wed, Dec 2, 2020 at 9:41 AM Maamoun TK <maamoun...@googlemail.com> wrote: >> > >> > On Tue, Dec 1, 2020 at 8:02 PM Niels Möller <ni...@lysator.liu.se> wrote: >> > >> > > How portable is this, do all relevant operating systems support storing >> > > data below the stack pointer? >> > > >> > >> > I need to investigate this. >> >> It's dependent upon the ABI. >> >> Thanks, David _______________________________________________ nettle-bugs mailing list nettle-bugs@lists.lysator.liu.se http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs