]> rtime.felk.cvut.cz Git - arc.git/blobdiff - include/Compiler.h
Merge branch 'mikulka' of git@rtime.felk.cvut.cz:arc into mikulka
[arc.git] / include / Compiler.h
index 7fc65cd0be8240173434d4793ffb6ab59f494ac0..b47f0c08f80562152f764f4d16536209eff0ff64 100644 (file)
 #define CC_EXTENSION   __extension__\r
 #elif defined(__CWCC__)\r
 #define CC_EXTENSION\r
+#pragma read_only_switch_tables on\r
+#elif defined(__DCC__)\r
+#define CC_EXTENSION\r
+#endif\r
+\r
+#if defined(__GNUC__)\r
+#define SECTION_BALIGN(_align )  __attribute__ ((aligned (_align)))\r
+#elif defined(__CWCC__)\r
+#define SECTION_BALIGN(_align )  __attribute__ ((aligned (_align)))\r
+#elif defined(__DCC__)\r
+#define SECTION_BALIGN(_align )  __attribute__ ((aligned (_align)))\r
 #endif\r
 \r
+#define DECLARE_WEAK                   __attribute__ ((weak))\r
+\r
+/* Does this really work on all compilers.... */\r
+#define INLINE __inline__\r
+\r
 /* REQ:COMPILER005 */\r
-/* TODO: skip the memclass for now */\r
 #define FUNC(rettype,memclass) rettype\r
 \r
-/* REQ:COMPILER006 */\r
-#define P2VAR(ptrtype, memclass, ptrclass) ptrtype\r
+#define P2VAR(ptrtype, memclass, ptrclass) ptrtype *\r
 \r
-/* TODO: memclass and more */\r
-#define P2CONST(ptrtype, memclass, ptrclass) ptrtype\r
+#define P2CONST(ptrtype, memclass, ptrclass) const ptrtype *\r
 \r
-/* TODO: memclass and more */\r
-#define CONSTP2VAR(ptrtype,memclass,ptrclass) ptrclass ptrtype * const\r
+#define CONSTP2VAR(ptrtype,memclass,ptrclass) ptrtype * const\r
 \r
-/* TODO: */\r
-#define P2FUNC(rettype,ptrclass,fctname) retype (*ptrclass,fctname)\r
+#define CONSTP2CONST(ptrtype, memclass, ptrclass) const ptrtype * const\r
+\r
+#define P2FUNC(rettype,ptrclass,fctname) rettype (*fctname)\r
 \r
-/* TODO: */\r
 #define CONST(consttype,memclass) const consttype\r
 \r
-/* TODO: */\r
 #define VAR(vartype,memclass) vartype\r
 \r
 \r
-\r
 #endif /* COMPILER_H */        \r