(root)/
glibc-2.38/
sysdeps/
mips/
sys/
regdef.h
       1  /* Copyright (C) 1997-2023 Free Software Foundation, Inc.
       2     This file is part of the GNU C Library.
       3  
       4     The GNU C Library is free software; you can redistribute it and/or
       5     modify it under the terms of the GNU Lesser General Public
       6     License as published by the Free Software Foundation; either
       7     version 2.1 of the License, or (at your option) any later version.
       8  
       9     The GNU C Library is distributed in the hope that it will be useful,
      10     but WITHOUT ANY WARRANTY; without even the implied warranty of
      11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      12     Lesser General Public License for more details.
      13  
      14     You should have received a copy of the GNU Lesser General Public
      15     License along with the GNU C Library.  If not, see
      16     <https://www.gnu.org/licenses/>.  */
      17  
      18  #ifndef _SYS_REGDEF_H
      19  #define _SYS_REGDEF_H
      20  
      21  #include <sgidefs.h>
      22  
      23  /*
      24   * Symbolic register names for 32 bit ABI
      25   */
      26  #define zero    $0      /* wired zero */
      27  #define AT      $1      /* assembler temp  - uppercase because of ".set at" */
      28  #define v0      $2      /* return value */
      29  #define v1      $3
      30  #define a0      $4      /* argument registers */
      31  #define a1      $5
      32  #define a2      $6
      33  #define a3      $7
      34  #if _MIPS_SIM != _ABIO32
      35  #define a4      $8
      36  #define a5      $9
      37  #define a6      $10
      38  #define a7      $11
      39  #define t0      $12
      40  #define t1      $13
      41  #define t2      $14
      42  #define t3      $15
      43  #define ta0     a4
      44  #define ta1     a5
      45  #define ta2     a6
      46  #define ta3     a7
      47  #else /* if _MIPS_SIM == _ABIO32 */
      48  #define t0      $8      /* caller saved */
      49  #define t1      $9
      50  #define t2      $10
      51  #define t3      $11
      52  #define t4      $12
      53  #define t5      $13
      54  #define t6      $14
      55  #define t7      $15
      56  #define ta0     t4
      57  #define ta1     t5
      58  #define ta2     t6
      59  #define ta3     t7
      60  #endif /* _MIPS_SIM == _ABIO32 */
      61  #define s0      $16     /* callee saved */
      62  #define s1      $17
      63  #define s2      $18
      64  #define s3      $19
      65  #define s4      $20
      66  #define s5      $21
      67  #define s6      $22
      68  #define s7      $23
      69  #define t8      $24     /* caller saved */
      70  #define t9      $25
      71  #define jp      $25     /* PIC jump register */
      72  #define k0      $26     /* kernel scratch */
      73  #define k1      $27
      74  #define gp      $28     /* global pointer */
      75  #define sp      $29     /* stack pointer */
      76  #define fp      $30     /* frame pointer */
      77  #define s8	$30	/* same like fp! */
      78  #define ra      $31     /* return address */
      79  
      80  #endif /* _SYS_REGDEF_H */