Re: alpha stack alignment: 8- or 16-byte

Jason Thorpe <[email protected]>
Newsgroups gmane.os.netbsd.devel.toolchain,gmane.os.netbsd.ports.alpha
Message-ID <[email protected]>
> On Jul 5, 2021, at 8:53 AM, Jason Thorpe <[email protected]> wrote:
> 
> 
> 
>> On Jul 5, 2021, at 7:09 AM, Rin Okuyama <[email protected]> wrote:
>> 
>> (1) Align sp to 8-byte boundary: keep our kernel and libraries as well,
>>   and fix GCC, or
>> 
>> (2) Align sp to 16-byte boundary: fix our kernel and libraries.
> 
> My preference is (2).  The kernel already does this for its own functions in locore.s (look for the functions declared NESTED).
> 
> This should take care of the kernel portion of the change:
> 
> 	https://www.netbsd.org/~thorpej/alpha-stack-patch.txt
> 
> The only libc routine that looks broken to me is swapcontext() (it pushes a 24-byte stack frame).  Do you see any other broken ones?

FYI -- I built an alpha release with the above patch, plus a fix to swapcontext(), with the HACKS removed, and I'm doing an ATF run in Qemu now.

(I finally, at long last, have some real Alpha hardware nearly in my possession after many years of lacking it... and an early-ish model, at that, so I should be able to verify on real hardware again very soon...)

-- thorpej
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.