scripts: prepare new configuration for x86_64 on vault13 server using pre build cross...
[AROS.git] / compiler / include / exec / initializers.h
blobfa2a685c056ed5913806198319fc4521bcca54dc
1 #ifndef EXEC_INITIALIZERS_H
2 #define EXEC_INITIALIZERS_H
4 #include <aros/system.h>
6 /*
7 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
8 $Id$
10 Desc: Macros to build init structs (eg. for InitStruct())
11 Lang: english
14 #define OFFSET(structName, structEntry) \
15 ((IPTR)&(((struct structName *) 0)->structEntry))
17 #if AROS_BIG_ENDIAN
18 #define INITBYTE(offset,value) 0xe000,(UWORD) (offset),(UWORD) ((value)<<8)
19 #define INITWORD(offset,value) 0xd000,(UWORD) (offset),(UWORD) (value)
20 #define INITLONG(offset,value) 0xc000,(UWORD) (offset), \
21 (UWORD) ((value)>>16), \
22 (UWORD) ((value) & 0xffff)
23 #define INITSTRUCT(size,offset,value,count) \
24 (UWORD) (0xc000|(size<<12)|(count<<8)| \
25 ((UWORD) ((offset)>>16)), \
26 ((UWORD) (offset)) & 0xffff)
27 #else
28 #define INITBYTE(offset,value) (0x00e0 | ((((ULONG)offset) & 0xff) << 8)),(UWORD) (((ULONG)offset) >> 8),(UWORD) ((value) & 0xff)
29 #define INITWORD(offset,value) (0x00d0 | ((((ULONG)offset) & 0xff) << 8)),(UWORD) (((ULONG)offset) >> 8),(UWORD) (value)
30 #define INITLONG(offset,value) (0x00c0 | ((((ULONG)offset) & 0xff) << 8)),(UWORD) (((ULONG)offset) >> 8), \
31 (UWORD) ((value) & 0xffff), \
32 (UWORD) ((value) >> 16)
33 #define INITSTRUCT(size,offset,value,count) \
34 (UWORD) (0x00c0|((size)<<4)|((count)<<0)| \
35 ((UWORD) ((((ULONG)offset) & 0xff) << 8))), \
36 ((UWORD) (((ULONG)offset) >> 8))
37 #endif
39 #endif /* EXEC_INITIALIZERS_H */