regdef.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 1985 MIPS Computer Systems, Inc.
  7. * Copyright (C) 1994, 95, 99, 2003 by Ralf Baechle
  8. * Copyright (C) 1990 - 1992, 1999 Silicon Graphics, Inc.
  9. * Copyright (C) 2011 Wind River Systems,
  10. * written by Ralf Baechle <ralf@linux-mips.org>
  11. */
  12. #ifndef _ASM_REGDEF_H
  13. #define _ASM_REGDEF_H
  14. #include <asm/sgidefs.h>
  15. #if _MIPS_SIM == _MIPS_SIM_ABI32
  16. /*
  17. * Symbolic register names for 32 bit ABI
  18. */
  19. #define zero $0 /* wired zero */
  20. #define AT $1 /* assembler temp - uppercase because of ".set at" */
  21. #define v0 $2 /* return value */
  22. #define v1 $3
  23. #define a0 $4 /* argument registers */
  24. #define a1 $5
  25. #define a2 $6
  26. #define a3 $7
  27. #define t0 $8 /* caller saved */
  28. #define t1 $9
  29. #define t2 $10
  30. #define t3 $11
  31. #define t4 $12
  32. #define ta0 $12
  33. #define t5 $13
  34. #define ta1 $13
  35. #define t6 $14
  36. #define ta2 $14
  37. #define t7 $15
  38. #define ta3 $15
  39. #define s0 $16 /* callee saved */
  40. #define s1 $17
  41. #define s2 $18
  42. #define s3 $19
  43. #define s4 $20
  44. #define s5 $21
  45. #define s6 $22
  46. #define s7 $23
  47. #define t8 $24 /* caller saved */
  48. #define t9 $25
  49. #define jp $25 /* PIC jump register */
  50. #define k0 $26 /* kernel scratch */
  51. #define k1 $27
  52. #define gp $28 /* global pointer */
  53. #define sp $29 /* stack pointer */
  54. #define fp $30 /* frame pointer */
  55. #define s8 $30 /* same like fp! */
  56. #define ra $31 /* return address */
  57. #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
  58. #if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32
  59. #define zero $0 /* wired zero */
  60. #define AT $at /* assembler temp - uppercase because of ".set at" */
  61. #define v0 $2 /* return value - caller saved */
  62. #define v1 $3
  63. #define a0 $4 /* argument registers */
  64. #define a1 $5
  65. #define a2 $6
  66. #define a3 $7
  67. #define a4 $8 /* arg reg 64 bit; caller saved in 32 bit */
  68. #define ta0 $8
  69. #define a5 $9
  70. #define ta1 $9
  71. #define a6 $10
  72. #define ta2 $10
  73. #define a7 $11
  74. #define ta3 $11
  75. #define t0 $12 /* caller saved */
  76. #define t1 $13
  77. #define t2 $14
  78. #define t3 $15
  79. #define s0 $16 /* callee saved */
  80. #define s1 $17
  81. #define s2 $18
  82. #define s3 $19
  83. #define s4 $20
  84. #define s5 $21
  85. #define s6 $22
  86. #define s7 $23
  87. #define t8 $24 /* caller saved */
  88. #define t9 $25 /* callee address for PIC/temp */
  89. #define jp $25 /* PIC jump register */
  90. #define k0 $26 /* kernel temporary */
  91. #define k1 $27
  92. #define gp $28 /* global pointer - caller saved for PIC */
  93. #define sp $29 /* stack pointer */
  94. #define fp $30 /* frame pointer */
  95. #define s8 $30 /* callee saved */
  96. #define ra $31 /* return address */
  97. #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 */
  98. #endif /* _ASM_REGDEF_H */