Skip to content

Commit 8aaeada

Browse files
committed
Add unwind information to external assembly
1 parent 7494435 commit 8aaeada

12 files changed

+78
-1
lines changed

asm-cm7-r0p1.s

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
.cfi_sections .debug_frame
2+
13
.section .text.__basepri_max_cm7_r0p1
24
.global __basepri_max_cm7_r0p1
35
.syntax unified
46
.thumb_func
7+
.cfi_startproc
58
__basepri_max_cm7_r0p1:
69
mrs r1, PRIMASK
710
cpsid i
@@ -11,12 +14,14 @@ __basepri_max_cm7_r0p1:
1114
bxne lr
1215
cpsie i
1316
bx lr
17+
.cfi_endproc
1418
.size __basepri_max_cm7_r0p1, . - __basepri_max_cm7_r0p1
1519

1620
.section .text.__basepri_w_cm7_r0p1
1721
.global __basepri_w_cm7_r0p1
1822
.syntax unified
1923
.thumb_func
24+
.cfi_startproc
2025
__basepri_w_cm7_r0p1:
2126
mrs r1, PRIMASK
2227
cpsid i
@@ -26,4 +31,5 @@ __basepri_w_cm7_r0p1:
2631
bxne lr
2732
cpsie i
2833
bx lr
34+
.cfi_endproc
2935
.size __basepri_w_cm7_r0p1, . - __basepri_w_cm7_r0p1

asm-v7.s

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,41 @@
1+
.cfi_sections .debug_frame
2+
13
.section .text.__basepri_max
24
.global __basepri_max
35
.thumb_func
6+
.cfi_startproc
47
__basepri_max:
58
msr BASEPRI_MAX, r0
69
bx lr
10+
.cfi_endproc
711
.size __basepri_max, . - __basepri_max
812

913
.section .text.__basepri_r
1014
.global __basepri_r
1115
.thumb_func
16+
.cfi_startproc
1217
__basepri_r:
1318
mrs r0, BASEPRI
1419
bx lr
20+
.cfi_endproc
1521
.size __basepri_r, . - __basepri_r
1622

1723
.section .text.__basepri_w
1824
.global __basepri_w
1925
.thumb_func
26+
.cfi_startproc
2027
__basepri_w:
2128
msr BASEPRI, r0
2229
bx lr
30+
.cfi_endproc
2331
.size __basepri_w, . - __basepri_w
2432

2533
.section .text.__faultmask
2634
.global __faultmask
2735
.thumb_func
36+
.cfi_startproc
2837
__faultmask:
2938
mrs r0, FAULTMASK
3039
bx lr
40+
.cfi_endproc
3141
.size __faultmask, . - __faultmask

asm-v8-main.s

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,43 @@
1+
2+
.cfi_sections .debug_frame
3+
14
.section .text.__msplim_r
25
.global __msplim_r
36
.thumb_func
7+
.cfi_startproc
48
__msplim_r:
59
mrs r0, MSPLIM
610
bx lr
11+
.cfi_endproc
712
.size __msplim_r, . - __msplim_r
813

914
.section .text.__msplim_w
1015
.global __msplim_w
1116
.thumb_func
17+
.cfi_startproc
1218
__msplim_w:
1319
msr MSPLIM, r0
1420
bx lr
21+
.cfi_endproc
1522
.size __msplim_w, . - __msplim_w
1623

1724
.section .text.__psplim_r
1825
.global __psplim_r
1926
.thumb_func
27+
.cfi_startproc
2028
__psplim_r:
2129
mrs r0, PSPLIM
2230
bx lr
31+
.cfi_endproc
2332
.size __psplim_r, . - __psplim_r
2433

2534
.section .text.__psplim_w
2635
.global __psplim_w
2736
.thumb_func
37+
.cfi_startproc
2838
__psplim_w:
2939
msr PSPLIM, r0
3040
bx lr
41+
.cfi_endproc
3142
.size __psplim_w, . - __psplim_w
3243

asm-v8.s

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,42 @@
1+
.cfi_sections .debug_frame
2+
13
.section .text.__tt
24
.global __tt
35
.thumb_func
6+
.cfi_startproc
47
__tt:
58
tt r0, r0
69
bx lr
10+
.cfi_endproc
711
.size __tt, . - __tt
812

913
.section .text.__ttt
1014
.global __ttt
1115
.thumb_func
16+
.cfi_startproc
1217
__ttt:
1318
ttt r0, r0
1419
bx lr
20+
.cfi_endproc
1521
.size __ttt, . - __ttt
1622

1723
.section .text.__tta
1824
.global __tta
1925
.thumb_func
26+
.cfi_startproc
2027
__tta:
2128
tta r0, r0
2229
bx lr
30+
.cfi_endproc
2331
.size __tta, . - __tta
2432

2533

2634
.section .text.__ttat
2735
.global __ttat
2836
.thumb_func
37+
.cfi_startproc
2938
__ttat:
3039
ttat r0, r0
3140
bx lr
41+
.cfi_endproc
3242
.size __ttat, . - __ttat

asm.s

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,156 +1,196 @@
1+
.cfi_sections .debug_frame
2+
13
.section .text.__bkpt
24
.global __bkpt
35
.thumb_func
6+
.cfi_startproc
47
__bkpt:
58
bkpt
69
bx lr
10+
.cfi_endproc
711
.size __bkpt, . - __bkpt
812

913
.section .text.__control_r
1014
.global __control_r
1115
.thumb_func
16+
.cfi_startproc
1217
__control_r:
1318
mrs r0, CONTROL
1419
bx lr
20+
.cfi_endproc
1521
.size __control_r, . - __control_r
1622

1723
.section .text.__control_w
1824
.global __control_w
1925
.thumb_func
26+
.cfi_startproc
2027
__control_w:
2128
msr CONTROL, r0
2229
bx lr
30+
.cfi_endproc
2331
.size __control_w, . - __control_w
2432

2533

2634
.section .text.__cpsid
2735
.global __cpsid
2836
.thumb_func
37+
.cfi_startproc
2938
__cpsid:
3039
cpsid i
3140
bx lr
41+
.cfi_endproc
3242
.size __cpsid, . - __cpsid
3343

3444
.section .text.__cpsie
3545
.global __cpsie
3646
.thumb_func
47+
.cfi_startproc
3748
__cpsie:
3849
cpsie i
3950
bx lr
51+
.cfi_endproc
4052
.size __cpsie, . - __cpsie
4153

4254
.section .text.__delay
4355
.global __delay
4456
.syntax unified
4557
.thumb_func
58+
.cfi_startproc
4659
__delay:
4760
1:
4861
nop
4962
subs r0, #1
5063
bne 1b // Branch to 1 instead of __delay does not generate R_ARM_THM_JUMP8 relocation, which breaks linking on the thumbv6m-none-eabi target
5164
bx lr
65+
.cfi_endproc
5266
.size __delay, . - __delay
5367

5468
.section .text.__dmb
5569
.global __dmb
5670
.thumb_func
71+
.cfi_startproc
5772
__dmb:
5873
dmb 0xF
5974
bx lr
75+
.cfi_endproc
6076
.size __dmb, . - __dmb
6177

6278
.section .text.__dsb
6379
.global __dsb
6480
.thumb_func
81+
.cfi_startproc
6582
__dsb:
6683
dsb 0xF
6784
bx lr
85+
.cfi_endproc
6886
.size __dsb, . - __dsb
6987

7088
.section .text.__isb
7189
.global __isb
7290
.thumb_func
91+
.cfi_startproc
7392
__isb:
7493
isb 0xF
7594
bx lr
95+
.cfi_endproc
7696
.size __isb, . - __isb
7797

7898
.section .text.__msp_r
7999
.global __msp_r
80100
.thumb_func
101+
.cfi_startproc
81102
__msp_r:
82103
mrs r0, MSP
83104
bx lr
105+
.cfi_endproc
84106
.size __msp_r, . - __msp_r
85107

86108
.section .text.__msp_w
87109
.global __msp_w
88110
.thumb_func
111+
.cfi_startproc
89112
__msp_w:
90113
msr MSP, r0
91114
bx lr
115+
.cfi_endproc
92116
.size __msp_w, . - __msp_w
93117

94118
.section .text.__nop
95119
.global __nop
96120
.thumb_func
121+
.cfi_startproc
97122
__nop:
98123
bx lr
124+
.cfi_endproc
99125
.size __nop, . - __nop
100126

101127
.section .text.__primask
102128
.global __primask
103129
.thumb_func
130+
.cfi_startproc
104131
__primask:
105132
mrs r0, PRIMASK
106133
bx lr
134+
.cfi_endproc
107135
.size __primask, . - __primask
108136

109137
.section .text.__psp_r
110138
.global __psp_r
111139
.thumb_func
140+
.cfi_startproc
112141
__psp_r:
113142
mrs r0, PSP
114143
bx lr
144+
.cfi_endproc
115145
.size __psp_r, . - __psp_r
116146

117147
.section .text.__psp_w
118148
.global __psp_w
119149
.thumb_func
150+
.cfi_startproc
120151
__psp_w:
121152
msr PSP, r0
122153
bx lr
154+
.cfi_endproc
123155
.size __psp_w, . - __psp_w
124156

125157
.section .text.__sev
126158
.global __sev
127159
.thumb_func
160+
.cfi_startproc
128161
__sev:
129162
sev
130163
bx lr
164+
.cfi_endproc
131165
.size __sev, . - __sev
132166

133167

134168
.section .text.__udf
135169
.global __udf
136170
.thumb_func
171+
.cfi_startproc
137172
__udf:
138173
udf
174+
.cfi_endproc
139175
.size __udf, . - __udf
140176

141177
.section .text.__wfe
142178
.global __wfe
143179
.thumb_func
180+
.cfi_startproc
144181
__wfe:
145182
wfe
146183
bx lr
184+
.cfi_endproc
147185
.size __wfe, . - __wfe
148186

149187

150188
.section .text.__wfi
151189
.global __wfi
152190
.thumb_func
191+
.cfi_startproc
153192
__wfi:
154193
wfi
155-
.size __wfi, . - __wfi
156194
bx lr
195+
.cfi_endproc
196+
.size __wfi, . - __wfi

bin/thumbv6m-none-eabi.a

744 Bytes
Binary file not shown.

bin/thumbv7em-none-eabi.a

1.18 KB
Binary file not shown.

bin/thumbv7em-none-eabihf.a

1.18 KB
Binary file not shown.

bin/thumbv7m-none-eabi.a

1012 Bytes
Binary file not shown.

bin/thumbv8m.base-none-eabi.a

1008 Bytes
Binary file not shown.

bin/thumbv8m.main-none-eabi.a

1.5 KB
Binary file not shown.

bin/thumbv8m.main-none-eabihf.a

1.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)