@ -71,18 +71,12 @@ ENTRY(_main)
* /
# if d e f i n e d ( C O N F I G _ S P L _ B U I L D ) & & d e f i n e d ( C O N F I G _ S P L _ S T A C K )
ldr s p , = ( C O N F I G _ S P L _ S T A C K )
ldr r0 , = ( C O N F I G _ S P L _ S T A C K )
# else
ldr s p , = ( C O N F I G _ S Y S _ I N I T _ S P _ A D D R )
ldr r0 , = ( C O N F I G _ S Y S _ I N I T _ S P _ A D D R )
# endif
# if d e f i n e d ( C O N F I G _ C P U _ V 7 M ) / * v7 M f o r b i d s u s i n g S P a s B I C d e s t i n a t i o n * /
mov r3 , s p
bic r3 , r3 , #7
mov s p , r3
# else
bic s p , s p , #7 / * 8 - b y t e a l i g n m e n t f o r A B I c o m p l i a n c e * /
# endif
mov r0 , s p
bic r0 , r0 , #7 / * 8 - b y t e a l i g n m e n t f o r A B I c o m p l i a n c e * /
mov s p , r0
bl b o a r d _ i n i t _ f _ a l l o c _ r e s e r v e
mov s p , r0
/* set up gd here, outside any C code */
@ -100,14 +94,9 @@ ENTRY(_main)
* ' here' b u t r e l o c a t e d .
* /
ldr s p , [ r9 , #G D _ S T A R T _ A D D R _ S P ] / * s p = g d - > s t a r t _ a d d r _ s p * /
# if d e f i n e d ( C O N F I G _ C P U _ V 7 M ) / * v7 M f o r b i d s u s i n g S P a s B I C d e s t i n a t i o n * /
mov r3 , s p
bic r3 , r3 , #7
mov s p , r3
# else
bic s p , s p , #7 / * 8 - b y t e a l i g n m e n t f o r A B I c o m p l i a n c e * /
# endif
ldr r0 , [ r9 , #G D _ S T A R T _ A D D R _ S P ] / * s p = g d - > s t a r t _ a d d r _ s p * /
bic r0 , r0 , #7 / * 8 - b y t e a l i g n m e n t f o r A B I c o m p l i a n c e * /
mov s p , r0
ldr r9 , [ r9 , #G D _ B D ] / * r 9 = g d - > b d * /
sub r9 , r9 , #G D _ S I Z E / * n e w G D i s b e l o w b d * /