regdef.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* Copyright (C) 1997, 1998 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. /*
  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. #define t0 $8 /* caller saved */
  30. #define t1 $9
  31. #define t2 $10
  32. #define t3 $11
  33. #define t4 $12
  34. #define t5 $13
  35. #define t6 $14
  36. #define t7 $15
  37. #define s0 $16 /* callee saved */
  38. #define s1 $17
  39. #define s2 $18
  40. #define s3 $19
  41. #define s4 $20
  42. #define s5 $21
  43. #define s6 $22
  44. #define s7 $23
  45. #define t8 $24 /* caller saved */
  46. #define t9 $25
  47. #define jp $25 /* PIC jump register */
  48. #define k0 $26 /* kernel scratch */
  49. #define k1 $27
  50. #define gp $28 /* global pointer */
  51. #define sp $29 /* stack pointer */
  52. #define fp $30 /* frame pointer */
  53. #define s8 $30 /* same like fp! */
  54. #define ra $31 /* return address */
  55. #endif /* _SYS_REGDEF_H */