aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/lib/backtrace.S
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2009-07-24 07:32:57 -0400
committerCatalin Marinas <catalin.marinas@arm.com>2009-07-24 07:32:57 -0400
commit8b592783a2e8b7721a99730bd549aab5208f36af (patch)
tree468636a17d31f6a29287240c63234e739eabf666 /arch/arm/lib/backtrace.S
parent347c8b70b1d5256e445e54e736f88d21877616cf (diff)
Thumb-2: Implement the unified arch/arm/lib functions
This patch adds the ARM/Thumb-2 unified support for the arch/arm/lib/* files. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm/lib/backtrace.S')
-rw-r--r--arch/arm/lib/backtrace.S8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/lib/backtrace.S b/arch/arm/lib/backtrace.S
index b0951d0e8b2c..aaf7220d9e30 100644
--- a/arch/arm/lib/backtrace.S
+++ b/arch/arm/lib/backtrace.S
@@ -38,7 +38,9 @@ ENDPROC(c_backtrace)
38 beq no_frame @ we have no stack frames 38 beq no_frame @ we have no stack frames
39 39
40 tst r1, #0x10 @ 26 or 32-bit mode? 40 tst r1, #0x10 @ 26 or 32-bit mode?
41 moveq mask, #0xfc000003 @ mask for 26-bit 41 ARM( moveq mask, #0xfc000003 )
42 THUMB( moveq mask, #0xfc000000 )
43 THUMB( orreq mask, #0x03 )
42 movne mask, #0 @ mask for 32-bit 44 movne mask, #0 @ mask for 32-bit
43 45
441: stmfd sp!, {pc} @ calculate offset of PC stored 461: stmfd sp!, {pc} @ calculate offset of PC stored
@@ -126,7 +128,9 @@ ENDPROC(c_backtrace)
126 mov reg, #10 128 mov reg, #10
127 mov r7, #0 129 mov r7, #0
1281: mov r3, #1 1301: mov r3, #1
129 tst instr, r3, lsl reg 131 ARM( tst instr, r3, lsl reg )
132 THUMB( lsl r3, reg )
133 THUMB( tst instr, r3 )
130 beq 2f 134 beq 2f
131 add r7, r7, #1 135 add r7, r7, #1
132 teq r7, #6 136 teq r7, #6