regdef.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /* Copyright (C) 1997, 1998, 2002, 2003 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3. Contributed by Ralf Baechle <ralf@gnu.org>.
  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. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library; if not, write to the Free
  14. Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  15. 02111-1307 USA. */
  16. #ifndef _SYS_REGDEF_H
  17. #define _SYS_REGDEF_H
  18. #include <sgidefs.h>
  19. /*
  20. * Symbolic register names for 32 bit ABI
  21. */
  22. #define zero $0 /* wired zero */
  23. #define AT $1 /* assembler temp - uppercase because of ".set at" */
  24. #define v0 $2 /* return value */
  25. #define v1 $3
  26. #define a0 $4 /* argument registers */
  27. #define a1 $5
  28. #define a2 $6
  29. #define a3 $7
  30. #if _MIPS_SIM != _MIPS_SIM_ABI32
  31. #define a4 $8
  32. #define a5 $9
  33. #define a6 $10
  34. #define a7 $11
  35. #define t0 $12
  36. #define t1 $13
  37. #define t2 $14
  38. #define t3 $15
  39. #define ta0 a4
  40. #define ta1 a5
  41. #define ta2 a6
  42. #define ta3 a7
  43. #else /* if _MIPS_SIM == _MIPS_SIM_ABI32 */
  44. #define t0 $8 /* caller saved */
  45. #define t1 $9
  46. #define t2 $10
  47. #define t3 $11
  48. #define t4 $12
  49. #define t5 $13
  50. #define t6 $14
  51. #define t7 $15
  52. #define ta0 t4
  53. #define ta1 t5
  54. #define ta2 t6
  55. #define ta3 t7
  56. #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
  57. #define s0 $16 /* callee saved */
  58. #define s1 $17
  59. #define s2 $18
  60. #define s3 $19
  61. #define s4 $20
  62. #define s5 $21
  63. #define s6 $22
  64. #define s7 $23
  65. #define t8 $24 /* caller saved */
  66. #define t9 $25
  67. #define jp $25 /* PIC jump register */
  68. #define k0 $26 /* kernel scratch */
  69. #define k1 $27
  70. #define gp $28 /* global pointer */
  71. #define sp $29 /* stack pointer */
  72. #define fp $30 /* frame pointer */
  73. #define s8 $30 /* same like fp! */
  74. #define ra $31 /* return address */
  75. #endif /* _SYS_REGDEF_H */