1 /* -------------------------------- Arctic Core ------------------------------
2 * Arctic Core - the open source AUTOSAR platform http://arccore.com
4 * Copyright (C) 2009 ArcCore AB <contact@arccore.com>
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>.
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
14 * -------------------------------- Arctic Core ------------------------------*/
19 #define DECLARE(_sym,_val) \
\r
20 __asm("#define " #_sym " %0 ": : "i" (_val))
\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
36 /* StackCallAndContextType */
\r