registers.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. #ifndef __ASM_SH64_REGISTERS_H
  2. #define __ASM_SH64_REGISTERS_H
  3. /*
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. *
  8. * include/asm-sh64/registers.h
  9. *
  10. * Copyright (C) 2000, 2001 Paolo Alberelli
  11. * Copyright (C) 2004 Richard Curnow
  12. */
  13. #ifdef __ASSEMBLY__
  14. /* =====================================================================
  15. **
  16. ** Section 1: acts on assembly sources pre-processed by GPP ( <source.S>).
  17. ** Assigns symbolic names to control & target registers.
  18. */
  19. /*
  20. * Define some useful aliases for control registers.
  21. */
  22. #define SR cr0
  23. #define SSR cr1
  24. #define PSSR cr2
  25. /* cr3 UNDEFINED */
  26. #define INTEVT cr4
  27. #define EXPEVT cr5
  28. #define PEXPEVT cr6
  29. #define TRA cr7
  30. #define SPC cr8
  31. #define PSPC cr9
  32. #define RESVEC cr10
  33. #define VBR cr11
  34. /* cr12 UNDEFINED */
  35. #define TEA cr13
  36. /* cr14-cr15 UNDEFINED */
  37. #define DCR cr16
  38. #define KCR0 cr17
  39. #define KCR1 cr18
  40. /* cr19-cr31 UNDEFINED */
  41. /* cr32-cr61 RESERVED */
  42. #define CTC cr62
  43. #define USR cr63
  44. /*
  45. * ABI dependent registers (general purpose set)
  46. */
  47. #define RET r2
  48. #define ARG1 r2
  49. #define ARG2 r3
  50. #define ARG3 r4
  51. #define ARG4 r5
  52. #define ARG5 r6
  53. #define ARG6 r7
  54. #define SP r15
  55. #define LINK r18
  56. #define ZERO r63
  57. /*
  58. * Status register defines: used only by assembly sources (and
  59. * syntax independednt)
  60. */
  61. #define SR_RESET_VAL 0x0000000050008000
  62. #define SR_HARMLESS 0x00000000500080f0 /* Write ignores for most */
  63. #define SR_ENABLE_FPU 0xffffffffffff7fff /* AND with this */
  64. #if defined (CONFIG_SH64_SR_WATCH)
  65. #define SR_ENABLE_MMU 0x0000000084000000 /* OR with this */
  66. #else
  67. #define SR_ENABLE_MMU 0x0000000080000000 /* OR with this */
  68. #endif
  69. #define SR_UNBLOCK_EXC 0xffffffffefffffff /* AND with this */
  70. #define SR_BLOCK_EXC 0x0000000010000000 /* OR with this */
  71. #else /* Not __ASSEMBLY__ syntax */
  72. /*
  73. ** Stringify reg. name
  74. */
  75. #define __str(x) #x
  76. /* Stringify control register names for use in inline assembly */
  77. #define __SR __str(SR)
  78. #define __SSR __str(SSR)
  79. #define __PSSR __str(PSSR)
  80. #define __INTEVT __str(INTEVT)
  81. #define __EXPEVT __str(EXPEVT)
  82. #define __PEXPEVT __str(PEXPEVT)
  83. #define __TRA __str(TRA)
  84. #define __SPC __str(SPC)
  85. #define __PSPC __str(PSPC)
  86. #define __RESVEC __str(RESVEC)
  87. #define __VBR __str(VBR)
  88. #define __TEA __str(TEA)
  89. #define __DCR __str(DCR)
  90. #define __KCR0 __str(KCR0)
  91. #define __KCR1 __str(KCR1)
  92. #define __CTC __str(CTC)
  93. #define __USR __str(USR)
  94. #endif /* __ASSEMBLY__ */
  95. #endif /* __ASM_SH64_REGISTERS_H */