start: Align the stack on s390x just in case.

The kernel does this as required, but we cannot trust dynamic linkers to do it.
This commit is contained in:
Alex Rønne Petersen 2024-07-24 17:36:34 +02:00
parent 52653ec82b
commit ce81525f3f
No known key found for this signature in database

View File

@ -373,8 +373,9 @@ fn _start() callconv(.Naked) noreturn {
,
.s390x =>
// Set up the stack frame (register save area and cleared back-chain slot).
// Note: Stack pointer is guaranteed by ABI to be 8-byte aligned as required.
\\ lgr %r2, %r15
\\ lghi %r0, -16
\\ ngr %r15, %r0
\\ aghi %r15, -160
\\ lghi %r0, 0
\\ stg %r0, 0(%r15)