brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 4833760 Raw
42 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 42; RUN: llc < %s -mtriple=s390x-ibm-zos | FileCheck %s3 4; The current function's return address is in the link register.5define ptr @rt0() norecurse nounwind readnone {6; CHECK-LABEL: rt0:7; CHECK:         lgr 3,78; CHECK-NEXT:    b 2(7)9entry:10  %0 = tail call ptr @llvm.returnaddress(i32 0)11  ret ptr %012}13 14; Check the caller's return address.15define ptr @rtcaller() nounwind "backchain" {16; CHECK-LABEL: rtcaller:17; CHECK:         stmg 4,7,2048(4)18; CHECK-NEXT:    lg 1,2048(4)19; CHECK-NEXT:    lg 3,24(1)20; CHECK-NEXT:    lmg 4,7,2048(4)21; CHECK-NEXT:    b 2(7)22entry:23  %0 = tail call ptr @llvm.returnaddress(i32 1)24  ret ptr %025}26 27; Check the caller's caller's return address.28define ptr @rtcallercaller() nounwind "backchain" {29; CHECK-LABEL: rtcallercaller:30; CHECK:         stmg 4,7,2048(4)31; CHECK-NEXT:    lg 1,2048(4)32; CHECK-NEXT:    lg 1,0(1)33; CHECK-NEXT:    lg 3,24(1)34; CHECK-NEXT:    lmg 4,7,2048(4)35; CHECK-NEXT:    b 2(7)36entry:37  %0 = tail call ptr @llvm.returnaddress(i32 2)38  ret ptr %039}40 41declare ptr @llvm.returnaddress(i32) nounwind readnone42