1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: rvct.h 4 5 Copyright (C)2009-2012 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: 47706 $ 14 *---------------------------------------------------------------------------*/ 15 16 /* Please see man pages for details 17 18 19 20 */ 21 22 #ifndef NN_CONFIG_COMPILER_RVCT_H_ 23 #define NN_CONFIG_COMPILER_RVCT_H_ 24 25 26 // 27 // 28 // 29 30 //--------------------------------------------------------------------------- 31 // 32 // 33 // 34 // 35 //--------------------------------------------------------------------------- 36 #define NN_FILE_NAME __MODULE__ 37 38 //--------------------------------------------------------------------------- 39 // 40 // 41 // 42 //--------------------------------------------------------------------------- 43 #define NN_FUNCTION __PRETTY_FUNCTION__ 44 45 46 //--------------------------------------------------------------------------- 47 // 48 // 49 // 50 // 51 // 52 // 53 //--------------------------------------------------------------------------- 54 #define NN_ATTRIBUTE_ALIGN(n) __attribute__ ((aligned(n))) 55 56 57 58 //--------------------------------------------------------------------------- 59 // 60 // 61 // 62 // 63 // 64 // 65 // 66 // 67 //--------------------------------------------------------------------------- 68 #define NN_UNUSED_VAR(var) ((void)&var); 69 70 // 71 72 73 74 // 75 // 76 77 //--------------------------------------------------------------------------- 78 // 79 // 80 // 81 // 82 //--------------------------------------------------------------------------- 83 #define NN_DLL_IMPORT __declspec(dllimport) 84 85 //--------------------------------------------------------------------------- 86 // 87 // 88 // 89 // 90 //--------------------------------------------------------------------------- 91 #define NN_DLL_EXPORT __declspec(dllexport) 92 93 // 94 95 96 97 #define NN_IS_UNUSED_VAR __attribute__((unused)) 98 #define NN_IS_UNUSED_FUNC __attribute__((unused)) 99 100 #define NN_WEAK_SYMBOL __weak 101 #define NN_ASM __asm 102 #define NN_PACKED __packed 103 104 #define NN_FORCE_INLINE __forceinline 105 #define NN_ATTRIBUTE_PACK __attribute__ ((packed)) 106 #define NN_ATTRIBUTE_DEPRECATED __attribute__ ((deprecated)) 107 #define NN_ATTRIBUTE_FORMAT(type, m, n) \ 108 __attribute__ ((format(type,m,n))) 109 #define NN_ATTRIBUTE_NORETURN __attribute__ ((noreturn)) 110 111 #define NN_LSYM( no ) no 112 #define NN_BSYM( no ) %b##no 113 #define NN_FSYM( no ) %f##no 114 115 #define NN_DEFINE_MODULE_ID_STRING(name, value) \ 116 const char name[] __attribute__((section(".module_id"))) = (value) 117 118 #define NN_DEFINE_STATIC_INIT_ARRAY(array, symbol) \ 119 static void (*const array[])() __attribute__((used, section(".static_init"))) = { &symbol } 120 121 122 #define NN_ATTR_PRIVATE_SECTION_2(a, b) \ 123 __attribute__((section(#a "." #b))) 124 125 #define NN_ATTR_PRIVATE_SECTION_1(a, b) \ 126 NN_ATTR_PRIVATE_SECTION_2(a, b) 127 128 #define NN_ATTR_PRIVATE_SECTION \ 129 NN_ATTR_PRIVATE_SECTION_1(NN_FILE_NAME, __LINE__) 130 131 #define NN_FUNC_ATTR_PRIVATE_SECTION NN_ATTR_PRIVATE_SECTION 132 133 // TORIAEZU: Strange for it to be here since there is no compiler dependency 134 #define NN_PADDING1 int : 8 135 #define NN_PADDING2 int : 16 136 #define NN_PADDING3 int : 24 137 #define NN_PADDING4 int : 32 138 139 140 141 /* NN_CONFIG_COMPILER_RVCT_H_ */ 142 #endif 143