forked from rust-embedded/cortex-m
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathasm.s
129 lines (111 loc) · 1.67 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
.section .text.__bkpt
.global __bkpt
.thumb_func
__bkpt:
bkpt
bx lr
.section .text.__control_r
.global __control_r
.thumb_func
__control_r:
mrs r0, CONTROL
bx lr
.section .text.__control_w
.global __control_w
.thumb_func
__control_w:
msr CONTROL, r0
bx lr
.section .text.__cpsid
.global __cpsid
.thumb_func
__cpsid:
cpsid i
bx lr
.section .text.__cpsie
.global __cpsie
.thumb_func
__cpsie:
cpsie i
bx lr
.section .text.__delay
.global __delay
.syntax unified
.thumb_func
__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
.section .text.__dmb
.global __dmb
.thumb_func
__dmb:
dmb 0xF
bx lr
.section .text.__dsb
.global __dsb
.thumb_func
__dsb:
dsb 0xF
bx lr
.section .text.__isb
.global __isb
.thumb_func
__isb:
isb 0xF
bx lr
.section .text.__msp_r
.global __msp_r
.thumb_func
__msp_r:
mrs r0, MSP
bx lr
.section .text.__msp_w
.global __msp_w
.thumb_func
__msp_w:
msr MSP, r0
bx lr
.section .text.__nop
.global __nop
.thumb_func
__nop:
bx lr
.section .text.__primask
.global __primask
.thumb_func
__primask:
mrs r0, PRIMASK
bx lr
.section .text.__psp_r
.global __psp_r
.thumb_func
__psp_r:
mrs r0, PSP
bx lr
.section .text.__psp_w
.global __psp_w
.thumb_func
__psp_w:
msr PSP, r0
bx lr
.section .text.__sev
.global __sev
.thumb_func
__sev:
sev
bx lr
.section .text.__wfe
.global __wfe
.thumb_func
__wfe:
wfe
bx lr
.section .text.__wfi
.global __wfi
.thumb_func
__wfi:
wfi
bx lr