forked from rust-embedded/cortex-m
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathasm.s
192 lines (170 loc) · 2.82 KB
/
asm.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
.cfi_sections .debug_frame
.section .text.__bkpt
.global __bkpt
.thumb_func
.cfi_startproc
__bkpt:
bkpt
bx lr
.cfi_endproc
.size __bkpt, . - __bkpt
.section .text.__control_r
.global __control_r
.thumb_func
.cfi_startproc
__control_r:
mrs r0, CONTROL
bx lr
.cfi_endproc
.size __control_r, . - __control_r
.section .text.__control_w
.global __control_w
.thumb_func
.cfi_startproc
__control_w:
msr CONTROL, r0
bx lr
.cfi_endproc
.size __control_w, . - __control_w
.section .text.__cpsid
.global __cpsid
.thumb_func
.cfi_startproc
__cpsid:
cpsid i
bx lr
.cfi_endproc
.size __cpsid, . - __cpsid
.section .text.__cpsie
.global __cpsie
.thumb_func
.cfi_startproc
__cpsie:
cpsie i
bx lr
.cfi_endproc
.size __cpsie, . - __cpsie
.section .text.__delay
.global __delay
.syntax unified
.thumb_func
.cfi_startproc
__delay:
1:
nop
subs r0, #1
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
bx lr
.cfi_endproc
.size __delay, . - __delay
.section .text.__dmb
.global __dmb
.thumb_func
.cfi_startproc
__dmb:
dmb 0xF
bx lr
.cfi_endproc
.size __dmb, . - __dmb
.section .text.__dsb
.global __dsb
.thumb_func
.cfi_startproc
__dsb:
dsb 0xF
bx lr
.cfi_endproc
.size __dsb, . - __dsb
.section .text.__isb
.global __isb
.thumb_func
.cfi_startproc
__isb:
isb 0xF
bx lr
.cfi_endproc
.size __isb, . - __isb
.section .text.__msp_r
.global __msp_r
.thumb_func
.cfi_startproc
__msp_r:
mrs r0, MSP
bx lr
.cfi_endproc
.size __msp_r, . - __msp_r
.section .text.__msp_w
.global __msp_w
.thumb_func
__msp_w:
msr MSP, r0
bx lr
.size __msp_w, . - __msp_w
.section .text.__nop
.global __nop
.thumb_func
.cfi_startproc
__nop:
bx lr
.cfi_endproc
.size __nop, . - __nop
.section .text.__primask
.global __primask
.thumb_func
.cfi_startproc
__primask:
mrs r0, PRIMASK
bx lr
.cfi_endproc
.size __primask, . - __primask
.section .text.__psp_r
.global __psp_r
.thumb_func
.cfi_startproc
__psp_r:
mrs r0, PSP
bx lr
.cfi_endproc
.size __psp_r, . - __psp_r
.section .text.__psp_w
.global __psp_w
.thumb_func
__psp_w:
msr PSP, r0
bx lr
.size __psp_w, . - __psp_w
.section .text.__sev
.global __sev
.thumb_func
.cfi_startproc
__sev:
sev
bx lr
.cfi_endproc
.size __sev, . - __sev
.section .text.__udf
.global __udf
.thumb_func
.cfi_startproc
__udf:
udf
.cfi_endproc
.size __udf, . - __udf
.section .text.__wfe
.global __wfe
.thumb_func
.cfi_startproc
__wfe:
wfe
bx lr
.cfi_endproc
.size __wfe, . - __wfe
.section .text.__wfi
.global __wfi
.thumb_func
.cfi_startproc
__wfi:
wfi
bx lr
.cfi_endproc
.size __wfi, . - __wfi