32 lines · plain
1# REQUIRES: ppc2## Test that some save and restore functions can be synthesized.3## The code sequences are tested by ppc64-restgpr*.s and ppc64-savegpr*.s4 5# RUN: llvm-mc -filetype=obj -triple=ppc64le %s -o %t.o6# RUN: ld.lld -shared %t.o -o %t.so7# RUN: llvm-readelf -s %t.so | FileCheck --check-prefix=NM %s8# RUN: llvm-objdump -d %t.so | FileCheck %s9 10## The synthesized symbols are not exported.11# NM: FUNC LOCAL HIDDEN {{.*}} _restgpr0_3012# NM-NEXT: FUNC LOCAL HIDDEN {{.*}} _restgpr1_3013# NM-NEXT: FUNC LOCAL HIDDEN {{.*}} _savegpr0_3014# NM-NEXT: FUNC LOCAL HIDDEN {{.*}} _savegpr1_3015 16# CHECK: 00000000000[[#%x,RESTGPR0:]] <_restgpr0_30>:17# CHECK: 00000000000[[#%x,RESTGPR1:]] <_restgpr1_30>:18# CHECK: 00000000000[[#%x,SAVEGPR0:]] <_savegpr0_30>:19# CHECK: 00000000000[[#%x,SAVEGPR1:]] <_savegpr1_30>:20# CHECK-LABEL: <_start>:21# CHECK-NEXT: bl 0x[[#RESTGPR0]]22# CHECK-NEXT: bl 0x[[#RESTGPR1]]23# CHECK-NEXT: bl 0x[[#SAVEGPR0]]24# CHECK-NEXT: bl 0x[[#SAVEGPR1]]25 26.globl _start27_start:28 bl _restgpr0_3029 bl _restgpr1_3030 bl _savegpr0_3031 bl _savegpr1_3032