]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/l4sys/include/ARCH-ppc32/linkage.h
Inital import
[l4.git] / l4 / pkg / l4sys / include / ARCH-ppc32 / linkage.h
1 /**
2  * \file
3  * \brief   Linkage
4  * \ingroup l4sys_api
5  */
6 /*
7  * (c) 2008-2009 Technische Universität Dresden
8  * This file is part of TUD:OS and distributed under the terms of the
9  * GNU General Public License 2.
10  * Please see the COPYING-GPL-2 file for details.
11  *
12  * As a special exception, you may use this file as part of a free software
13  * library without restriction.  Specifically, if other files instantiate
14  * templates or use macros or inline functions from this file, or you compile
15  * this file and link it with other files to produce an executable, this
16  * file does not by itself cause the resulting executable to be covered by
17  * the GNU General Public License.  This exception does not however
18  * invalidate any other reasons why the executable file might be covered by
19  * the GNU General Public License.
20  */
21 #ifndef __L4__SYS__ARCH_PPC32__LINKAGE_H__
22 #define __L4__SYS__ARCH_PPC32__LINKAGE_H__
23
24 #ifdef __ASSEMBLY__
25
26 #ifndef ENTRY
27 #define ENTRY(name) \
28   .globl name; \
29   .p2align(2); \
30   name:
31
32 #endif /* ! ENTRY */
33 #endif /* __ASSEMBLY__ */
34
35 #define L4_FASTCALL(x)  x __attribute__((regparm(3)))
36 #define l4_fastcall     __attribute__((regparm(3)))
37
38 /**
39  * Define calling convention.
40  * \ingroup l4sys_defines
41  * \hideinitializer
42  */
43 #define L4_CV
44
45 #ifdef __PIC__
46 #define L4_LONG_CALL
47 #else
48 #define L4_LONG_CALL __attribute__((longcall))
49 #endif
50
51 #endif /* ! __L4__SYS__ARCH_PPC32__LINKAGE_H__ */