1 #ifndef CYGONCE_HAL_MIPS_INC
2 #define CYGONCE_HAL_MIPS_INC
4 ##=============================================================================
8 ## MIPS assembler header file
10 ##=============================================================================
11 #####ECOSGPLCOPYRIGHTBEGIN####
12 ## -------------------------------------------
13 ## This file is part of eCos, the Embedded Configurable Operating System.
14 ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
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 version.
20 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
21 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
22 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
25 ## You should have received a copy of the GNU General Public License along
26 ## with eCos; if not, write to the Free Software Foundation, Inc.,
27 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
29 ## As a special exception, if other files instantiate templates or use macros
30 ## or inline functions from this file, or you compile this file and link it
31 ## with other works to produce a work based on this file, this file does not
32 ## by itself cause the resulting work to be covered by the GNU General Public
33 ## License. However the source code for this file must still be made available
34 ## in accordance with section (3) of the GNU General Public License.
36 ## This exception does not invalidate any other reasons why a work based on
37 ## this file might be covered by the GNU General Public License.
39 ## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
40 ## at http://sources.redhat.com/ecos/ecos-license/
41 ## -------------------------------------------
42 #####ECOSGPLCOPYRIGHTEND####
43 ##=============================================================================
44 #######DESCRIPTIONBEGIN####
47 ## Contributors: nickg
49 ## Purpose: MIPS definitions.
50 ## Description: This file contains various definitions and macros that are
51 ## useful for writing assembly code for the MIPS CPU family.
53 ## #include <cyg/hal/mips.inc>
57 ######DESCRIPTIONEND####
59 ##=============================================================================
61 ##-----------------------------------------------------------------------------
62 ## Standard MIPS register names:
90 #define k0 $26 /* kernel private register 0 */
91 #define k1 $27 /* kernel private register 1 */
92 #define gp $28 /* global data pointer */
93 #define sp $29 /* stack-pointer */
94 #define fp $30 /* frame-pointer */
95 #define ra $31 /* return address */
96 #define pc $pc /* pc, used on mips16 */
131 // Coprocessor 0 registers
133 #define index $0 // TLB entry index register
134 #define random $1 // TLB random index register
135 #define tlblo0 $2 // TLB even page entry register
136 #define tlblo1 $3 // TLB odd page entry register
137 #define config $3 // Configuration register (TX39 only)
138 #define context $4 // TLB context register
139 #define pagemask $5 // TLB page size mask
140 #define wired $6 // TLB wired boundary
141 #define cachectrl $7 // Cache control
142 #define badvr $8 // Bad virtual address
143 #define count $9 // Timer cycle count register
144 #define tlbhi $10 // TLB virtual address match register
145 #define compare $11 // Timer compare register
146 #define status $12 // Status register
147 #define cause $13 // Exception cause
148 #define epc $14 // Exception pc value
149 #define prid $15 // processor ID
150 #define config0 $16 // Config register 0
151 #define lladdr $17 // LLAdddr
152 #define xcontext $20 // XContext register
153 #define ecc $26 // Error Checking and Correcting
154 #define cache_err $27 // Cache Error and Status
155 #define taglo $28 // TagLo
156 #define taghi $29 // TagHi
157 #define error_epc $30 // Error exception pc value
160 #------------------------------------------------------------------------------
162 #define FUNC_START(name) \
163 .type name,@function; \
170 #define FUNC_END(name) \
175 #------------------------------------------------------------------------------
176 #endif // ifndef CYGONCE_HAL_MIPS_INC