2 * Copyright 2007-2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Copyright 2010 Andreas Faerber, andreas.faerber@web.de
4 * Distributed under the terms of the MIT License.
7 // This file is used to get C structure offsets into assembly code.
8 // The build system assembles the file and processes the output to create
9 // a header file with macro definitions, that can be included from assembly
13 #include <computed_asm_macros.h>
18 #define DEFINE_MACRO(macro, value) DEFINE_COMPUTED_ASM_MACRO(macro, value)
20 #define DEFINE_OFFSET_MACRO(prefix, structure, member) \
21 DEFINE_MACRO(prefix##_##member, offsetof(struct structure, member));
23 #define DEFINE_SIZEOF_MACRO(prefix, structure) \
24 DEFINE_MACRO(prefix##_sizeof, sizeof(struct structure));
31 DEFINE_OFFSET_MACRO(CPU_ENT
, cpu_ent
, fault_handler
);
32 DEFINE_OFFSET_MACRO(CPU_ENT
, cpu_ent
, fault_handler_stack_pointer
);