aboutsummaryrefslogtreecommitdiff
path: root/asm
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge@japaric.io> 2018-04-26 01:52:07 +0200
committerGravatar Jorge Aparicio <jorge@japaric.io> 2018-04-26 01:52:07 +0200
commitbff66f8fa796e305df93f28d9a5e352eb51596e5 (patch)
treec6878210d90f8e7e8029a36cf8ebf23326c4f592 /asm
parent00d6faae149c062e79a822b8d46b6b5e7e972f57 (diff)
downloadcortex-m-bff66f8fa796e305df93f28d9a5e352eb51596e5.tar.gz
cortex-m-bff66f8fa796e305df93f28d9a5e352eb51596e5.tar.zst
cortex-m-bff66f8fa796e305df93f28d9a5e352eb51596e5.zip
make compilable on stable
Diffstat (limited to 'asm')
-rw-r--r--asm/basepri_max-cm7-r0p1.s12
-rw-r--r--asm/basepri_max.s4
-rw-r--r--asm/basepri_r.s4
-rw-r--r--asm/basepri_w-cm7-r0p1.s12
-rw-r--r--asm/basepri_w.s4
-rw-r--r--asm/bkpt.s4
-rw-r--r--asm/control.s4
-rw-r--r--asm/cpsid.s4
-rw-r--r--asm/cpsie.s4
-rw-r--r--asm/dmb.s4
-rw-r--r--asm/dsb.s4
-rw-r--r--asm/faultmask.s4
-rw-r--r--asm/isb.s4
-rw-r--r--asm/msp_r.s4
-rw-r--r--asm/msp_w.s4
-rw-r--r--asm/nop.s4
-rw-r--r--asm/primask.s4
-rw-r--r--asm/psp_r.s4
-rw-r--r--asm/psp_w.s4
-rw-r--r--asm/sev.s4
-rw-r--r--asm/wfe.s4
-rw-r--r--asm/wfi.s4
22 files changed, 104 insertions, 0 deletions
diff --git a/asm/basepri_max-cm7-r0p1.s b/asm/basepri_max-cm7-r0p1.s
new file mode 100644
index 0000000..f26d473
--- /dev/null
+++ b/asm/basepri_max-cm7-r0p1.s
@@ -0,0 +1,12 @@
+;; fn __basepri_max(u8)
+;; executed in a critical section to work around a silicon erratum
+ .global __basepri_max
+__basepri_max:
+ mrs r1, PRIMASK
+ cpsid i
+ tst.w r1, #1
+ msr BASEPRI_MAX, r0
+ it ne
+ bxne lr
+ cpsie i
+ bx lr
diff --git a/asm/basepri_max.s b/asm/basepri_max.s
new file mode 100644
index 0000000..0ac3a5e
--- /dev/null
+++ b/asm/basepri_max.s
@@ -0,0 +1,4 @@
+ .global __basepri_max
+__basepri_max:
+ msr BASEPRI_MAX, r0
+ bx lr
diff --git a/asm/basepri_r.s b/asm/basepri_r.s
new file mode 100644
index 0000000..9f727ab
--- /dev/null
+++ b/asm/basepri_r.s
@@ -0,0 +1,4 @@
+ .global __basepri_r
+__basepri_r:
+ mrs r0, BASEPRI
+ bx lr
diff --git a/asm/basepri_w-cm7-r0p1.s b/asm/basepri_w-cm7-r0p1.s
new file mode 100644
index 0000000..1d1dce6
--- /dev/null
+++ b/asm/basepri_w-cm7-r0p1.s
@@ -0,0 +1,12 @@
+;; fn __basepri_w(u8)
+;; executed in a critical section to work around a silicon erratum
+ .global __basepri_w
+__basepri_w:
+ mrs r1, PRIMASK
+ cpsid i
+ tst.w r1, #1
+ msr BASEPRI, r0
+ it ne
+ bxne lr
+ cpsie i
+ bx lr
diff --git a/asm/basepri_w.s b/asm/basepri_w.s
new file mode 100644
index 0000000..b1f8709
--- /dev/null
+++ b/asm/basepri_w.s
@@ -0,0 +1,4 @@
+ .global __basepri_w
+__basepri_w:
+ msr BASEPRI, r0
+ bx lr
diff --git a/asm/bkpt.s b/asm/bkpt.s
new file mode 100644
index 0000000..3d9d347
--- /dev/null
+++ b/asm/bkpt.s
@@ -0,0 +1,4 @@
+ .global __bkpt
+__bkpt:
+ bkpt
+ bx lr
diff --git a/asm/control.s b/asm/control.s
new file mode 100644
index 0000000..81c35e6
--- /dev/null
+++ b/asm/control.s
@@ -0,0 +1,4 @@
+ .global __control
+__control:
+ mrs r0, CONTROL
+ bx lr
diff --git a/asm/cpsid.s b/asm/cpsid.s
new file mode 100644
index 0000000..ae4701d
--- /dev/null
+++ b/asm/cpsid.s
@@ -0,0 +1,4 @@
+ .global __cpsid
+__cpsid:
+ cpsid i
+ bx lr
diff --git a/asm/cpsie.s b/asm/cpsie.s
new file mode 100644
index 0000000..cba3a39
--- /dev/null
+++ b/asm/cpsie.s
@@ -0,0 +1,4 @@
+ .global __cpsie
+__cpsie:
+ cpsie i
+ bx lr
diff --git a/asm/dmb.s b/asm/dmb.s
new file mode 100644
index 0000000..9fd38dd
--- /dev/null
+++ b/asm/dmb.s
@@ -0,0 +1,4 @@
+ .global __dmb
+__dmb:
+ dmb 0xF
+ bx lr
diff --git a/asm/dsb.s b/asm/dsb.s
new file mode 100644
index 0000000..a5f1da1
--- /dev/null
+++ b/asm/dsb.s
@@ -0,0 +1,4 @@
+ .global __dsb
+__dsb:
+ dsb 0xF
+ bx lr
diff --git a/asm/faultmask.s b/asm/faultmask.s
new file mode 100644
index 0000000..5f08370
--- /dev/null
+++ b/asm/faultmask.s
@@ -0,0 +1,4 @@
+ .global __faultmask
+__faultmask:
+ mrs r0, FAULTMASK
+ bx lr
diff --git a/asm/isb.s b/asm/isb.s
new file mode 100644
index 0000000..a007a79
--- /dev/null
+++ b/asm/isb.s
@@ -0,0 +1,4 @@
+ .global __isb
+__isb:
+ isb 0xF
+ bx lr
diff --git a/asm/msp_r.s b/asm/msp_r.s
new file mode 100644
index 0000000..b31a715
--- /dev/null
+++ b/asm/msp_r.s
@@ -0,0 +1,4 @@
+ .global __msp_r
+__msp_r:
+ mrs r0, MSP
+ bx lr
diff --git a/asm/msp_w.s b/asm/msp_w.s
new file mode 100644
index 0000000..c589c0e
--- /dev/null
+++ b/asm/msp_w.s
@@ -0,0 +1,4 @@
+ .global __msp_w
+__msp_w:
+ msr MSP, r0
+ bx lr
diff --git a/asm/nop.s b/asm/nop.s
new file mode 100644
index 0000000..2fd1bf6
--- /dev/null
+++ b/asm/nop.s
@@ -0,0 +1,4 @@
+ .global __nop
+__nop:
+ nop
+ bx lr
diff --git a/asm/primask.s b/asm/primask.s
new file mode 100644
index 0000000..a3ff709
--- /dev/null
+++ b/asm/primask.s
@@ -0,0 +1,4 @@
+ .global __primask
+__primask:
+ mrs r0, PRIMASK
+ bx lr
diff --git a/asm/psp_r.s b/asm/psp_r.s
new file mode 100644
index 0000000..1c5ff81
--- /dev/null
+++ b/asm/psp_r.s
@@ -0,0 +1,4 @@
+ .global __psp_r
+__psp_r:
+ mrs r0, PSP
+ bx lr
diff --git a/asm/psp_w.s b/asm/psp_w.s
new file mode 100644
index 0000000..8ad1559
--- /dev/null
+++ b/asm/psp_w.s
@@ -0,0 +1,4 @@
+ .global __psp_w
+__psp_w:
+ msr PSP, r0
+ bx lr
diff --git a/asm/sev.s b/asm/sev.s
new file mode 100644
index 0000000..2fa80a0
--- /dev/null
+++ b/asm/sev.s
@@ -0,0 +1,4 @@
+ .global __sev
+__sev:
+ sev
+ bx lr
diff --git a/asm/wfe.s b/asm/wfe.s
new file mode 100644
index 0000000..8a30570
--- /dev/null
+++ b/asm/wfe.s
@@ -0,0 +1,4 @@
+ .global __wfe
+__wfe:
+ wfe
+ bx lr
diff --git a/asm/wfi.s b/asm/wfi.s
new file mode 100644
index 0000000..2f31cf6
--- /dev/null
+++ b/asm/wfi.s
@@ -0,0 +1,4 @@
+ .global __wfi
+__wfi:
+ wfi
+ bx lr