regdef.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * Alpha optimized DSP utils
  3. * copyright (c) 2002 Falk Hueffner <falk@debian.org>
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Lesser General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 2 of the License, or (at your option) any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Lesser General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Lesser General Public
  16. * License along with this library; if not, write to the Free Software
  17. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  18. */
  19. /* Some BSDs don't seem to have regdef.h... sigh */
  20. #ifndef alpha_regdef_h
  21. #define alpha_regdef_h
  22. #define v0 $0 /* function return value */
  23. #define t0 $1 /* temporary registers (caller-saved) */
  24. #define t1 $2
  25. #define t2 $3
  26. #define t3 $4
  27. #define t4 $5
  28. #define t5 $6
  29. #define t6 $7
  30. #define t7 $8
  31. #define s0 $9 /* saved-registers (callee-saved registers) */
  32. #define s1 $10
  33. #define s2 $11
  34. #define s3 $12
  35. #define s4 $13
  36. #define s5 $14
  37. #define s6 $15
  38. #define fp s6 /* frame-pointer (s6 in frame-less procedures) */
  39. #define a0 $16 /* argument registers (caller-saved) */
  40. #define a1 $17
  41. #define a2 $18
  42. #define a3 $19
  43. #define a4 $20
  44. #define a5 $21
  45. #define t8 $22 /* more temps (caller-saved) */
  46. #define t9 $23
  47. #define t10 $24
  48. #define t11 $25
  49. #define ra $26 /* return address register */
  50. #define t12 $27
  51. #define pv t12 /* procedure-variable register */
  52. #define AT $at /* assembler temporary */
  53. #define gp $29 /* global pointer */
  54. #define sp $30 /* stack pointer */
  55. #define zero $31 /* reads as zero, writes are noops */
  56. #endif /* alpha_regdef_h */