RTEMS
5.0.0
cpukit
score
cpu
mips
include
rtems
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
/* @(#)asm.h 03/15/96 1.1 */
29
30
#ifndef _RTEMS_ASM_H
31
#define _RTEMS_ASM_H
32
33
/*
34
* Indicate we are in an assembly file and get the basic CPU definitions.
35
*/
36
37
#ifndef ASM
38
#define ASM
39
#endif
40
#include <rtems/score/cpuopts.h>
41
#include <
rtems/score/mips.h
>
42
43
/*
44
* Recent versions of GNU cpp define variables which indicate the
45
* need for underscores and percents. If not using GNU cpp or
46
* the version does not support this, then you will obviously
47
* have to define these as appropriate.
48
*/
49
50
#ifndef __USER_LABEL_PREFIX__
51
#define __USER_LABEL_PREFIX__ _
52
#endif
53
54
#ifndef __REGISTER_PREFIX__
55
#define __REGISTER_PREFIX__
56
#endif
57
58
#include <
rtems/concat.h
>
59
60
/* Use the right prefix for global labels. */
61
62
#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
63
64
/* Use the right prefix for registers. */
65
66
#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
67
68
/*
69
* define macros for all of the registers on this CPU
70
*
71
* EXAMPLE: #define d0 REG (d0)
72
*/
73
74
/*
75
* Define macros to handle section beginning and ends.
76
*/
77
78
79
#define BEGIN_CODE_DCL .text
80
#define END_CODE_DCL
81
#define BEGIN_DATA_DCL .data
82
#define END_DATA_DCL
83
#define BEGIN_CODE .text
84
#define END_CODE
85
#define BEGIN_DATA
86
#define END_DATA
87
#define BEGIN_BSS
88
#define END_BSS
89
#define END
90
91
/*
92
* Following must be tailor for a particular flavor of the C compiler.
93
* They may need to put underscores in front of the symbols.
94
*/
95
96
#define PUBLIC(sym) .globl SYM (sym)
97
#define EXTERN(sym) .globl SYM (sym)
98
99
/*
100
* Debugger macros for assembly language routines. Allows the
101
* programmer to set up the necessary stack frame info
102
* required by debuggers to do stack traces.
103
*/
104
105
#ifndef XDS
106
#define FRAME(name,frm_reg,offset,ret_reg) \
107
.globl name; \
108
.ent name; \
109
name:; \
110
.frame frm_reg,offset,ret_reg
111
#define ENDFRAME(name) \
112
.end name
113
#else
114
#define FRAME(name,frm_reg,offset,ret_reg) \
115
.globl _##name;\
116
_##name:
117
#define ENDFRAME(name)
118
#endif
/* XDS */
119
120
/*
121
* Hardware Floating Point Registers
122
*/
123
124
#define R_FP0 0
125
#define R_FP1 1
126
#define R_FP2 2
127
#define R_FP3 3
128
#define R_FP4 4
129
#define R_FP5 5
130
#define R_FP6 6
131
#define R_FP7 7
132
#define R_FP8 8
133
#define R_FP9 9
134
#define R_FP10 10
135
#define R_FP11 11
136
#define R_FP12 12
137
#define R_FP13 13
138
#define R_FP14 14
139
#define R_FP15 15
140
#define R_FP16 16
141
#define R_FP17 17
142
#define R_FP18 18
143
#define R_FP19 19
144
#define R_FP20 20
145
#define R_FP21 21
146
#define R_FP22 22
147
#define R_FP23 23
148
#define R_FP24 24
149
#define R_FP25 25
150
#define R_FP26 26
151
#define R_FP27 27
152
#define R_FP28 28
153
#define R_FP29 29
154
#define R_FP30 30
155
#define R_FP31 31
156
157
#endif
158
/* end of include file */
159
concat.h
mips.h
Information to build RTEMS for a "no cpu" while in protected mode.
Generated by
1.8.13