Back to index

glibc  2.9
regdef.h
Go to the documentation of this file.
00001 /* Copyright (C) 1997, 1998, 2002, 2003, 2004 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003    Contributed by Ralf Baechle <ralf@gnu.org>.
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA.  */
00019 
00020 #ifndef _SYS_REGDEF_H
00021 #define _SYS_REGDEF_H
00022 
00023 #include <sgidefs.h>
00024 
00025 /*
00026  * Symbolic register names for 32 bit ABI
00027  */
00028 #define zero    $0      /* wired zero */
00029 #define AT      $1      /* assembler temp  - uppercase because of ".set at" */
00030 #define v0      $2      /* return value */
00031 #define v1      $3
00032 #define a0      $4      /* argument registers */
00033 #define a1      $5
00034 #define a2      $6
00035 #define a3      $7
00036 #if _MIPS_SIM != _ABIO32
00037 #define a4      $8
00038 #define a5      $9
00039 #define a6      $10
00040 #define a7      $11
00041 #define t0      $12
00042 #define t1      $13
00043 #define t2      $14
00044 #define t3      $15
00045 #define ta0     a4
00046 #define ta1     a5
00047 #define ta2     a6
00048 #define ta3     a7
00049 #else /* if _MIPS_SIM == _ABIO32 */
00050 #define t0      $8      /* caller saved */
00051 #define t1      $9
00052 #define t2      $10
00053 #define t3      $11
00054 #define t4      $12
00055 #define t5      $13
00056 #define t6      $14
00057 #define t7      $15
00058 #define ta0     t4
00059 #define ta1     t5
00060 #define ta2     t6
00061 #define ta3     t7
00062 #endif /* _MIPS_SIM == _ABIO32 */
00063 #define s0      $16     /* callee saved */
00064 #define s1      $17
00065 #define s2      $18
00066 #define s3      $19
00067 #define s4      $20
00068 #define s5      $21
00069 #define s6      $22
00070 #define s7      $23
00071 #define t8      $24     /* caller saved */
00072 #define t9      $25
00073 #define jp      $25     /* PIC jump register */
00074 #define k0      $26     /* kernel scratch */
00075 #define k1      $27
00076 #define gp      $28     /* global pointer */
00077 #define sp      $29     /* stack pointer */
00078 #define fp      $30     /* frame pointer */
00079 #define s8    $30    /* same like fp! */
00080 #define ra      $31     /* return address */
00081 
00082 #endif /* _SYS_REGDEF_H */