2 * -------------------------------------------
\r
3 * CC3220 SDK - v0.10.00.00
\r
4 * -------------------------------------------
\r
6 * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
\r
8 * Redistribution and use in source and binary forms, with or without
\r
9 * modification, are permitted provided that the following conditions
\r
12 * Redistributions of source code must retain the above copyright
\r
13 * notice, this list of conditions and the following disclaimer.
\r
15 * Redistributions in binary form must reproduce the above copyright
\r
16 * notice, this list of conditions and the following disclaimer in the
\r
17 * documentation and/or other materials provided with the
\r
20 * Neither the name of Texas Instruments Incorporated nor the names of
\r
21 * its contributors may be used to endorse or promote products derived
\r
22 * from this software without specific prior written permission.
\r
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
\r
25 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
\r
26 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
\r
27 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
\r
28 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
\r
29 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
\r
30 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
\r
31 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
\r
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
\r
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
\r
34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\r
38 //*****************************************************************************
\r
40 // asmdefs.h - Macros to allow assembly code be portable among toolchains.
\r
42 //*****************************************************************************
\r
44 #ifndef __ASMDEFS_H__
\r
45 #define __ASMDEFS_H__
\r
47 //*****************************************************************************
\r
49 // The defines required for code_red.
\r
51 //*****************************************************************************
\r
55 // The assembly code preamble required to put the assembler into the correct
\r
64 #define __LIBRARY__ @
\r
65 #define __TEXT__ .text
\r
66 #define __DATA__ .data
\r
67 #define __BSS__ .bss
\r
68 #define __TEXT_NOROOT__ .text
\r
71 // Assembler nmenonics.
\r
73 #define __ALIGN__ .balign 4
\r
74 #define __END__ .end
\r
75 #define __EXPORT__ .globl
\r
76 #define __IMPORT__ .extern
\r
78 #define __STR__ .ascii
\r
79 #define __THUMB_LABEL__ .thumb_func
\r
80 #define __WORD__ .word
\r
81 #define __INLINE_DATA__
\r
85 //*****************************************************************************
\r
87 // The defines required for EW-ARM.
\r
89 //*****************************************************************************
\r
95 #define __LIBRARY__ module
\r
96 #define __TEXT__ rseg CODE:CODE(2)
\r
97 #define __DATA__ rseg DATA:DATA(2)
\r
98 #define __BSS__ rseg DATA:DATA(2)
\r
99 #define __TEXT_NOROOT__ rseg CODE:CODE:NOROOT(2)
\r
102 // Assembler nmenonics.
\r
104 #define __ALIGN__ alignrom 2
\r
105 #define __END__ end
\r
106 #define __EXPORT__ export
\r
107 #define __IMPORT__ import
\r
109 #define __STR__ dcb
\r
110 #define __THUMB_LABEL__ thumb
\r
111 #define __WORD__ dcd
\r
112 #define __INLINE_DATA__ data
\r
116 //*****************************************************************************
\r
118 // The defines required for GCC.
\r
120 //*****************************************************************************
\r
124 // The assembly code preamble required to put the assembler into the correct
\r
131 // Section headers.
\r
133 #define __LIBRARY__ @
\r
134 #define __TEXT__ .text
\r
135 #define __DATA__ .data
\r
136 #define __BSS__ .bss
\r
137 #define __TEXT_NOROOT__ .text
\r
140 // Assembler nmenonics.
\r
142 #define __ALIGN__ .balign 4
\r
143 #define __END__ .end
\r
144 #define __EXPORT__ .globl
\r
145 #define __IMPORT__ .extern
\r
146 #define __LABEL__ :
\r
147 #define __STR__ .ascii
\r
148 #define __THUMB_LABEL__ .thumb_func
\r
149 #define __WORD__ .word
\r
150 #define __INLINE_DATA__
\r
154 //*****************************************************************************
\r
156 // The defines required for RV-MDK.
\r
158 //*****************************************************************************
\r
162 // The assembly code preamble required to put the assembler into the correct
\r
170 // Section headers.
\r
172 #define __LIBRARY__ ;
\r
173 #define __TEXT__ area ||.text||, code, readonly, align=2
\r
174 #define __DATA__ area ||.data||, data, align=2
\r
175 #define __BSS__ area ||.bss||, noinit, align=2
\r
176 #define __TEXT_NOROOT__ area ||.text||, code, readonly, align=2
\r
179 // Assembler nmenonics.
\r
181 #define __ALIGN__ align 4
\r
182 #define __END__ end
\r
183 #define __EXPORT__ export
\r
184 #define __IMPORT__ import
\r
186 #define __STR__ dcb
\r
187 #define __THUMB_LABEL__
\r
188 #define __WORD__ dcd
\r
189 #define __INLINE_DATA__
\r
193 //*****************************************************************************
\r
195 // The defines required for Sourcery G++.
\r
197 //*****************************************************************************
\r
198 #if defined(sourcerygxx)
\r
201 // The assembly code preamble required to put the assembler into the correct
\r
208 // Section headers.
\r
210 #define __LIBRARY__ @
\r
211 #define __TEXT__ .text
\r
212 #define __DATA__ .data
\r
213 #define __BSS__ .bss
\r
214 #define __TEXT_NOROOT__ .text
\r
217 // Assembler nmenonics.
\r
219 #define __ALIGN__ .balign 4
\r
220 #define __END__ .end
\r
221 #define __EXPORT__ .globl
\r
222 #define __IMPORT__ .extern
\r
223 #define __LABEL__ :
\r
224 #define __STR__ .ascii
\r
225 #define __THUMB_LABEL__ .thumb_func
\r
226 #define __WORD__ .word
\r
227 #define __INLINE_DATA__
\r
229 #endif // sourcerygxx
\r
231 #endif // __ASMDEF_H__
\r