root/kern/arch/mips/include/kern/regdefs.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009
   3  *      The President and Fellows of Harvard College.
   4  *
   5  * Redistribution and use in source and binary forms, with or without
   6  * modification, are permitted provided that the following conditions
   7  * are met:
   8  * 1. Redistributions of source code must retain the above copyright
   9  *    notice, this list of conditions and the following disclaimer.
  10  * 2. Redistributions in binary form must reproduce the above copyright
  11  *    notice, this list of conditions and the following disclaimer in the
  12  *    documentation and/or other materials provided with the distribution.
  13  * 3. Neither the name of the University nor the names of its contributors
  14  *    may be used to endorse or promote products derived from this software
  15  *    without specific prior written permission.
  16  *
  17  * THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
  18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20  * ARE DISCLAIMED.  IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
  21  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  27  * SUCH DAMAGE.
  28  */
  29 
  30 /*
  31  * Macros for general-purpose register numbers for MIPS.
  32  *
  33  * Exported to userlevel because it's ~standard for that architecture.
  34  */
  35 
  36 #ifndef _KERN_MIPS_REGDEFS_H_
  37 #define _KERN_MIPS_REGDEFS_H_
  38 
  39 
  40 #define z0  $0     /* always zero register */
  41 #define AT  $1     /* assembler temp register */
  42 #define v0  $2     /* value 0 */
  43 #define v1  $3     /* value 1 */
  44 #define a0  $4     /* argument 0 */
  45 #define a1  $5     /* argument 1 */
  46 #define a2  $6     /* argument 2 */
  47 #define a3  $7     /* argument 3 */
  48 #define t0  $8     /* temporary (caller-save) 0 */
  49 #define t1  $9     /* temporary (caller-save) 1 */
  50 #define t2  $10    /* temporary (caller-save) 2 */
  51 #define t3  $11    /* temporary (caller-save) 3 */
  52 #define t4  $12    /* temporary (caller-save) 4 */
  53 #define t5  $13    /* temporary (caller-save) 5 */
  54 #define t6  $14    /* temporary (caller-save) 6 */
  55 #define t7  $15    /* temporary (caller-save) 7 */
  56 #define s0  $16    /* saved (callee-save) 0 */
  57 #define s1  $17    /* saved (callee-save) 1 */
  58 #define s2  $18    /* saved (callee-save) 2 */
  59 #define s3  $19    /* saved (callee-save) 3 */
  60 #define s4  $20    /* saved (callee-save) 4 */
  61 #define s5  $21    /* saved (callee-save) 5 */
  62 #define s6  $22    /* saved (callee-save) 6 */
  63 #define s7  $23    /* saved (callee-save) 7 */
  64 #define t8  $24    /* temporary (caller-save) 8 */
  65 #define t9  $25    /* temporary (caller-save) 9 */
  66 #define k0  $26    /* kernel temporary 0 */
  67 #define k1  $27    /* kernel temporary 1 */
  68 #define gp  $28    /* global pointer */
  69 #define sp  $29    /* stack pointer */
  70 #define s8  $30    /* saved (callee-save) 8 = frame pointer */
  71 #define ra  $31    /* return address */
  72 
  73 
  74 #endif /* _KERN_MIPS_REGDEFS_H_ */

/* [<][>][^][v][top][bottom][index][help] */