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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [mips/] [arch/] [current/] [include/] [mips.inc] - Blame information for rev 856

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

Line No. Rev Author Line
1 786 skrzyp
#ifndef CYGONCE_HAL_MIPS_INC
2
#define CYGONCE_HAL_MIPS_INC
3
 
4
##=============================================================================
5
##
6
##      mips.inc
7
##
8
##      MIPS assembler header file
9
##
10
##=============================================================================
11
## ####ECOSGPLCOPYRIGHTBEGIN####
12
## -------------------------------------------
13
## This file is part of eCos, the Embedded Configurable Operating System.
14
## Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
15
##
16
## eCos is free software; you can redistribute it and/or modify it under
17
## the terms of the GNU General Public License as published by the Free
18
## Software Foundation; either version 2 or (at your option) any later
19
## version.
20
##
21
## eCos is distributed in the hope that it will be useful, but WITHOUT
22
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
23
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
24
## for more details.
25
##
26
## You should have received a copy of the GNU General Public License
27
## along with eCos; if not, write to the Free Software Foundation, Inc.,
28
## 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
29
##
30
## As a special exception, if other files instantiate templates or use
31
## macros or inline functions from this file, or you compile this file
32
## and link it with other works to produce a work based on this file,
33
## this file does not by itself cause the resulting work to be covered by
34
## the GNU General Public License. However the source code for this file
35
## must still be made available in accordance with section (3) of the GNU
36
## General Public License v2.
37
##
38
## This exception does not invalidate any other reasons why a work based
39
## on this file might be covered by the GNU General Public License.
40
## -------------------------------------------
41
## ####ECOSGPLCOPYRIGHTEND####
42
##=============================================================================
43
#######DESCRIPTIONBEGIN####
44
##
45
## Author(s):   nickg
46
## Contributors:        nickg
47
## Date:        1997-10-16
48
## Purpose:     MIPS definitions.
49
## Description: This file contains various definitions and macros that are
50
##              useful for writing assembly code for the MIPS CPU family.
51
## Usage:
52
##              #include 
53
##              ...
54
##
55
##
56
######DESCRIPTIONEND####
57
##
58
##=============================================================================
59
 
60
##-----------------------------------------------------------------------------
61
## Standard MIPS register names:
62
 
63
#define zero    $0
64
#define z0      $0
65
#define v0      $2
66
#define v1      $3
67
#define a0      $4
68
#define a1      $5
69
#define a2      $6
70
#define a3      $7
71
#define t0      $8
72
#define t1      $9
73
#define t2      $10
74
#define t3      $11
75
#define t4      $12
76
#define t5      $13
77
#define t6      $14
78
#define t7      $15
79
#define s0      $16
80
#define s1      $17
81
#define s2      $18
82
#define s3      $19
83
#define s4      $20
84
#define s5      $21
85
#define s6      $22
86
#define s7      $23
87
#define t8      $24
88
#define t9      $25
89
#define k0      $26     /* kernel private register 0 */
90
#define k1      $27     /* kernel private register 1 */
91
#define gp      $28     /* global data pointer */
92
#define sp      $29     /* stack-pointer */
93
#define fp      $30     /* frame-pointer */
94
#define ra      $31     /* return address */
95
#define pc      $pc     /* pc, used on mips16 */
96
 
97
#define f0      $f0
98
#define f1      $f1
99
#define f2      $f2
100
#define f3      $f3
101
#define f4      $f4
102
#define f5      $f5
103
#define f6      $f6
104
#define f7      $f7
105
#define f8      $f8
106
#define f9      $f9
107
#define f10     $f10
108
#define f11     $f11
109
#define f12     $f12
110
#define f13     $f13
111
#define f14     $f14
112
#define f15     $f15
113
#define f16     $f16
114
#define f17     $f17
115
#define f18     $f18
116
#define f19     $f19
117
#define f20     $f20
118
#define f21     $f21
119
#define f22     $f22
120
#define f23     $f23
121
#define f24     $f24
122
#define f25     $f25
123
#define f26     $f26
124
#define f27     $f27
125
#define f28     $f28
126
#define f29     $f29
127
#define f30     $f30
128
#define f31     $f31
129
 
130
// Coprocessor 0 registers
131
 
132
#define index           $0      // TLB entry index register
133
#define random          $1      // TLB random index register
134
#define tlblo0          $2      // TLB even page entry register
135
#define tlblo1          $3      // TLB odd page entry register
136
#define config          $3      // Configuration register (TX39 only)
137
#define context         $4      // TLB context register
138
#define pagemask        $5      // TLB page size mask
139
#define wired           $6      // TLB wired boundary
140
#define cachectrl       $7      // Cache control
141
#define badvr           $8      // Bad virtual address
142
#define count           $9      // Timer cycle count register
143
#define tlbhi           $10     // TLB virtual address match register
144
#define compare         $11     // Timer compare register
145
#define status          $12     // Status register
146
#define cause           $13     // Exception cause
147
#define epc             $14     // Exception pc value
148
#define prid            $15     // processor ID
149
#define config0         $16     // Config register 0
150
#define lladdr          $17     // LLAdddr
151
#define xcontext        $20     // XContext register
152
#define ecc             $26     // Error Checking and Correcting
153
#define cache_err       $27     // Cache Error and Status
154
#define taglo           $28     // TagLo
155
#define taghi           $29     // TagHi
156
#define error_epc       $30     // Error exception pc value
157
 
158
 
159
#------------------------------------------------------------------------------
160
 
161
#define FUNC_START(name)        \
162
        .type name,@function;   \
163
        .set push ;             \
164
        .globl name;            \
165
        .ent   name;            \
166
        .set noreorder ;        \
167
name:
168
 
169
#define FUNC_END(name)          \
170
name##_end:                     \
171
        .set pop;               \
172
        .end name               \
173
 
174
#------------------------------------------------------------------------------
175
#endif // ifndef CYGONCE_HAL_MIPS_INC
176
# end of mips.inc

powered by: WebSVN 2.1.0

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