1# REQUIRES: ppc 2## Test that some save and restore functions can be synthesized. 3## The code sequences are tested by ppc64-restgpr*.s and ppc64-savegpr*.s 4 5# RUN: llvm-mc -filetype=obj -triple=ppc64le %s -o %t.o 6# RUN: ld.lld -shared %t.o -o %t.so 7# RUN: llvm-readelf -s %t.so | FileCheck --check-prefix=NM %s 8# RUN: llvm-objdump -d %t.so | FileCheck %s 9 10## The synthesized symbols are not exported. 11# NM: FUNC LOCAL HIDDEN {{.*}} _restgpr0_30 12# NM-NEXT: FUNC LOCAL HIDDEN {{.*}} _restgpr1_30 13# NM-NEXT: FUNC LOCAL HIDDEN {{.*}} _savegpr0_30 14# NM-NEXT: FUNC LOCAL HIDDEN {{.*}} _savegpr1_30 15 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 _start 27_start: 28 bl _restgpr0_30 29 bl _restgpr1_30 30 bl _savegpr0_30 31 bl _savegpr1_30 32