Xmega Application Note


gas.h

Go to the documentation of this file.
00001 
00038 #ifndef ASSEMBLER_GAS_H_INCLUDED
00039 #define ASSEMBLER_GAS_H_INCLUDED
00040 
00041 #ifndef __DOXYGEN__
00042 
00043         /* IAR doesn't accept dots in macro names */
00044         .macro  ld_addr, reg, sym
00045         lda.w   \reg, \sym
00046         .endm
00047 
00048         /* Define a function \a name that is either globally visible or only
00049          * file-local.
00050          */
00051         .macro gas_begin_func name, is_public
00052                 .if \is_public
00053                 .global \name
00054                 .endif
00055                 .section .text.\name, "ax", @progbits
00056                 .type \name, @function
00057         \name :
00058         .endm
00059 
00060         /* Define a function \a name that is either globally visible or only
00061          * file-local in a given segment.
00062          */
00063         .macro gas_begin_func_segm name, is_public, segment
00064                 .if \is_public
00065                 .global \name
00066                 .endif
00067                 .section .\segment, "ax", @progbits
00068                 .type \name, @function
00069         \name :
00070         .endm
00071 
00072         /* Define \a name as a weak alias for the function \a strong_name */
00073         .macro gas_weak_function_alias name, strong_name
00074         .global \name
00075         .weak   \name
00076         .type   \name, @function
00077         .set    \name, \strong_name
00078         .endm
00079 
00080         /* Define a weak function called \a name */
00081         .macro gas_weak_function name
00082         .weak   \name
00083         gas_begin_func \name 1
00084         .endm
00085 
00086 #define REPEAT(count)           .rept   count
00087 #define END_REPEAT()            .endr
00088 #define FILL_BYTES(count)       .fill   count
00089 #define SET_LOC(offset)         .org    offset
00090 #define L(name)                 .L##name
00091 #define EXTERN_SYMBOL(name)
00092 
00093 #define TEXT_SECTION(name)                              \
00094         .section name, "ax", @progbits
00095 #define RODATA_SECTION(name)                            \
00096         .section name, "a", @progbits
00097 #define DATA_SECTION(name)                              \
00098         .section name, "aw", @progbits
00099 #define BSS_SECTION(name)                               \
00100         .section name, "aw", @nobits
00101 
00102 #define FUNCTION(name) gas_begin_func name 0
00103 #define PUBLIC_FUNCTION(name)   gas_begin_func name 1
00104 #define PUBLIC_FUNCTION_SEGMENT(name, segment)          \
00105         gas_begin_func_segm name 1 segment
00106 #define WEAK_FUNCTION(name) gas_weak_function name
00107 #define WEAK_FUNCTION_ALIAS(name, strong_name) \
00108         gas_weak_function_alias name strong_name
00109 #define END_FUNC(name)                                  \
00110         .size   name, . - name
00111 
00112 #define END_FILE()
00113 
00114 #endif /* __DOXYGEN__ */
00115 
00116 #endif /* ASSEMBLER_GAS_H_INCLUDED */
@DOC_TITLE@
Generated on Fri Oct 22 12:15:25 2010 for AVR1300 Using the Xmega ADC by doxygen 1.6.3