regdef.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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, see
  14. <http://www.gnu.org/licenses/>. */
  15. #ifndef _SYS_REGDEF_H
  16. #define _SYS_REGDEF_H
  17. #include <sgidefs.h>
  18. /*
  19. * Symbolic register names for 32 bit ABI
  20. */
  21. #define zero $0 /* wired zero */
  22. #define AT $1 /* assembler temp - uppercase because of ".set at" */
  23. #define v0 $2 /* return value */
  24. #define v1 $3
  25. #define a0 $4 /* argument registers */
  26. #define a1 $5
  27. #define a2 $6
  28. #define a3 $7
  29. #if _MIPS_SIM != _MIPS_SIM_ABI32
  30. #define a4 $8
  31. #define a5 $9
  32. #define a6 $10
  33. #define a7 $11
  34. #define t0 $12
  35. #define t1 $13
  36. #define t2 $14
  37. #define t3 $15
  38. #define ta0 a4
  39. #define ta1 a5
  40. #define ta2 a6
  41. #define ta3 a7
  42. #else /* if _MIPS_SIM == _MIPS_SIM_ABI32 */
  43. #define t0 $8 /* caller saved */
  44. #define t1 $9
  45. #define t2 $10
  46. #define t3 $11
  47. #define t4 $12
  48. #define t5 $13
  49. #define t6 $14
  50. #define t7 $15
  51. #define ta0 t4
  52. #define ta1 t5
  53. #define ta2 t6
  54. #define ta3 t7
  55. #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
  56. #define s0 $16 /* callee saved */
  57. #define s1 $17
  58. #define s2 $18
  59. #define s3 $19
  60. #define s4 $20
  61. #define s5 $21
  62. #define s6 $22
  63. #define s7 $23
  64. #define t8 $24 /* caller saved */
  65. #define t9 $25
  66. #define jp $25 /* PIC jump register */
  67. #define k0 $26 /* kernel scratch */
  68. #define k1 $27
  69. #define gp $28 /* global pointer */
  70. #define sp $29 /* stack pointer */
  71. #define fp $30 /* frame pointer */
  72. #define s8 $30 /* same like fp! */
  73. #define ra $31 /* return address */
  74. #endif /* _SYS_REGDEF_H */