RTEMS
5.2
Toggle main menu visibility
Main Page
Related Pages
Modules
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
v
w
Typedefs
a
b
c
d
e
f
g
h
i
l
m
o
p
q
r
s
t
u
v
w
x
Enumerations
a
b
c
e
h
i
l
m
o
p
q
r
s
t
w
Enumerator
a
c
d
h
i
l
m
p
r
s
t
w
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
cpukit
score
cpu
sparc64
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.
24
*/
25
26
#ifndef _RTEMS_ASM_H
27
#define _RTEMS_ASM_H
28
29
/*
30
* Indicate we are in an assembly file and get the basic CPU definitions.
31
*/
32
33
#ifndef ASM
34
#define ASM
35
#endif
36
#ifndef __ASM__
37
#define __ASM__
38
#endif
39
40
#include <rtems/score/cpuopts.h>
41
#include <rtems/score/cpu.h>
42
53
/*
54
* Recent versions of GNU cpp define variables which indicate the
55
* need for underscores and percents. If not using GNU cpp or
56
* the version does not support this, then you will obviously
57
* have to define these as appropriate.
58
*/
59
60
/* XXX __USER_LABEL_PREFIX__ and __REGISTER_PREFIX__ do not work on gcc 2.7.0 */
61
/* XXX The following ifdef magic fixes the problem but results in a warning */
62
/* XXX when compiling assembly code. */
63
64
#ifndef __USER_LABEL_PREFIX__
65
#define __USER_LABEL_PREFIX__ _
66
#endif
67
68
#ifndef __REGISTER_PREFIX__
69
#define __REGISTER_PREFIX__
70
#endif
71
72
#include <
rtems/concat.h
>
73
74
/* Use the right prefix for global labels. */
75
76
#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
77
78
/* Use the right prefix for registers. */
79
80
#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
81
82
/*
83
* define macros for all of the registers on this CPU
84
*
85
* EXAMPLE: #define d0 REG (d0)
86
*/
87
88
/*
89
* Define macros to handle section beginning and ends.
90
*/
91
92
93
#define BEGIN_CODE_DCL .text
94
#define END_CODE_DCL
95
#define BEGIN_DATA_DCL .data
96
#define END_DATA_DCL
97
#define BEGIN_CODE .text
98
#define END_CODE
99
#define BEGIN_DATA
100
#define END_DATA
101
#define BEGIN_BSS
102
#define END_BSS
103
#define END
104
105
/*
106
* Following must be tailor for a particular flavor of the C compiler.
107
* They may need to put underscores in front of the symbols.
108
*/
109
110
#define PUBLIC(sym) .globl SYM (sym)
111
#define EXTERN(sym) .globl SYM (sym)
112
113
#endif
114
concat.h
Generated by
1.9.4