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
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
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
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]]