summaryrefslogtreecommitdiff
path: root/lib/unwarminder/get_sp.S
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2016-09-21 00:16:34 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2016-12-12 13:15:47 +0100
commit7e0820fe21247d528f4c3483822af4f4a66571ee (patch)
tree49419ef5e779067dc3afee182c3db9dcb3f28844 /lib/unwarminder/get_sp.S
parent89e6189dcbc878c4e27db8bd1aa04f87154c187a (diff)
downloadrockbox-7e0820fe21247d528f4c3483822af4f4a66571ee.tar.gz
rockbox-7e0820fe21247d528f4c3483822af4f4a66571ee.zip
unwinder: in get__sp(), use the more correct "msr cpsr_c, ..." form
Change-Id: I9cfdca80536fc9fb6e8983a81219ccdf5c0b3c42
Diffstat (limited to 'lib/unwarminder/get_sp.S')
-rw-r--r--lib/unwarminder/get_sp.S6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/unwarminder/get_sp.S b/lib/unwarminder/get_sp.S
index dfab11605f..9449a5e946 100644
--- a/lib/unwarminder/get_sp.S
+++ b/lib/unwarminder/get_sp.S
@@ -16,7 +16,7 @@ __get_sp:
16#if (CONFIG_PLATFORM & PLATFORM_NATIVE) 16#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
17 mrs r1, cpsr /* save current state */ 17 mrs r1, cpsr /* save current state */
18 orr r0, r1, #0xc0 18 orr r0, r1, #0xc0
19 msr cpsr, r0 /* disable IRQ and FIQ */ 19 msr cpsr_c, r0 /* disable IRQ and FIQ */
20 and r0, r1, #0x1f /* get current mode */ 20 and r0, r1, #0x1f /* get current mode */
21 cmp r0, #0x1f /* are we in sys mode? */ 21 cmp r0, #0x1f /* are we in sys mode? */
22 beq get_sp 22 beq get_sp
@@ -24,12 +24,12 @@ call_from_exception:
24 mrs r0, spsr /* get saved state */ 24 mrs r0, spsr /* get saved state */
25 and r0, r0, #0x1f /* get mode bits */ 25 and r0, r0, #0x1f /* get mode bits */
26 orr r0, r0, #0xc0 /* no FIQ no IRQ */ 26 orr r0, r0, #0xc0 /* no FIQ no IRQ */
27 msr cpsr, r0 /* change mode */ 27 msr cpsr_c, r0 /* change mode */
28get_sp: 28get_sp:
29#endif 29#endif
30 mov r0, sp /* get SP */ 30 mov r0, sp /* get SP */
31#if (CONFIG_PLATFORM & PLATFORM_NATIVE) 31#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
32 msr cpsr, r1 /* restore mode */ 32 msr cpsr_c, r1 /* restore mode */
33#endif 33#endif
34 bx lr 34 bx lr
35.size __get_sp, . - __get_sp 35.size __get_sp, . - __get_sp