1 ; Test the ADA section in the assembly output for all cases.
3 ; RUN: llc < %s -mtriple=s390x-ibm-zos | FileCheck %s
6 ; CHECK: stmg 6,7,1840(4)
11 ; CHECK: stg 1,2264(4)
17 define hidden void @DoIt() {
19 %F = alloca ptr, align 8
20 store ptr @DoFunc, ptr %F, align 8
21 %0 = load ptr, ptr %F, align 8
22 call void @Caller(ptr noundef %0)
25 declare void @DoFunc()
26 declare void @Caller(ptr noundef)
29 ; CHECK: stmg 6,8,1872(4)
41 ; CHECK: lmg 7,8,2072(4)
44 @i = external global i32, align 4
45 @i2 = external global i32, align 4
47 define signext i32 @get_i() {
49 %0 = load i32, ptr @i, align 4
50 %1 = load i32, ptr @i2, align 4
51 %call = call signext i32 @callout(i32 signext %1)
52 %add = add nsw i32 %0, %call
56 declare signext i32 @callout(i32 signext)
58 ; CHECK: .section ".ada"
59 ; CHECK: .set L#DoFunc@indirect0, DoFunc
60 ; CHECK: .indirect_symbol L#DoFunc@indirect0
61 ; CHECK: .quad V(L#DoFunc@indirect0) * Offset 0 pointer to function descriptor DoFunc
62 ; CHECK: .quad R(Caller) * Offset 8 function descriptor of Caller
63 ; CHECK: .quad V(Caller)
64 ; CHECK: .quad A(i2) * Offset 24 pointer to data symbol i2
65 ; CHECK: .quad A(i) * Offset 32 pointer to data symbol i
66 ; CHECK: .quad R(callout) * Offset 40 function descriptor of callout
67 ; CHECK: .quad V(callout)