[llvm] [SystemZ][z/OS] Add AMODE to PR symbols (PR #223541)
Ulrich Weigand via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 2 02:04:22 PDT 2026
uweigand wrote:
I found the following text in z/OS documentation (ieab200_v3r2.pdf):
>Exporting data
>Exported data is represented as a PR or LD type ESD record with the binding scope set to Import-Export. IBM recommends using a PR type ESD item for compatibility with Language Environment. If using a PR ESD record, ensure the record length is greater than zero and set the name space ID to 3. If using an LD ESD record, you must set the 'executable' bit to 'not executable'. **If you intend to reference the data in 64 bit addressing mode, set the addressing mode to AMODE(64).** The 'linkage type' field must also match that of the referencing program.
>
>Importing data
>Reentrant data items are represented by a zero-length PR ESD record with the binding scope set to Import-Export. Non-reentrant data items (supported for XPLINK only) are represented by an ER ESD record with the binding scope set to Import-Export and the 'executable' bit set to 'non-executable'. **The addressing mode and linkage type fields should match those of the exported data you wish to use.**
So it does appear setting AMODE(64) here is the right thing to do.
However, I'm now wondering: shouldn't this also be reflected in HLASM output? This PR only changes encoding in the GOFF binary. If generating assembler output and then building it using HLASM, would this also set AMODE(64)? Or do we need to issue an HLASM statement as well?
https://github.com/llvm/llvm-project/pull/223541
More information about the llvm-commits
mailing list