RTEMS
6.3
Toggle main menu visibility
Loading...
Searching...
No Matches
cpukit
score
cpu
or1k
include
rtems
asm.h
Go to the documentation of this file.
1
10
11
/*
12
* NOTE: The spacing in the use of these macros
13
* is critical to them working as advertised.
14
*
15
* COPYRIGHT:
16
*
17
* This file is based on similar code found in newlib available
18
* from ftp.cygnus.com. The file which was used had no copyright
19
* notice. This file is freely distributable as long as the source
20
* of the file is noted. This file is:
21
*
22
* COPYRIGHT (c) 1994-1997.
23
* On-Line Applications Research Corporation (OAR).
24
*
25
*/
26
27
#ifndef __OR1K_ASM_h
28
#define __OR1K_ASM_h
29
30
/*
31
* Indicate we are in an assembly file and get the basic CPU definitions.
32
*/
33
34
#ifndef ASM
35
#define ASM
36
#endif
37
#include <rtems/score/cpuopts.h>
38
#include <
rtems/score/or1k.h
>
39
49
50
/*
51
* Recent versions of GNU cpp define variables which indicate the
52
* need for underscores and percents. If not using GNU cpp or
53
* the version does not support this, then you will obviously
54
* have to define these as appropriate.
55
*/
56
57
#ifndef __USER_LABEL_PREFIX__
58
#define __USER_LABEL_PREFIX__ _
59
#endif
60
61
#ifndef __REGISTER_PREFIX__
62
#define __REGISTER_PREFIX__
63
#endif
64
65
/* ANSI concatenation macros. */
66
67
#define CONCAT1(a, b) CONCAT2(a, b)
68
#define CONCAT2(a, b) a ## b
69
70
/* Use the right prefix for global labels. */
71
72
#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
73
74
/* Use the right prefix for registers. */
75
76
#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
77
78
/*
79
* define macros for all of the registers on this CPU
80
*
81
* EXAMPLE: #define d0 REG (d0)
82
*/
83
84
/*
85
* Define macros to handle section beginning and ends.
86
*/
87
88
89
#define BEGIN_CODE_DCL .text
90
#define END_CODE_DCL
91
#define BEGIN_DATA_DCL .data
92
#define END_DATA_DCL
93
#define BEGIN_CODE .text
94
#define END_CODE
95
#define BEGIN_DATA
96
#define END_DATA
97
#define BEGIN_BSS
98
#define END_BSS
99
#define END
100
101
/*
102
* Following must be tailor for a particular flavor of the C compiler.
103
* They may need to put underscores in front of the symbols.
104
*/
105
106
#define PUBLIC(sym) .global SYM (sym)
107
#define EXTERN(sym) .global SYM (sym)
108
110
111
#endif
or1k.h
Generated by
1.18.0