brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 307f280 Raw
44 lines · plain
1; RUN: llc < %s -mtriple=s390x-none-zos -mcpu=z10 | FileCheck %s2;3; Ensures that landingpad instructions use the right Exception Pointer4; and Exception Selector registers, and that the exception table is emitted.5 6declare void @callee()7declare void @passeh(ptr, i32) noreturn8declare i32 @__zos_cxx_personality_v2(...)9 10define void @test1() uwtable personality ptr @__zos_cxx_personality_v2 {11entry:12  %ehptr = alloca ptr, align 813  %ehsel = alloca i32, align 814  invoke void @callee() to label %done unwind label %lpad15done:16  ret void17; Match the return instruction.18; CHECK: b 2(7)19lpad:20  %0 = landingpad { ptr, i32 } cleanup21; The Exception Pointer is %r1; the Exception Selector, %r2.22; CHECK: L#BB{{[^%]*}} %lpad23; CHECK-DAG: stg 1,{{.*}}24; CHECK-DAG: st 2,{{.*}}25  %1 = extractvalue { ptr, i32 } %0, 026  %2 = extractvalue { ptr, i32 } %0, 127  store ptr %1, ptr %ehptr, align 828  store i32 %2, ptr %ehsel, align 829  call void @passeh(ptr %1, i32 %2)30  unreachable31}32 33; Check that offsets to the FD of the personality routine and LSDA are emitted in PPA134; CHECK: .byte 145 {{.*PPA1 Flags}}35; CHECK: Bit 3: 1 = C++ EH block36; TODO: Emit the value instead of a dummy value.37; CHECK: Personality routine38; CHECK: LSDA location39; Check that the exception table is emitted into .lsda section.40; CHECK:  stdin#C CSECT41; CHECK:  C_WSA64 CATTR ALIGN(2),FILL(0),NOTEXECUTABLE,RMODE(64),PART(.gcc_exception_table.test1)42; CHECK:  .gcc_exception_table.test1 XATTR LINKAGE(XPLINK),REFERENCE(DATA),SCOPE(SECTION)43; CHECK: GCC_except_table0:44