[all-commits] [llvm/llvm-project] c226f8: [SystemZ][z/OS] Allocate a stack frame when callee...
MMS IT GmbH via All-commits
all-commits at lists.llvm.org
Mon Sep 28 07:09:42 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c226f8dec63924b6fef645f5818eb42f52ffd1fe
https://github.com/llvm/llvm-project/commit/c226f8dec63924b6fef645f5818eb42f52ffd1fe
Author: MMS IT GmbH <info at mms-it.ch>
Date: 2026-09-28 (Mon, 28 Sep 2026)
Changed paths:
M llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp
A llvm/test/CodeGen/SystemZ/zos-frame-callee-saved.ll
M llvm/test/CodeGen/SystemZ/zos-frameaddr.ll
M llvm/test/CodeGen/SystemZ/zos-ret-addr.ll
Log Message:
-----------
[SystemZ][z/OS] Allocate a stack frame when callee-saved registers are saved (#226681)
On z/OS (XPLINK64), a function without calls and without stack objects
that uses callee-saved registers got a stack size of 0. No stack frame
was allocated, so `STMG` stored the registers relative to the unchanged
stack pointer, i.e. into the register save area of the caller's DSA,
overwriting the caller's saved return address. Only skip the frame when
there is nothing to save.
Two existing tests (`zos-ret-addr.ll`, `zos-frameaddr.ll`) encoded this
store into the caller's frame and are updated; the values returned by
`llvm.returnaddress`/`llvm.frameaddress` are unchanged (the old stack
pointer is still read from offset 2048 of the current frame). New test
`zos-frame-callee-saved.ll`.
Found with GMP 6.3.0 on z/OS 3.1 (`mpn_mul_1`): code after the call ran
twice, then S0C4/S0C6. With this change GMP works.
Tests: `llvm-lit test/CodeGen/SystemZ test/MC/SystemZ test/MC/GOFF`
passes (1304 passed, 19 unsupported).
Fixes #226657.
Assisted-by: Claude Code (Anthropic)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list