projects
/
rtos
/
tinyara.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4070105
)
Fix setjmp/longjmp implementation for thumb mode (i.e.: tiva, which is Cortex M3...
author
Tomasz Wozniak
<t.wozniak@samsung.com>
Tue, 19 Sep 2017 13:21:48 +0000
(15:21 +0200)
committer
Tomasz Wozniak
<t.wozniak@samsung.com>
Tue, 19 Sep 2017 13:21:48 +0000
(15:21 +0200)
Compiles for armv7-a/r in both arm and thumb modes and for armv7-m.
os/arch/arm/src/common/setjmp.S
patch
|
blob
|
history
diff --git
a/os/arch/arm/src/common/setjmp.S
b/os/arch/arm/src/common/setjmp.S
index
bdac7d2
..
3acd669
100644
(file)
--- a/
os/arch/arm/src/common/setjmp.S
+++ b/
os/arch/arm/src/common/setjmp.S
@@
-151,12
+151,19
@@
longjmp:
ldr r14, [r0, #((_JB_REG_R14 - _JB_REG_R4) * 4)]
#endif
+#ifndef __thumb__
/* Validate sp and r14 */
teq sp, #0
it ne
teqne r14, #0
it eq
beq botch
+#else
+ cmp sp, #0
+ beq botch
+ cmp lr, #0
+ beq botch
+#endif
/* Set return value */
movs r0, r1