ia64-opc-x.c 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. /* ia64-opc-x.c -- IA-64 `X' opcode table.
  2. Copyright (C) 1998-2022 Free Software Foundation, Inc.
  3. Contributed by Timothy Wall <twall@cygnus.com>
  4. This file is part of the GNU opcodes library.
  5. This library is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 3, or (at your option)
  8. any later version.
  9. It is distributed in the hope that it will be useful, but WITHOUT
  10. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  11. or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
  12. License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this file; see the file COPYING. If not, write to the
  15. Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
  16. MA 02110-1301, USA. */
  17. #include "ia64-opc.h"
  18. /* Identify the specific X-unit type. */
  19. #define X0 IA64_TYPE_X, 0
  20. #define X IA64_TYPE_X, 1
  21. /* Instruction bit fields: */
  22. #define bBtype(x) (((ia64_insn) ((x) & 0x7)) << 6)
  23. #define bD(x) (((ia64_insn) ((x) & 0x1)) << 35)
  24. #define bPa(x) (((ia64_insn) ((x) & 0x1)) << 12)
  25. #define bPr(x) (((ia64_insn) ((x) & 0x3f)) << 0)
  26. #define bVc(x) (((ia64_insn) ((x) & 0x1)) << 20)
  27. #define bWha(x) (((ia64_insn) ((x) & 0x3)) << 33)
  28. #define bX3(x) (((ia64_insn) ((x) & 0x7)) << 33)
  29. #define bX6(x) (((ia64_insn) ((x) & 0x3f)) << 27)
  30. #define bY(x) (((ia64_insn) ((x) & 0x1)) << 26)
  31. #define mBtype bBtype (-1)
  32. #define mD bD (-1)
  33. #define mPa bPa (-1)
  34. #define mPr bPr (-1)
  35. #define mVc bVc (-1)
  36. #define mWha bWha (-1)
  37. #define mX3 bX3 (-1)
  38. #define mX6 bX6 (-1)
  39. #define mY bY (-1)
  40. #define OpX3X6(a,b,c) (bOp (a) | bX3 (b) | bX6(c)), \
  41. (mOp | mX3 | mX6)
  42. #define OpX3X6Y(a,b,c,d) (bOp (a) | bX3 (b) | bX6(c) | bY(d)), \
  43. (mOp | mX3 | mX6 | mY)
  44. #define OpVc(a,b) (bOp (a) | bVc (b)), (mOp | mVc)
  45. #define OpPaWhaD(a,b,c,d) \
  46. (bOp (a) | bPa (b) | bWha (c) | bD (d)), (mOp | mPa | mWha | mD)
  47. #define OpBtypePaWhaD(a,b,c,d,e) \
  48. (bOp (a) | bBtype (b) | bPa (c) | bWha (d) | bD (e)), \
  49. (mOp | mBtype | mPa | mWha | mD)
  50. #define OpBtypePaWhaDPr(a,b,c,d,e,f) \
  51. (bOp (a) | bBtype (b) | bPa (c) | bWha (d) | bD (e) | bPr (f)), \
  52. (mOp | mBtype | mPa | mWha | mD | mPr)
  53. struct ia64_opcode ia64_opcodes_x[] =
  54. {
  55. {"break.x", X0, OpX3X6 (0, 0, 0x00), {IMMU62}, 0, 0, NULL},
  56. {"nop.x", X0, OpX3X6Y (0, 0, 0x01, 0), {IMMU62}, 0, 0, NULL},
  57. {"hint.x", X0, OpX3X6Y (0, 0, 0x01, 1), {IMMU62}, 0, 0, NULL},
  58. {"movl", X, OpVc (6, 0), {R1, IMMU64}, 0, 0, NULL},
  59. #define BRL(a,b) \
  60. X0, OpBtypePaWhaDPr (0xC, 0, a, 0, b, 0), {TGT64}, PSEUDO, 0, NULL
  61. {"brl.few", BRL (0, 0)},
  62. {"brl", BRL (0, 0)},
  63. {"brl.few.clr", BRL (0, 1)},
  64. {"brl.clr", BRL (0, 1)},
  65. {"brl.many", BRL (1, 0)},
  66. {"brl.many.clr", BRL (1, 1)},
  67. #undef BRL
  68. #define BRL(a,b,c) \
  69. X0, OpBtypePaWhaD (0xC, 0, a, b, c), {TGT64}, 0, 0, NULL
  70. #define BRLP(a,b,c) \
  71. X0, OpBtypePaWhaD (0xC, 0, a, b, c), {TGT64}, PSEUDO, 0, NULL
  72. {"brl.cond.sptk.few", BRL (0, 0, 0)},
  73. {"brl.cond.sptk", BRLP (0, 0, 0)},
  74. {"brl.cond.sptk.few.clr", BRL (0, 0, 1)},
  75. {"brl.cond.sptk.clr", BRLP (0, 0, 1)},
  76. {"brl.cond.spnt.few", BRL (0, 1, 0)},
  77. {"brl.cond.spnt", BRLP (0, 1, 0)},
  78. {"brl.cond.spnt.few.clr", BRL (0, 1, 1)},
  79. {"brl.cond.spnt.clr", BRLP (0, 1, 1)},
  80. {"brl.cond.dptk.few", BRL (0, 2, 0)},
  81. {"brl.cond.dptk", BRLP (0, 2, 0)},
  82. {"brl.cond.dptk.few.clr", BRL (0, 2, 1)},
  83. {"brl.cond.dptk.clr", BRLP (0, 2, 1)},
  84. {"brl.cond.dpnt.few", BRL (0, 3, 0)},
  85. {"brl.cond.dpnt", BRLP (0, 3, 0)},
  86. {"brl.cond.dpnt.few.clr", BRL (0, 3, 1)},
  87. {"brl.cond.dpnt.clr", BRLP (0, 3, 1)},
  88. {"brl.cond.sptk.many", BRL (1, 0, 0)},
  89. {"brl.cond.sptk.many.clr", BRL (1, 0, 1)},
  90. {"brl.cond.spnt.many", BRL (1, 1, 0)},
  91. {"brl.cond.spnt.many.clr", BRL (1, 1, 1)},
  92. {"brl.cond.dptk.many", BRL (1, 2, 0)},
  93. {"brl.cond.dptk.many.clr", BRL (1, 2, 1)},
  94. {"brl.cond.dpnt.many", BRL (1, 3, 0)},
  95. {"brl.cond.dpnt.many.clr", BRL (1, 3, 1)},
  96. {"brl.sptk.few", BRL (0, 0, 0)},
  97. {"brl.sptk", BRLP (0, 0, 0)},
  98. {"brl.sptk.few.clr", BRL (0, 0, 1)},
  99. {"brl.sptk.clr", BRLP (0, 0, 1)},
  100. {"brl.spnt.few", BRL (0, 1, 0)},
  101. {"brl.spnt", BRLP (0, 1, 0)},
  102. {"brl.spnt.few.clr", BRL (0, 1, 1)},
  103. {"brl.spnt.clr", BRLP (0, 1, 1)},
  104. {"brl.dptk.few", BRL (0, 2, 0)},
  105. {"brl.dptk", BRLP (0, 2, 0)},
  106. {"brl.dptk.few.clr", BRL (0, 2, 1)},
  107. {"brl.dptk.clr", BRLP (0, 2, 1)},
  108. {"brl.dpnt.few", BRL (0, 3, 0)},
  109. {"brl.dpnt", BRLP (0, 3, 0)},
  110. {"brl.dpnt.few.clr", BRL (0, 3, 1)},
  111. {"brl.dpnt.clr", BRLP (0, 3, 1)},
  112. {"brl.sptk.many", BRL (1, 0, 0)},
  113. {"brl.sptk.many.clr", BRL (1, 0, 1)},
  114. {"brl.spnt.many", BRL (1, 1, 0)},
  115. {"brl.spnt.many.clr", BRL (1, 1, 1)},
  116. {"brl.dptk.many", BRL (1, 2, 0)},
  117. {"brl.dptk.many.clr", BRL (1, 2, 1)},
  118. {"brl.dpnt.many", BRL (1, 3, 0)},
  119. {"brl.dpnt.many.clr", BRL (1, 3, 1)},
  120. #undef BRL
  121. #undef BRLP
  122. #define BRL(a,b,c) X, OpPaWhaD (0xD, a, b, c), {B1, TGT64}, 0, 0, NULL
  123. #define BRLP(a,b,c) X, OpPaWhaD (0xD, a, b, c), {B1, TGT64}, PSEUDO, 0, NULL
  124. {"brl.call.sptk.few", BRL (0, 0, 0)},
  125. {"brl.call.sptk", BRLP (0, 0, 0)},
  126. {"brl.call.sptk.few.clr", BRL (0, 0, 1)},
  127. {"brl.call.sptk.clr", BRLP (0, 0, 1)},
  128. {"brl.call.spnt.few", BRL (0, 1, 0)},
  129. {"brl.call.spnt", BRLP (0, 1, 0)},
  130. {"brl.call.spnt.few.clr", BRL (0, 1, 1)},
  131. {"brl.call.spnt.clr", BRLP (0, 1, 1)},
  132. {"brl.call.dptk.few", BRL (0, 2, 0)},
  133. {"brl.call.dptk", BRLP (0, 2, 0)},
  134. {"brl.call.dptk.few.clr", BRL (0, 2, 1)},
  135. {"brl.call.dptk.clr", BRLP (0, 2, 1)},
  136. {"brl.call.dpnt.few", BRL (0, 3, 0)},
  137. {"brl.call.dpnt", BRLP (0, 3, 0)},
  138. {"brl.call.dpnt.few.clr", BRL (0, 3, 1)},
  139. {"brl.call.dpnt.clr", BRLP (0, 3, 1)},
  140. {"brl.call.sptk.many", BRL (1, 0, 0)},
  141. {"brl.call.sptk.many.clr", BRL (1, 0, 1)},
  142. {"brl.call.spnt.many", BRL (1, 1, 0)},
  143. {"brl.call.spnt.many.clr", BRL (1, 1, 1)},
  144. {"brl.call.dptk.many", BRL (1, 2, 0)},
  145. {"brl.call.dptk.many.clr", BRL (1, 2, 1)},
  146. {"brl.call.dpnt.many", BRL (1, 3, 0)},
  147. {"brl.call.dpnt.many.clr", BRL (1, 3, 1)},
  148. #undef BRL
  149. #undef BRLP
  150. {NULL, 0, 0, 0, 0, {0}, 0, 0, NULL}
  151. };
  152. #undef X0
  153. #undef X
  154. #undef bBtype
  155. #undef bD
  156. #undef bPa
  157. #undef bPr
  158. #undef bVc
  159. #undef bWha
  160. #undef bX3
  161. #undef bX6
  162. #undef mBtype
  163. #undef mD
  164. #undef mPa
  165. #undef mPr
  166. #undef mVc
  167. #undef mWha
  168. #undef mX3
  169. #undef mX6
  170. #undef OpX3X6
  171. #undef OpVc
  172. #undef OpPaWhaD
  173. #undef OpBtypePaWhaD
  174. #undef OpBtypePaWhaDPr