34 lines · plain
1# REQUIRES: ppc2# RUN: llvm-mc -filetype=obj -triple=powerpc64le %s -o %t.o3# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s4 5# RUN: llvm-mc -filetype=obj -triple=powerpc64 %s -o %t.o6# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s7 8## This test checks that the linker produces errors when it is missing the nop9## after a local call to a callee with st_other=1.10 11# CHECK: {{.*}}.o:(.text+0xc): call to save_callee lacks nop, can't restore toc12# CHECK-NEXT: {{.*}}.o:(.text+0x1c): call to save_callee lacks nop, can't restore toc13 14callee:15 .localentry callee, 116 blr # 0x017 18caller:19.Lfunc_gep1:20 addis 2, 12, .TOC.-.Lfunc_gep1@ha21 addi 2, 2, .TOC.-.Lfunc_gep1@l22.Lfunc_lep1:23 .localentry caller, .Lfunc_lep1-.Lfunc_gep124 bl callee # 0xC25 blr26 27caller_tail:28.Lfunc_gep2:29 addis 2, 12, .TOC.-.Lfunc_gep2@ha30 addi 2, 2, .TOC.-.Lfunc_gep2@l31.Lfunc_lep2:32 .localentry caller_tail, .Lfunc_lep2-.Lfunc_gep233 b callee # 0x1C34