inst.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. /******************************************************************************
  2. * arch/ia64/include/asm/native/inst.h
  3. *
  4. * Copyright (c) 2008 Isaku Yamahata <yamahata at valinux co jp>
  5. * VA Linux Systems Japan K.K.
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  20. *
  21. */
  22. #define DO_SAVE_MIN IA64_NATIVE_DO_SAVE_MIN
  23. #define MOV_FROM_IFA(reg) \
  24. mov reg = cr.ifa
  25. #define MOV_FROM_ITIR(reg) \
  26. mov reg = cr.itir
  27. #define MOV_FROM_ISR(reg) \
  28. mov reg = cr.isr
  29. #define MOV_FROM_IHA(reg) \
  30. mov reg = cr.iha
  31. #define MOV_FROM_IPSR(pred, reg) \
  32. (pred) mov reg = cr.ipsr
  33. #define MOV_FROM_IIM(reg) \
  34. mov reg = cr.iim
  35. #define MOV_FROM_IIP(reg) \
  36. mov reg = cr.iip
  37. #define MOV_FROM_IVR(reg, clob) \
  38. mov reg = cr.ivr
  39. #define MOV_FROM_PSR(pred, reg, clob) \
  40. (pred) mov reg = psr
  41. #define MOV_FROM_ITC(pred, pred_clob, reg, clob) \
  42. (pred) mov reg = ar.itc
  43. #define MOV_TO_IFA(reg, clob) \
  44. mov cr.ifa = reg
  45. #define MOV_TO_ITIR(pred, reg, clob) \
  46. (pred) mov cr.itir = reg
  47. #define MOV_TO_IHA(pred, reg, clob) \
  48. (pred) mov cr.iha = reg
  49. #define MOV_TO_IPSR(pred, reg, clob) \
  50. (pred) mov cr.ipsr = reg
  51. #define MOV_TO_IFS(pred, reg, clob) \
  52. (pred) mov cr.ifs = reg
  53. #define MOV_TO_IIP(reg, clob) \
  54. mov cr.iip = reg
  55. #define MOV_TO_KR(kr, reg, clob0, clob1) \
  56. mov IA64_KR(kr) = reg
  57. #define ITC_I(pred, reg, clob) \
  58. (pred) itc.i reg
  59. #define ITC_D(pred, reg, clob) \
  60. (pred) itc.d reg
  61. #define ITC_I_AND_D(pred_i, pred_d, reg, clob) \
  62. (pred_i) itc.i reg; \
  63. (pred_d) itc.d reg
  64. #define THASH(pred, reg0, reg1, clob) \
  65. (pred) thash reg0 = reg1
  66. #define SSM_PSR_IC_AND_DEFAULT_BITS_AND_SRLZ_I(clob0, clob1) \
  67. ssm psr.ic | PSR_DEFAULT_BITS \
  68. ;; \
  69. srlz.i /* guarantee that interruption collectin is on */ \
  70. ;;
  71. #define SSM_PSR_IC_AND_SRLZ_D(clob0, clob1) \
  72. ssm psr.ic \
  73. ;; \
  74. srlz.d
  75. #define RSM_PSR_IC(clob) \
  76. rsm psr.ic
  77. #define SSM_PSR_I(pred, pred_clob, clob) \
  78. (pred) ssm psr.i
  79. #define RSM_PSR_I(pred, clob0, clob1) \
  80. (pred) rsm psr.i
  81. #define RSM_PSR_I_IC(clob0, clob1, clob2) \
  82. rsm psr.i | psr.ic
  83. #define RSM_PSR_DT \
  84. rsm psr.dt
  85. #define RSM_PSR_BE_I(clob0, clob1) \
  86. rsm psr.be | psr.i
  87. #define SSM_PSR_DT_AND_SRLZ_I \
  88. ssm psr.dt \
  89. ;; \
  90. srlz.i
  91. #define BSW_0(clob0, clob1, clob2) \
  92. bsw.0
  93. #define BSW_1(clob0, clob1) \
  94. bsw.1
  95. #define COVER \
  96. cover
  97. #define RFI \
  98. rfi