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 <[email protected]> wrote: > On Wed, Dec 2, 2020 at 9:41 AM Maamoun TK <[email protected]> > wrote: > > > > On Tue, Dec 1, 2020 at 8:02 PM Niels Möller <[email protected]> > 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 [email protected] http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs
