HLASM has a requirement where aliasing labels need to be emitted at the same time as the aliasee label, similar to AIX. I used their implementation for reference with some modifications as we can only alias functions and we must emit all symbol attributes before the label is emitted to ensure the XATTR instruction contains the correct attributes. --------- Co-authored-by: Tony Tao <tonytao@ca.ibm.com>
18 lines
449 B
LLVM
18 lines
449 B
LLVM
; Test function aliasing on z/OS
|
|
;
|
|
; RUN: llc < %s -mtriple=s390x-ibm-zos -emit-gnuas-syntax-on-zos=0 | FileCheck %s
|
|
|
|
; CHECK: ENTRY foo
|
|
; CHECK-NEXT: foo XATTR LINKAGE(XPLINK),REFERENCE(CODE),SCOPE(LIBRARY)
|
|
; CHECK-NEXT: foo DS 0H
|
|
; CHECK-NEXT: ENTRY foo
|
|
; CHECK-NEXT: foo1 XATTR LINKAGE(XPLINK),REFERENCE(CODE),SCOPE(LIBRARY)
|
|
; CHECK-NEXT: foo1 DS 0H
|
|
|
|
@foo1 = hidden alias i32 (i32), ptr @foo
|
|
|
|
define hidden void @foo() {
|
|
entry:
|
|
ret void
|
|
}
|