Go to the documentation of this file.
24 #ifndef COMPILERGNUC_H
25 #define COMPILERGNUC_H 1
34 #ifndef IFX_CFG_USE_COMPILER_DEFAULT_LINKER
37 #define IFXCOMPILER_COMMON_LINKER_SYMBOLS() \
38 extern unsigned int __A0_MEM[]; \
39 extern unsigned int __A1_MEM[]; \
40 extern unsigned int __A8_MEM[]; \
41 extern unsigned int __A9_MEM[];
48 #define IFXCOMPILER_CORE_LINKER_SYMBOLS(cpu) \
49 extern unsigned int __USTACK##cpu[]; \
50 extern unsigned int __ISTACK##cpu[]; \
51 extern unsigned int __INTTAB_CPU##cpu[]; \
52 extern unsigned int __TRAPTAB_CPU##cpu[]; \
53 extern unsigned int __CSA##cpu[]; \
54 extern unsigned int __CSA##cpu##_END[];
56 #define __USTACK(cpu) __USTACK##cpu
57 #define __ISTACK(cpu) __ISTACK##cpu
58 #define __INTTAB_CPU(cpu) __INTTAB_CPU##cpu
59 #define __TRAPTAB_CPU(cpu) __TRAPTAB_CPU##cpu
60 #define __CSA(cpu) __CSA##cpu
61 #define __CSA_END(cpu) __CSA##cpu##_END
64 #if defined(IFX_USE_SW_MANAGED_INT)
65 #define __INTTAB(cpu) ((unsigned int)__INTTAB_CPU##cpu | (unsigned int)0x1FE0)
67 #define __INTTAB(cpu) __INTTAB_CPU##cpu
70 #define __TRAPTAB(cpu) __TRAPTAB_CPU##cpu
72 #define __SDATA1(cpu) __A0_MEM
73 #define __SDATA2(cpu) __A1_MEM
74 #define __SDATA3(cpu) __A8_MEM
75 #define __SDATA4(cpu) __A9_MEM
80 #define IFX_INLINE static inline __attribute__ ((always_inline))
81 #define IFX_PACKED __attribute__ ((packed))
83 #define COMPILER_NAME "GNUC"
84 #define COMPILER_VERSION __VERSION__
86 #define COMPILER_REVISION 0
88 #define IFX_INTERRUPT_FAST IFX_INTERRUPT
90 #if defined(IFX_USE_SW_MANAGED_INT)
93 #define IFX_INTERRUPT(isr, vectabNum, prio) void isr(void)
99 #define IFX_INTERRUPT(isr, vectabNum, prio) IFX_INTERRUPT_INTERNAL(isr, vectabNum, prio)
103 #ifndef IFX_INTERRUPT_INTERNAL
104 #define IFX_INTERRUPT_INTERNAL(isr, vectabNum, prio) \
105 __asm__ (".ifndef .intr.entry.include \n"\
107 ".macro .int_entry.2 intEntryLabel, name # define the section and inttab entry code \n"\
108 " .pushsection .\\intEntryLabel,\"ax\",@progbits \n"\
109 " __\\intEntryLabel : \n"\
111 " movh.a %a14, hi:\\name \n"\
112 " lea %a14, [%a14]lo:\\name \n"\
116 ".macro .int_entry.1 prio,vectabNum,u,name \n"\
117 ".int_entry.2 intvec_tc\\vectabNum\\u\\prio,(name) # build the unique name \n"\
120 ".macro .intr.entry name,vectabNum,prio \n"\
121 ".int_entry.1 %(prio),%(vectabNum),_,name # evaluate the priority and the cpu number \n"\
123 ".intr.entry.include: \n"\
125 ".intr.entry "#isr","#vectabNum","#prio );\
126 IFX_EXTERN void __attribute__ ((interrupt_handler)) isr(); \
134 #define IFX_ALIGN(n) __attribute__ ((aligned(n)))
139 #define IFX_FAR_ABS __attribute__((fardata))