OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [score/] [cpu/] [mips64orion/] [iregdef.h] - Blame information for rev 389

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
2
 
3
Based upon IDT provided code with the following release:
4
 
5
This source code has been made available to you by IDT on an AS-IS
6
basis. Anyone receiving this source is licensed under IDT copyrights
7
to use it in any way he or she deems fit, including copying it,
8
modifying it, compiling it, and redistributing it either with or
9
without modifications.  No license under IDT patents or patent
10
applications is to be implied by the copyright license.
11
 
12
Any user of this software should understand that IDT cannot provide
13
technical support for this software and will not be responsible for
14
any consequences resulting from the use of this software.
15
 
16
Any person who transfers this source code or any derivative work must
17
include the IDT copyright notice, this paragraph, and the preceeding
18
two paragraphs in the transferred software.
19
 
20
COPYRIGHT IDT CORPORATION 1996
21
LICENSED MATERIAL - PROGRAM PROPERTY OF IDT
22
 
23
  $Id: iregdef.h,v 1.2 2001-09-27 11:59:28 chris Exp $
24
*/
25
 
26
/*
27
**      iregdef.h - IDT R3000 register structure header file
28
**
29
**      Copyright 1989 Integrated Device Technology, Inc
30
**      All Rights Reserved
31
**
32
*/
33
#ifndef __IREGDEF_H__
34
#define __IREGDEF_H__
35
 
36
/*
37
 * 950313: Ketan added sreg/lreg and R_SZ for 64-bit saves
38
 *         added Register definition for XContext reg.
39
 *         Look towards end of this file.
40
 */
41
/*
42
** register names
43
*/
44
#define r0      $0
45
#define r1      $1
46
#define r2      $2
47
#define r3      $3
48
#define r4      $4
49
#define r5      $5
50
#define r6      $6
51
#define r7      $7
52
#define r8      $8
53
#define r9      $9
54
#define r10     $10
55
#define r11     $11
56
#define r12     $12
57
#define r13     $13
58
 
59
#define r14     $14
60
#define r15     $15
61
#define r16     $16
62
#define r17     $17
63
#define r18     $18
64
#define r19     $19
65
#define r20     $20
66
#define r21     $21
67
#define r22     $22
68
#define r23     $23
69
#define r24     $24
70
#define r25     $25
71
#define r26     $26
72
#define r27     $27
73
#define r28     $28
74
#define r29     $29
75
#define r30     $30
76
#define r31     $31
77
 
78
#define fp0     $f0
79
#define fp1     $f1
80
#define fp2     $f2
81
#define fp3     $f3
82
#define fp4     $f4
83
#define fp5     $f5
84
#define fp6     $f6
85
#define fp7     $f7
86
#define fp8     $f8
87
#define fp9     $f9
88
#define fp10    $f10
89
#define fp11    $f11
90
#define fp12    $f12
91
#define fp13    $f13
92
#define fp14    $f14
93
#define fp15    $f15
94
#define fp16    $f16
95
#define fp17    $f17
96
#define fp18    $f18
97
#define fp19    $f19
98
#define fp20    $f20
99
#define fp21    $f21
100
#define fp22    $f22
101
#define fp23    $f23
102
#define fp24    $f24
103
#define fp25    $f25
104
#define fp26    $f26
105
#define fp27    $f27
106
#define fp28    $f28
107
#define fp29    $f29
108
#define fp30    $f30
109
#define fp31    $f31
110
 
111
#define fcr0    $0
112
#define fcr30   $30
113
#define fcr31   $31
114
 
115
#define zero    $0      /* wired zero */
116
#define AT      $at     /* assembler temp */
117
#define v0      $2      /* return value */
118
#define v1      $3
119
#define a0      $4      /* argument registers a0-a3 */
120
#define a1      $5
121
#define a2      $6
122
#define a3      $7
123
#define t0      $8      /* caller saved  t0-t9 */
124
#define t1      $9
125
#define t2      $10
126
#define t3      $11
127
#define t4      $12
128
#define t5      $13
129
#define t6      $14
130
#define t7      $15
131
#define s0      $16     /* callee saved s0-s8 */
132
#define s1      $17
133
#define s2      $18
134
#define s3      $19
135
#define s4      $20
136
#define s5      $21
137
#define s6      $22
138
#define s7      $23
139
#define t8      $24
140
#define t9      $25
141
#define k0      $26     /* kernel usage */
142
#define k1      $27     /* kernel usage */
143
#define gp      $28     /* sdata pointer */
144
#define sp      $29     /* stack pointer */
145
#define s8      $30     /* yet another saved reg for the callee */
146
#define fp      $30     /* frame pointer - this is being phased out by MIPS */
147
#define ra      $31     /* return address */
148
 
149
 
150
/*
151
** relative position of registers in save reg area
152
*/
153
#define R_R0            0
154
#define R_R1            1
155
#define R_R2            2
156
#define R_R3            3
157
#define R_R4            4
158
#define R_R5            5
159
#define R_R6            6
160
#define R_R7            7
161
#define R_R8            8
162
#define R_R9            9
163
#define R_R10           10
164
#define R_R11           11
165
#define R_R12           12
166
#define R_R13           13
167
#define R_R14           14
168
#define R_R15           15
169
#define R_R16           16
170
#define R_R17           17
171
#define R_R18           18
172
#define R_R19           19
173
#define R_R20           20
174
#define R_R21           21
175
#define R_R22           22
176
#define R_R23           23
177
#define R_R24           24
178
#define R_R25           25
179
#define R_R26           26
180
#define R_R27           27
181
#define R_R28           28
182
#define R_R29           29
183
#define R_R30           30
184
#define R_R31           31
185
#define R_F0            32
186
#define R_F1            33
187
#define R_F2            34
188
#define R_F3            35
189
#define R_F4            36
190
#define R_F5            37
191
#define R_F6            38
192
#define R_F7            39
193
#define R_F8            40
194
#define R_F9            41
195
#define R_F10           42
196
#define R_F11           43
197
#define R_F12           44
198
#define R_F13           45
199
#define R_F14           46
200
#define R_F15           47
201
#define R_F16           48
202
#define R_F17           49
203
#define R_F18           50
204
#define R_F19           51
205
#define R_F20           52
206
#define R_F21           53
207
#define R_F22           54
208
#define R_F23           55
209
#define R_F24           56
210
#define R_F25           57
211
#define R_F26           58
212
#define R_F27           59
213
#define R_F28           60
214
#define R_F29           61
215
#define R_F30           62
216
#define R_F31           63
217
#define NCLIENTREGS     64
218
#define R_EPC           64
219
#define R_MDHI          65
220
#define R_MDLO          66
221
#define R_SR            67
222
#define R_CAUSE         68
223
#define R_TLBHI         69
224
#if defined(CPU_R3000)
225
#define R_TLBLO         70
226
#endif
227
#if defined(CPU_R4000)
228
#define R_TLBLO0        70
229
#endif
230
#define R_BADVADDR      71
231
#define R_INX           72
232
#define R_RAND          73
233
#define R_CTXT          74
234
#define R_EXCTYPE       75
235
#define R_MODE          76
236
#define R_PRID          77
237
#define R_FCSR          78
238
#define R_FEIR          79
239
#if defined(CPU_R3000)
240
#define NREGS           80
241
#endif
242
#if defined(CPU_R4000)
243
#define R_TLBLO1        80
244
#define R_PAGEMASK      81
245
#define R_WIRED         82
246
#define R_COUNT         83
247
#define R_COMPARE       84
248
#define R_CONFIG        85
249
#define R_LLADDR        86
250
#define R_WATCHLO       87
251
#define R_WATCHHI       88
252
#define R_ECC           89
253
#define R_CACHEERR      90
254
#define R_TAGLO         91
255
#define R_TAGHI         92
256
#define R_ERRPC         93
257
#define R_XCTXT     94  /* Ketan added from SIM64bit */
258
 
259
#define NREGS           95
260
#endif
261
 
262
/*
263
** For those who like to think in terms of the compiler names for the regs
264
*/
265
#define R_ZERO          R_R0
266
#define R_AT            R_R1
267
#define R_V0            R_R2
268
#define R_V1            R_R3
269
#define R_A0            R_R4
270
#define R_A1            R_R5
271
#define R_A2            R_R6
272
#define R_A3            R_R7
273
#define R_T0            R_R8
274
#define R_T1            R_R9
275
#define R_T2            R_R10
276
#define R_T3            R_R11
277
#define R_T4            R_R12
278
#define R_T5            R_R13
279
#define R_T6            R_R14
280
#define R_T7            R_R15
281
#define R_S0            R_R16
282
#define R_S1            R_R17
283
#define R_S2            R_R18
284
#define R_S3            R_R19
285
#define R_S4            R_R20
286
#define R_S5            R_R21
287
#define R_S6            R_R22
288
#define R_S7            R_R23
289
#define R_T8            R_R24
290
#define R_T9            R_R25
291
#define R_K0            R_R26
292
#define R_K1            R_R27
293
#define R_GP            R_R28
294
#define R_SP            R_R29
295
#define R_FP            R_R30
296
#define R_RA            R_R31
297
 
298
/* Ketan added the following */
299
#ifdef CPU_R3000
300
#define sreg    sw
301
#define lreg    lw
302
#define rmfc0   mfc0
303
#define rmtc0   mtc0
304
#define R_SZ    4
305
#endif CPU_R3000
306
 
307
#ifdef CPU_R4000
308
#if __mips < 3
309
#define sreg    sw
310
#define lreg    lw
311
#define rmfc0   mfc0
312
#define rmtc0   mtc0
313
#define R_SZ    4
314
#else
315
#define sreg    sd
316
#define lreg    ld
317
#define rmfc0   dmfc0
318
#define rmtc0   dmtc0
319
#define R_SZ    8
320
#endif
321
#endif CPU_R4000
322
/* Ketan till here */
323
 
324
#endif /* __IREGDEF_H__ */
325
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.