diff options
-rw-r--r-- | lib/unwarminder/get_sp.S | 6 |
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 */ |
28 | get_sp: | 28 | get_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 |