[clang] [llvm] [SystemZ] Do not extend integer arguments in z/OS XPLINK64 ABI (PR #206833)

Ulrich Weigand via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 29 05:47:51 PDT 2026


================

----------------
uweigand wrote:

OK, I just saw this commit message:
>The rule CCAssignToRegAndStack<[R1L, R2L, R3L], 8, 8> writes only the
32-bit sub-register of each GPR for i32 arguments.  Callees compiled by
other compilers (e.g. xlc / @https://github.com/classB) read the full 64-bit register,
so the upper 32 bits being undefined produces wrong results — concretely,
calling @https://github.com/classB via isinf() returns 1 instead of 0 for a finite float
because the upper 32 bits of R3 are garbage when only R3L was written.

But that is confusing me even more.  This says that the de-facto ABI *does* require sign-/zero-extension, which directly contradicts the initial statement of this whole PR.   What is it?

Note that if the de-facto ABI does require extensions, then the "any-ext" extension does not solve the problem, except possibly by accident, and any-ext does not guarantee any particular extension.

https://github.com/llvm/llvm-project/pull/206833


More information about the cfe-commits mailing list