xref: /aosp_15_r20/external/llvm/test/MC/ARM/thumb_set.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker@ RUN: llvm-mc -triple armv7-eabi -filetype obj -o - %s | llvm-readobj -t \
2*9880d681SAndroid Build Coastguard Worker@ RUN:   | FileCheck %s
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker@ RUN: llvm-mc -triple armv7-eabi -filetype asm -o - %s \
5*9880d681SAndroid Build Coastguard Worker@ RUN:   | FileCheck --check-prefix=ASM %s
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Worker	.syntax unified
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Worker	.arm
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Worker	.type arm_func,%function
12*9880d681SAndroid Build Coastguard Workerarm_func:
13*9880d681SAndroid Build Coastguard Worker	nop
14*9880d681SAndroid Build Coastguard Worker
15*9880d681SAndroid Build Coastguard Worker	.thumb_set alias_arm_func, arm_func
16*9880d681SAndroid Build Coastguard Worker
17*9880d681SAndroid Build Coastguard Worker        alias_arm_func2 = alias_arm_func
18*9880d681SAndroid Build Coastguard Worker        alias_arm_func3 = alias_arm_func2
19*9880d681SAndroid Build Coastguard Worker
20*9880d681SAndroid Build Coastguard Worker@ ASM: .thumb_set alias_arm_func, arm_func
21*9880d681SAndroid Build Coastguard Worker
22*9880d681SAndroid Build Coastguard Worker	.thumb
23*9880d681SAndroid Build Coastguard Worker
24*9880d681SAndroid Build Coastguard Worker	.type thumb_func,%function
25*9880d681SAndroid Build Coastguard Worker	.thumb_func
26*9880d681SAndroid Build Coastguard Workerthumb_func:
27*9880d681SAndroid Build Coastguard Worker	nop
28*9880d681SAndroid Build Coastguard Worker
29*9880d681SAndroid Build Coastguard Worker	.thumb_set alias_thumb_func, thumb_func
30*9880d681SAndroid Build Coastguard Worker
31*9880d681SAndroid Build Coastguard Worker	.thumb_set seedless, 0x5eed1e55
32*9880d681SAndroid Build Coastguard Worker	.thumb_set eggsalad, seedless + 0x87788358
33*9880d681SAndroid Build Coastguard Worker	.thumb_set faceless, ~eggsalad + 0xe133c002
34*9880d681SAndroid Build Coastguard Worker
35*9880d681SAndroid Build Coastguard Worker	.thumb_set alias_undefined_data, badblood
36*9880d681SAndroid Build Coastguard Worker
37*9880d681SAndroid Build Coastguard Worker	.data
38*9880d681SAndroid Build Coastguard Worker
39*9880d681SAndroid Build Coastguard Worker	.type badblood,%object
40*9880d681SAndroid Build Coastguard Workerbadblood:
41*9880d681SAndroid Build Coastguard Worker	.long 0xbadb100d
42*9880d681SAndroid Build Coastguard Worker
43*9880d681SAndroid Build Coastguard Worker	.type bedazzle,%object
44*9880d681SAndroid Build Coastguard Workerbedazzle:
45*9880d681SAndroid Build Coastguard Worker	.long 0xbeda221e
46*9880d681SAndroid Build Coastguard Worker
47*9880d681SAndroid Build Coastguard Worker	.text
48*9880d681SAndroid Build Coastguard Worker	.thumb
49*9880d681SAndroid Build Coastguard Worker
50*9880d681SAndroid Build Coastguard Worker	.thumb_set alias_defined_data, bedazzle
51*9880d681SAndroid Build Coastguard Worker
52*9880d681SAndroid Build Coastguard Worker	.type alpha,%function
53*9880d681SAndroid Build Coastguard Workeralpha:
54*9880d681SAndroid Build Coastguard Worker	nop
55*9880d681SAndroid Build Coastguard Worker
56*9880d681SAndroid Build Coastguard Worker        .type beta,%function
57*9880d681SAndroid Build Coastguard Worker
58*9880d681SAndroid Build Coastguard Worker	.thumb_set beta, alpha
59*9880d681SAndroid Build Coastguard Worker
60*9880d681SAndroid Build Coastguard Worker@ CHECK: Symbol {
61*9880d681SAndroid Build Coastguard Worker@ CHECK:   Name: alias_arm_func
62*9880d681SAndroid Build Coastguard Worker@ CHECK:   Value: 0x1
63*9880d681SAndroid Build Coastguard Worker@ CHECK:   Type: Function
64*9880d681SAndroid Build Coastguard Worker@ CHECK: }
65*9880d681SAndroid Build Coastguard Worker
66*9880d681SAndroid Build Coastguard Worker@ CHECK: Symbol {
67*9880d681SAndroid Build Coastguard Worker@ CHECK:   Name: alias_arm_func2
68*9880d681SAndroid Build Coastguard Worker@ CHECK:   Value: 0x1
69*9880d681SAndroid Build Coastguard Worker@ CHECK:   Type: Function
70*9880d681SAndroid Build Coastguard Worker@ CHECK: }
71*9880d681SAndroid Build Coastguard Worker
72*9880d681SAndroid Build Coastguard Worker@ CHECK: Symbol {
73*9880d681SAndroid Build Coastguard Worker@ CHECK:   Name: alias_arm_func3
74*9880d681SAndroid Build Coastguard Worker@ CHECK:   Value: 0x1
75*9880d681SAndroid Build Coastguard Worker@ CHECK:   Type: Function
76*9880d681SAndroid Build Coastguard Worker@ CHECK: }
77*9880d681SAndroid Build Coastguard Worker
78*9880d681SAndroid Build Coastguard Worker@ CHECK: Symbol {
79*9880d681SAndroid Build Coastguard Worker@ CHECK:   Name: alias_defined_data
80*9880d681SAndroid Build Coastguard Worker@ CHECK:   Value: 0x5
81*9880d681SAndroid Build Coastguard Worker@ CHECK:   Type: Function
82*9880d681SAndroid Build Coastguard Worker@ CHECK: }
83*9880d681SAndroid Build Coastguard Worker
84*9880d681SAndroid Build Coastguard Worker@ CHECK: Symbol {
85*9880d681SAndroid Build Coastguard Worker@ CHECK:   Name: alias_thumb_func
86*9880d681SAndroid Build Coastguard Worker@ CHECK:   Value: 0x5
87*9880d681SAndroid Build Coastguard Worker@ CHECK:   Type: Function
88*9880d681SAndroid Build Coastguard Worker@ CHECK: }
89*9880d681SAndroid Build Coastguard Worker
90*9880d681SAndroid Build Coastguard Worker@ CHECK: Symbol {
91*9880d681SAndroid Build Coastguard Worker@ CHECK:   Name: alias_undefined_data
92*9880d681SAndroid Build Coastguard Worker@ CHECK:   Value: 0x0
93*9880d681SAndroid Build Coastguard Worker@ CHECK:   Type: Object
94*9880d681SAndroid Build Coastguard Worker@ CHECK: }
95*9880d681SAndroid Build Coastguard Worker
96*9880d681SAndroid Build Coastguard Worker@ CHECK: Symbol {
97*9880d681SAndroid Build Coastguard Worker@ CHECK:   Name: alpha
98*9880d681SAndroid Build Coastguard Worker@ CHECK:   Value: 0x7
99*9880d681SAndroid Build Coastguard Worker@ CHECK:   Type: Function
100*9880d681SAndroid Build Coastguard Worker@ CHECK: }
101*9880d681SAndroid Build Coastguard Worker
102*9880d681SAndroid Build Coastguard Worker@ CHECK: Symbol {
103*9880d681SAndroid Build Coastguard Worker@ CHECK:   Name: arm_func
104*9880d681SAndroid Build Coastguard Worker@ CHECK:   Value: 0x0
105*9880d681SAndroid Build Coastguard Worker@ CHECK:   Type: Function
106*9880d681SAndroid Build Coastguard Worker@ CHECK: }
107*9880d681SAndroid Build Coastguard Worker
108*9880d681SAndroid Build Coastguard Worker@ CHECK:      Symbol {
109*9880d681SAndroid Build Coastguard Worker@ CHECK:        Name: badblood
110*9880d681SAndroid Build Coastguard Worker@ CHECK-NEXT:   Value: 0x0
111*9880d681SAndroid Build Coastguard Worker@ CHECK-NEXT:   Size: 0
112*9880d681SAndroid Build Coastguard Worker@ CHECK-NEXT:   Binding: Local
113*9880d681SAndroid Build Coastguard Worker@ CHECK-NEXT:   Type: Object
114*9880d681SAndroid Build Coastguard Worker@ CHECK-NEXT:   Other: 0
115*9880d681SAndroid Build Coastguard Worker@ CHECK-NEXT:   Section: .data
116*9880d681SAndroid Build Coastguard Worker@ CHECK-NEXT: }
117*9880d681SAndroid Build Coastguard Worker
118*9880d681SAndroid Build Coastguard Worker@ CHECK: Symbol {
119*9880d681SAndroid Build Coastguard Worker@ CHECK:   Name: bedazzle
120*9880d681SAndroid Build Coastguard Worker@ CHECK:   Value: 0x4
121*9880d681SAndroid Build Coastguard Worker@ CHECK:   Type: Object
122*9880d681SAndroid Build Coastguard Worker@ CHECK: }
123*9880d681SAndroid Build Coastguard Worker
124*9880d681SAndroid Build Coastguard Worker@ CHECK: Symbol {
125*9880d681SAndroid Build Coastguard Worker@ CHECK:   Name: beta
126*9880d681SAndroid Build Coastguard Worker@ CHECK:   Value: 0x7
127*9880d681SAndroid Build Coastguard Worker@ CHECK:   Type: Function
128*9880d681SAndroid Build Coastguard Worker@ CHECK: }
129*9880d681SAndroid Build Coastguard Worker
130*9880d681SAndroid Build Coastguard Worker@ CHECK: Symbol {
131*9880d681SAndroid Build Coastguard Worker@ CHECK:   Name: eggsalad
132*9880d681SAndroid Build Coastguard Worker@ CHECK:   Value: 0xE665A1AD
133*9880d681SAndroid Build Coastguard Worker@ CHECK:   Type: Function
134*9880d681SAndroid Build Coastguard Worker@ CHECK: }
135*9880d681SAndroid Build Coastguard Worker
136*9880d681SAndroid Build Coastguard Worker@ CHECK: Symbol {
137*9880d681SAndroid Build Coastguard Worker@ CHECK:   Name: faceless
138*9880d681SAndroid Build Coastguard Worker@ CHECK:   Value: 0xFACE1E55
139*9880d681SAndroid Build Coastguard Worker@ CHECK:   Type: Function
140*9880d681SAndroid Build Coastguard Worker@ CHECK: }
141*9880d681SAndroid Build Coastguard Worker
142*9880d681SAndroid Build Coastguard Worker@ CHECK: Symbol {
143*9880d681SAndroid Build Coastguard Worker@ CHECK:   Name: seedless
144*9880d681SAndroid Build Coastguard Worker@ CHECK:   Value: 0x5EED1E55
145*9880d681SAndroid Build Coastguard Worker@ CHECK:   Type: Function
146*9880d681SAndroid Build Coastguard Worker@ CHECK: }
147*9880d681SAndroid Build Coastguard Worker
148*9880d681SAndroid Build Coastguard Worker@ CHECK: Symbol {
149*9880d681SAndroid Build Coastguard Worker@ CHECK:   Name: thumb_func
150*9880d681SAndroid Build Coastguard Worker@ CHECK:   Value: 0x5
151*9880d681SAndroid Build Coastguard Worker@ CHECK:   Type: Function
152*9880d681SAndroid Build Coastguard Worker@ CHECK: }
153