00001 /* $OpenBSD: regdef.h,v 1.3 1999/01/27 04:46:06 imp Exp $ */ 00002 00003 /* 00004 * Copyright (c) 1992, 1993 00005 * The Regents of the University of California. All rights reserved. 00006 * 00007 * This code is derived from software contributed to Berkeley by 00008 * Ralph Campbell. This file is derived from the MIPS RISC 00009 * Architecture book by Gerry Kane. 00010 * 00011 * Redistribution and use in source and binary forms, with or without 00012 * modification, are permitted provided that the following conditions 00013 * are met: 00014 * 1. Redistributions of source code must retain the above copyright 00015 * notice, this list of conditions and the following disclaimer. 00016 * 2. Redistributions in binary form must reproduce the above copyright 00017 * notice, this list of conditions and the following disclaimer in the 00018 * documentation and/or other materials provided with the distribution. 00019 * 3. All advertising materials mentioning features or use of this software 00020 * must display the following acknowledgement: 00021 * This product includes software developed by the University of 00022 * California, Berkeley and its contributors. 00023 * 4. Neither the name of the University nor the names of its contributors 00024 * may be used to endorse or promote products derived from this software 00025 * without specific prior written permission. 00026 * 00027 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 00028 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00029 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00030 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 00031 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00032 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 00033 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00034 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00035 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 00036 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00037 * SUCH DAMAGE. 00038 * 00039 * @(#)regdef.h 8.1 (Berkeley) 6/10/93 00040 */ 00041 #ifndef _MIPS_REGDEF_H_ 00042 #define _MIPS_REGDEF_H_ 00043 00044 #define zero $0 /* always zero */ 00045 #define AT $at /* assembler temp */ 00046 #define at $at /* assembler temp */ 00047 #define v0 $2 /* return value */ 00048 #define v1 $3 00049 #define a0 $4 /* argument registers */ 00050 #define a1 $5 00051 #define a2 $6 00052 #define a3 $7 00053 #define t0 $8 /* temp registers (not saved across subroutine calls) */ 00054 #define t1 $9 00055 #define t2 $10 00056 #define t3 $11 00057 #define t4 $12 00058 #define t5 $13 00059 #define t6 $14 00060 #define t7 $15 00061 #define s0 $16 /* saved across subroutine calls (callee saved) */ 00062 #define s1 $17 00063 #define s2 $18 00064 #define s3 $19 00065 #define s4 $20 00066 #define s5 $21 00067 #define s6 $22 00068 #define s7 $23 00069 #define t8 $24 /* two more temp registers */ 00070 #define t9 $25 00071 #define k0 $26 /* kernel temporary */ 00072 #define k1 $27 00073 #define gp $28 /* global pointer */ 00074 #define sp $29 /* stack pointer */ 00075 #define s8 $30 /* one more callee saved */ 00076 #define ra $31 /* return address */ 00077 00078 #define c0_index $0 00079 #define c0_random $1 00080 #define c0_entrylo0 $2 00081 #define c0_entrylo1 $3 00082 #define c0_conf $3 00083 #define c0_context $4 00084 #define c0_pagemask $5 00085 #define c0_wired $6 00086 #define c0_info $7 00087 #define c0_badvaddr $8 00088 #define c0_count $9 00089 #define c0_entryhi $10 00090 #define c0_compare $11 00091 #define c0_status $12 00092 #define c0_cause $13 00093 #define c0_epc $14 00094 #define c0_prid $15 00095 #define c0_config $16 00096 #define c0_lladdr $17 00097 #define c0_watchlo $18 00098 #define c0_watchhi $19 00099 #define c0_xcontext $20 00100 #define c0_framemask $21 00101 #define c0_diagnostic $22 00102 #define c0_debug $23 00103 #define c0_depc $24 00104 #define c0_performance $25 00105 #define c0_ecc $26 00106 #define c0_cacheerr $27 00107 #define c0_taglo $28 00108 #define c0_taghi $29 00109 #define c0_errorepc $30 00110 #define c0_desave $31 00111 00112 #endif /* !_MIPS_REGDEF_H_ */
1.5.6