1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     egcc.h
4 
5   Copyright (C)2009 Nintendo Co., Ltd.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law.  They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Rev: 12449 $
14  *---------------------------------------------------------------------------*/
15 
16 #ifndef NN_CONFIG_COMPILER_EGCC_H_
17 #define NN_CONFIG_COMPILER_EGCC_H_
18 
19 #include <stdarg.h>
20 
21 #define NN_IS_UNUSED_VAR        __attribute__((unused))
22 #define NN_IS_UNUSED_FUNC       __attribute__((unused))
23 
24 #define NN_UNUSED_VAR(var)      ((void)&var);
25 
26 #define NN_FILE_NAME            __FILE__
27 #define NN_FUNCTION             __PRETTY_FUNCTION__
28 
29 #define NN_WEAK_SYMBOL          __weak
30 #define NN_ASM                  __asm
31 
32 #define NN_FORCE_INLINE         __forceinline
33 #define NN_ATTRIBUTE_ALIGN(n)   __attribute__ ((aligned(n)))
34 #define NN_ATTRIBUTE_PACK       __attribute__ ((packed))
35 
36 #define NN_LSYM( no )           no
37 #define NN_BSYM( no )           %b##no
38 #define NN_FSYM( no )           %f##no
39 
40 #define NN_DEFINE_MODULE_ID_STRING(name, value) \
41     static const char name[] __attribute__((section(".module_id"))) = (value)
42 
43 
44 #ifdef __cplusplus
45 namespace std
46 {
47     using ::va_list;
48 }
49 #endif
50 
51 // TORIAEZU: コンパイラ依存ではないのでここにあるのはおかしい
52 #define NN_PADDING1             int :  8
53 #define NN_PADDING2             int : 16
54 #define NN_PADDING3             int : 24
55 #define NN_PADDING4             int : 32
56 
57 
58 
59 /* NN_CONFIG_COMPILER_EGCC_H_ */
60 #endif
61