Kai Nacke 611a271e8d
[GOFF] Write out relocations in the GOFF writer (#167054)
Add support for writing relocations. Since the symbol numbering is only
available after the symbols are written, the relocations are collected
in a vector. At write time, the relocations are converted using the
symbols ids, compressed and written out. A relocation data record is
limited to 32K-1 bytes, which requires making sure that larger
relocation data is written into multiple records.
2025-12-20 15:51:46 -05:00

18 lines
475 B
LLVM

; RUN: llc --mtriple=s390x-ibm-zos --show-mc-encoding < %s | FileCheck %s
define internal signext i32 @caller() {
entry:
ret i32 0
}
define hidden signext i32 @caller2() {
entry:
; CHECK-LABEL: caller2:
; CHECK: brasl 7,caller * encoding: [0xc0,0x75,A,A,A,A]
; CHECK-NEXT: * fixup A - offset: 2, value: caller+2, kind: FK_390_PC32DBL
; CHECK-NEXT: bcr 0,3 * encoding: [0x07,0x03]
%call = call signext i32 @caller()
ret i32 %call
}