RTEMS CPU Kit with SuperCore  4.11.3
asm.h
Go to the documentation of this file.
1 
17 /*
18  * COPYRIGHT:
19  *
20  * This file is based on similar code found in newlib available
21  * from ftp.cygnus.com. The file which was used had no copyright
22  * notice. This file is freely distributable as long as the source
23  * of the file is noted. This file is:
24  *
25  * COPYRIGHT (c) 1994-1997.
26  * On-Line Applications Research Corporation (OAR).
27  */
28 
29 #ifndef _RTEMS_ASM_H
30 #define _RTEMS_ASM_H
31 
32 /*
33  * Indicate we are in an assembly file and get the basic CPU definitions.
34  */
35 
36 #ifndef ASM
37 #define ASM
38 #endif
39 #include <rtems/score/cpuopts.h>
40 #include <rtems/score/nios2.h>
41 
42 /*
43  * Recent versions of GNU cpp define variables which indicate the
44  * need for underscores and percents. If not using GNU cpp or
45  * the version does not support this, then you will obviously
46  * have to define these as appropriate.
47  */
48 
49 #ifndef __USER_LABEL_PREFIX__
50 #define __USER_LABEL_PREFIX__ _
51 #endif
52 
53 #ifndef __REGISTER_PREFIX__
54 #define __REGISTER_PREFIX__
55 #endif
56 
57 #include <rtems/concat.h>
58 
59 /* Use the right prefix for global labels. */
60 
61 #define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
62 
63 /* Use the right prefix for registers. */
64 
65 #define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
66 
67 /*
68  * define macros for all of the registers on this CPU
69  *
70  * EXAMPLE: #define d0 REG (d0)
71  */
72 
73 /*
74  * Define macros to handle section beginning and ends.
75  */
76 
77 
78 #define BEGIN_CODE_DCL .text
79 #define END_CODE_DCL
80 #define BEGIN_DATA_DCL .data
81 #define END_DATA_DCL
82 #define BEGIN_CODE .text
83 #define END_CODE
84 #define BEGIN_DATA
85 #define END_DATA
86 #define BEGIN_BSS
87 #define END_BSS
88 #define END
89 
90 /*
91  * Following must be tailor for a particular flavor of the C compiler.
92  * They may need to put underscores in front of the symbols.
93  */
94 
95 #define PUBLIC(sym) .globl SYM (sym)
96 #define EXTERN(sym) .globl SYM (sym)
97 
98 #endif
NIOS II Set up Basic CPU Dependency Settings Based on Compiler Settings.
This include file defines ANSI concatenation macros.