[all-commits] [llvm/llvm-project] 2c9a8d: [SystemZ][z/OS] Use a function descriptor for exte...
MMS IT GmbH via All-commits
all-commits at lists.llvm.org
Tue Sep 29 08:26:46 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2c9a8d473b7b9bfe1e070e2456a7d57a55790201
https://github.com/llvm/llvm-project/commit/2c9a8d473b7b9bfe1e070e2456a7d57a55790201
Author: MMS IT GmbH <info at mms-it.ch>
Date: 2026-09-29 (Tue, 29 Sep 2026)
Changed paths:
M llvm/lib/Target/SystemZ/SystemZXPLINKAsmPrinter.cpp
M llvm/test/CodeGen/SystemZ/zos-lower-constant.ll
Log Message:
-----------
[SystemZ][z/OS] Use a function descriptor for external functions in initializers (#226682)
The address of an external function in a static initializer was emitted
as a V-con, i.e. the entry point, while an XPLINK function pointer must
point to a function descriptor. A call through such a pointer loads the
environment and entry point from the machine code of the function.
Create a descriptor in the ADA for external functions as well, as is
already done for internal functions and for constructor/destructor lists
(`emitXXStructorList`).
`zos-lower-constant.ll` is updated: the pointer to the external function
`bar` now points to its descriptor in the ADA.
A minimal program (`int (*p)(void) = ext;` called from `main`) ended
with S0C6 at address `0707070707070707` on z/OS 3.1; with this change it
returns the expected value.
Tests: `llvm-lit test/CodeGen/SystemZ test/MC/SystemZ test/MC/GOFF`
passes (1303 passed, 19 unsupported).
Fixes #226658.
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