xref: /aosp_15_r20/external/llvm/test/MC/ARM/eh-directive-movsp.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker@ RUN: llvm-mc -triple armv7-eabi -filetype obj -o - %s | llvm-readobj -s -sd \
2*9880d681SAndroid Build Coastguard Worker@ RUN:   | FileCheck %s
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker	.syntax unified
5*9880d681SAndroid Build Coastguard Worker	.thumb
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Worker	.section .duplicate
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Worker	.global duplicate
10*9880d681SAndroid Build Coastguard Worker	.type duplicate,%function
11*9880d681SAndroid Build Coastguard Workerduplicate:
12*9880d681SAndroid Build Coastguard Worker	.fnstart
13*9880d681SAndroid Build Coastguard Worker	.setfp sp, sp, #8
14*9880d681SAndroid Build Coastguard Worker	add sp, sp, #8
15*9880d681SAndroid Build Coastguard Worker	.movsp r11
16*9880d681SAndroid Build Coastguard Worker	mov r11, sp
17*9880d681SAndroid Build Coastguard Worker	.fnend
18*9880d681SAndroid Build Coastguard Worker
19*9880d681SAndroid Build Coastguard Worker@ CHECK: Section {
20*9880d681SAndroid Build Coastguard Worker@ CHECK:   Name: .ARM.exidx.duplicate
21*9880d681SAndroid Build Coastguard Worker@ CHECK:   SectionData (
22*9880d681SAndroid Build Coastguard Worker@ CHECK:     0000: 00000000 B09B9B80
23*9880d681SAndroid Build Coastguard Worker@ CHECK:   )
24*9880d681SAndroid Build Coastguard Worker@ CHECK: }
25*9880d681SAndroid Build Coastguard Worker
26*9880d681SAndroid Build Coastguard Worker
27*9880d681SAndroid Build Coastguard Worker	.section .squash
28*9880d681SAndroid Build Coastguard Worker
29*9880d681SAndroid Build Coastguard Worker	.global squash
30*9880d681SAndroid Build Coastguard Worker	.type squash,%function
31*9880d681SAndroid Build Coastguard Workersquash:
32*9880d681SAndroid Build Coastguard Worker	.fnstart
33*9880d681SAndroid Build Coastguard Worker	.movsp ip
34*9880d681SAndroid Build Coastguard Worker	mov ip, sp
35*9880d681SAndroid Build Coastguard Worker	.save {fp, ip, lr}
36*9880d681SAndroid Build Coastguard Worker	stmfd sp!, {fp, ip, lr}
37*9880d681SAndroid Build Coastguard Worker	.fnend
38*9880d681SAndroid Build Coastguard Worker
39*9880d681SAndroid Build Coastguard Worker@ CHECK: Section {
40*9880d681SAndroid Build Coastguard Worker@ CHECK:   Name: .ARM.exidx.squash
41*9880d681SAndroid Build Coastguard Worker@ CHECK:   SectionData (
42*9880d681SAndroid Build Coastguard Worker@ CHECK:     0000: 00000000 9C808580
43*9880d681SAndroid Build Coastguard Worker@ CHECK:   )
44*9880d681SAndroid Build Coastguard Worker@ CHECK: }
45