On Jun 23 06:29, Radek Barton via Cygwin-patches wrote: > Hello. > > Thank you for pointing this out. I didn't know this was related to ABI > calling conventions in this particular case. Simple removal of the > `sub` instruction is causing tests regressions in our development > branch [...]
Just removing the sub expression seems wrong anyway because the code would neglect to set the sp register, isn't it? Thanks, Corinna > current upstream master branch (induced by recent changes to pthread). > It will take some time to investigate and validate this change. > > Thank you for your patience, > > Radek > > ________________________________________ > From: Jeremy Drake <[email protected]> > Sent: Saturday, June 21, 2025 8:47 PM > To: Radek Barton <[email protected]> > Cc: [email protected] <[email protected]> > Subject: [EXTERNAL] Re: [PATCH] Cygwin: stack base initialization for AArch64 > > On Wed, 18 Jun 2025, Jeremy Drake via Cygwin-patches wrote: > > > On Wed, 18 Jun 2025, Radek Barton via Cygwin-patches wrote: > > > > > -#ifdef __x86_64__ > > > /* Set stack pointer to new address. Set frame pointer to > > > stack pointer and subtract 32 bytes for shadow space. */ > > > +#if defined(__x86_64__) > > > __asm__ ("\n\ > > > movq %[ADDR], %%rsp \n\ > > > movq %%rsp, %%rbp \n\ > > > subq $32,%%rsp \n" > > > : : [ADDR] "r" (stackaddr)); > > > +#elif defined(__aarch64__) > > > + __asm__ ("\n\ > > > + mov fp, %[ADDR] \n\ > > > + sub sp, fp, #32 \n" > > > > Is the 32-byte shadow space part of the aarch64 calling convention spec, > > or is this just copying what x86_64 was doing? My impression is that this > > space was part of the x86_64 calling convention. > > The patch for pthread stack initialization dropped the 32-byte shadow > space, and I believe this patch should as well.
