]> rtime.felk.cvut.cz Git - arc.git/blob - arch/arm/arm_cm3/kernel/arch_offset.c
Initial commit.
[arc.git] / arch / arm / arm_cm3 / kernel / arch_offset.c
1 /* -------------------------------- Arctic Core ------------------------------
2  * Arctic Core - the open source AUTOSAR platform http://arccore.com
3  *
4  * Copyright (C) 2009  ArcCore AB <contact@arccore.com>
5  *
6  * This source code is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License version 2 as published by the
8  * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13  * for more details.
14  * -------------------------------- Arctic Core ------------------------------*/
15 \r
16 #include <stddef.h>\r
17 #include <stdint.h>\r
18 \r
19 #define DECLARE(_sym,_val) \\r
20         __asm("#define " #_sym " %0 ": : "i" (_val))\r
21 \r
22 \r
23 #include "stack.h"\r
24 \r
25 void  arch_foo(void) {\r
26         /* StackNvgprType */\r
27         DECLARE(STACK_NVGPR_R4,         offsetof(StackNvgprType, r4));\r
28         DECLARE(STACK_NVGPR_R5,         offsetof(StackNvgprType, r5));\r
29         DECLARE(STACK_NVGPR_R6,         offsetof(StackNvgprType, r6));\r
30         DECLARE(STACK_NVGPR_R7,         offsetof(StackNvgprType, r7));\r
31         DECLARE(STACK_NVGPR_R8,         offsetof(StackNvgprType, r8));\r
32         DECLARE(STACK_NVGPR_R10,        offsetof(StackNvgprType, r10));\r
33         DECLARE(STACK_NVGPR_R11,        offsetof(StackNvgprType, r11));\r
34         DECLARE(STACK_NVGPR_VA, offsetof(StackNvgprType, va));\r
35 \r
36         /* StackCallAndContextType */\r
37 }\r
38 \r
39 \r
40 \r