2010-11-23 Gedare Bloom <giddyup44@yahoo.com>

PR 1719/cpukit
	* shared/start/start.S: Avoid "bx" instruction to support ARMv4 and
	below.
This commit is contained in:
Sebastian Huber
2010-11-23 16:08:45 +00:00
parent a73dc5d0ed
commit 57bc4571f9
2 changed files with 26 additions and 0 deletions

View File

@@ -1,3 +1,9 @@
2010-11-23 Gedare Bloom <giddyup44@yahoo.com>
PR 1719/cpukit
* shared/start/start.S: Avoid "bx" instruction to support ARMv4 and
below.
2010-05-20 Sebastian Huber <sebastian.huber@embedded-brains.de>
* shared/include/start.h: Define start section attributes.

View File

@@ -199,12 +199,20 @@ DEFINE_FUNCTION_ARM(bsp_start_memcpy)
/* Return if dest == src */
cmp r0, r1
#ifdef __thumb__
bxeq lr
#else
moveq pc, lr
#endif
/* Return if length is zero */
mov r3, #0
cmp r3, r2
#ifdef __thumb__
bxeq lr
#else
moveq pc, lr
#endif
/* Save non-volatile registers */
push {r4-r8, lr}
@@ -218,14 +226,22 @@ DEFINE_FUNCTION_ARM(bsp_start_memcpy)
mov r3, #0
mov ip, sp
mov lr, pc
#ifdef __thumb__
bx ip
#else
mov pc, ip
#endif
/* Restore stack and non-volatile registers */
add sp, sp, #24
pop {r4-r8, lr}
/* Return */
#ifdef __thumb__
bx lr
#else
mov pc, lr
#endif
bsp_start_memcpy_begin:
@@ -235,4 +251,8 @@ bsp_start_memcpy_begin:
add r3, r3, #4
cmp r3, r2
bcc bsp_start_memcpy_begin
#ifdef __thumb__
bx lr
#else
mov pc, lr
#endif