0c5c57fbb726bae485bc613382434db534ff4379
[tpg/acess2.git] / Kernel / arch / armv7 / include / assembly.h
1 /*
2  * Acess2 ARMv7
3  * - By John Hodge (thePowersGang)
4  *
5  * arch/arm7/include/assembly.h
6  * - Assembly specific macros
7  */
8 #ifndef _ASSEMBLY_H_
9 #define _ASSEMBLY_H_
10
11 #define PUSH_GPRS \
12         str r0, [sp,#-1*4];\
13         str r1, [sp,#-2*4];\
14         str r2, [sp,#-3*4];\
15         str r3, [sp,#-4*4];\
16         str r4, [sp,#-5*4];\
17         str r5, [sp,#-6*4];\
18         str r6, [sp,#-7*4];\
19         str r7, [sp,#-8*4];\
20         str r8, [sp,#-9*4];\
21         str r9, [sp,#-10*4];\
22         str r10, [sp,#-11*4];\
23         str r11, [sp,#-12*4];\
24         str r12, [sp,#-13*4];\
25         str sp, [sp,#-14*4];\
26         str lr, [sp,#-15*4];\
27         sub sp, #16*4
28
29 #define POP_GPRS add sp, #16*4; \
30         ldr r0, [sp,#-1*4]; \
31         ldr r1, [sp,#-2*4]; \
32         ldr r2, [sp,#-3*4]; \
33         ldr r3, [sp,#-4*4]; \
34         ldr r4, [sp,#-5*4]; \
35         ldr r5, [sp,#-6*4]; \
36         ldr r6, [sp,#-7*4]; \
37         ldr r7, [sp,#-8*4]; \
38         ldr r8, [sp,#-9*4]; \
39         ldr r9, [sp,#-10*4]; \
40         ldr r10, [sp,#-11*4]; \
41         ldr r11, [sp,#-12*4]; \
42         ldr r12, [sp,#-13*4]; \
43         ldr lr, [sp,#-15*4];
44
45 #endif
46

UCC git Repository :: git.ucc.asn.au