added a lot of printk output to ease writing of emulator
[linux-2.4.21-pre4.git] / include / linux / linkage.h
1 #ifndef _LINUX_LINKAGE_H
2 #define _LINUX_LINKAGE_H
3
4 #include <linux/config.h>
5
6 #ifdef __cplusplus
7 #define CPP_ASMLINKAGE extern "C"
8 #else
9 #define CPP_ASMLINKAGE
10 #endif
11
12 #if defined __i386__
13 #define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0)))
14 #elif defined __ia64__
15 #define asmlinkage CPP_ASMLINKAGE __attribute__((syscall_linkage))
16 #else
17 #define asmlinkage CPP_ASMLINKAGE
18 #endif
19
20 #define SYMBOL_NAME_STR(X) #X
21 #define SYMBOL_NAME(X) X
22 #ifdef __STDC__
23 #define SYMBOL_NAME_LABEL(X) X##:
24 #else
25 #define SYMBOL_NAME_LABEL(X) X/**/:
26 #endif
27
28 #ifdef __arm__
29 #define __ALIGN .align 0
30 #define __ALIGN_STR ".align 0"
31 #else
32 #ifdef __mc68000__
33 #define __ALIGN .align 4
34 #define __ALIGN_STR ".align 4"
35 #else
36 #ifdef __sh__
37 #define __ALIGN .balign 4
38 #define __ALIGN_STR ".balign 4"
39 #else
40 #if defined(__i386__) && defined(CONFIG_X86_ALIGNMENT_16)
41 #define __ALIGN .align 16,0x90
42 #define __ALIGN_STR ".align 16,0x90"
43 #else
44 #define __ALIGN .align 4,0x90
45 #define __ALIGN_STR ".align 4,0x90"
46 #endif
47 #endif /* __sh__ */
48 #endif /* __mc68000__ */
49 #endif /* __arm__ */
50
51 #ifdef __ASSEMBLY__
52
53 #define ALIGN __ALIGN
54 #define ALIGN_STR __ALIGN_STR
55
56 #define ENTRY(name) \
57   .globl SYMBOL_NAME(name); \
58   ALIGN; \
59   SYMBOL_NAME_LABEL(name)
60
61 #endif
62
63 #endif