aarch64-asm.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /* aarch64-asm.h -- Header file for aarch64-asm.c and aarch64-asm-2.c.
  2. Copyright (C) 2012-2022 Free Software Foundation, Inc.
  3. Contributed by ARM Ltd.
  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 program; see the file COPYING3. If not,
  15. see <http://www.gnu.org/licenses/>. */
  16. #ifndef OPCODES_AARCH64_ASM_H
  17. #define OPCODES_AARCH64_ASM_H
  18. #include "aarch64-opc.h"
  19. /* Given OPCODE, return the opcode entry that OPCODE aliases to, e.g.
  20. given LSL, return UBFM. */
  21. const aarch64_opcode* aarch64_find_real_opcode (const aarch64_opcode *);
  22. /* Switch-table-based high-level operand inserter. */
  23. bool aarch64_insert_operand (const aarch64_operand *,
  24. const aarch64_opnd_info *, aarch64_insn *,
  25. const aarch64_inst *, aarch64_operand_error *);
  26. /* Operand inserters. */
  27. #define AARCH64_DECL_OPD_INSERTER(x) \
  28. bool aarch64_##x (const aarch64_operand *, const aarch64_opnd_info *, \
  29. aarch64_insn *, const aarch64_inst *, \
  30. aarch64_operand_error *)
  31. AARCH64_DECL_OPD_INSERTER (ins_none);
  32. AARCH64_DECL_OPD_INSERTER (ins_regno);
  33. AARCH64_DECL_OPD_INSERTER (ins_reglane);
  34. AARCH64_DECL_OPD_INSERTER (ins_reglist);
  35. AARCH64_DECL_OPD_INSERTER (ins_ldst_reglist);
  36. AARCH64_DECL_OPD_INSERTER (ins_ldst_reglist_r);
  37. AARCH64_DECL_OPD_INSERTER (ins_ldst_elemlist);
  38. AARCH64_DECL_OPD_INSERTER (ins_advsimd_imm_shift);
  39. AARCH64_DECL_OPD_INSERTER (ins_imm);
  40. AARCH64_DECL_OPD_INSERTER (ins_imm_half);
  41. AARCH64_DECL_OPD_INSERTER (ins_advsimd_imm_modified);
  42. AARCH64_DECL_OPD_INSERTER (ins_fpimm);
  43. AARCH64_DECL_OPD_INSERTER (ins_fbits);
  44. AARCH64_DECL_OPD_INSERTER (ins_aimm);
  45. AARCH64_DECL_OPD_INSERTER (ins_limm);
  46. AARCH64_DECL_OPD_INSERTER (ins_inv_limm);
  47. AARCH64_DECL_OPD_INSERTER (ins_ft);
  48. AARCH64_DECL_OPD_INSERTER (ins_addr_simple);
  49. AARCH64_DECL_OPD_INSERTER (ins_addr_offset);
  50. AARCH64_DECL_OPD_INSERTER (ins_addr_regoff);
  51. AARCH64_DECL_OPD_INSERTER (ins_addr_simm);
  52. AARCH64_DECL_OPD_INSERTER (ins_addr_simm10);
  53. AARCH64_DECL_OPD_INSERTER (ins_addr_uimm12);
  54. AARCH64_DECL_OPD_INSERTER (ins_simd_addr_post);
  55. AARCH64_DECL_OPD_INSERTER (ins_cond);
  56. AARCH64_DECL_OPD_INSERTER (ins_sysreg);
  57. AARCH64_DECL_OPD_INSERTER (ins_pstatefield);
  58. AARCH64_DECL_OPD_INSERTER (ins_sysins_op);
  59. AARCH64_DECL_OPD_INSERTER (ins_barrier);
  60. AARCH64_DECL_OPD_INSERTER (ins_barrier_dsb_nxs);
  61. AARCH64_DECL_OPD_INSERTER (ins_hint);
  62. AARCH64_DECL_OPD_INSERTER (ins_prfop);
  63. AARCH64_DECL_OPD_INSERTER (ins_reg_extended);
  64. AARCH64_DECL_OPD_INSERTER (ins_reg_shifted);
  65. AARCH64_DECL_OPD_INSERTER (ins_sve_addr_ri_s4);
  66. AARCH64_DECL_OPD_INSERTER (ins_sve_addr_ri_s4xvl);
  67. AARCH64_DECL_OPD_INSERTER (ins_sve_addr_ri_s6xvl);
  68. AARCH64_DECL_OPD_INSERTER (ins_sve_addr_ri_s9xvl);
  69. AARCH64_DECL_OPD_INSERTER (ins_sve_addr_ri_u6);
  70. AARCH64_DECL_OPD_INSERTER (ins_sve_addr_rr_lsl);
  71. AARCH64_DECL_OPD_INSERTER (ins_sve_addr_rz_xtw);
  72. AARCH64_DECL_OPD_INSERTER (ins_sve_addr_zi_u5);
  73. AARCH64_DECL_OPD_INSERTER (ins_sve_addr_zz_lsl);
  74. AARCH64_DECL_OPD_INSERTER (ins_sve_addr_zz_sxtw);
  75. AARCH64_DECL_OPD_INSERTER (ins_sve_addr_zz_uxtw);
  76. AARCH64_DECL_OPD_INSERTER (ins_sve_aimm);
  77. AARCH64_DECL_OPD_INSERTER (ins_sve_asimm);
  78. AARCH64_DECL_OPD_INSERTER (ins_sve_float_half_one);
  79. AARCH64_DECL_OPD_INSERTER (ins_sve_float_half_two);
  80. AARCH64_DECL_OPD_INSERTER (ins_sve_float_zero_one);
  81. AARCH64_DECL_OPD_INSERTER (ins_sve_index);
  82. AARCH64_DECL_OPD_INSERTER (ins_sve_limm_mov);
  83. AARCH64_DECL_OPD_INSERTER (ins_sve_quad_index);
  84. AARCH64_DECL_OPD_INSERTER (ins_sve_reglist);
  85. AARCH64_DECL_OPD_INSERTER (ins_sve_scale);
  86. AARCH64_DECL_OPD_INSERTER (ins_sve_shlimm);
  87. AARCH64_DECL_OPD_INSERTER (ins_sve_shrimm);
  88. AARCH64_DECL_OPD_INSERTER (ins_sme_za_hv_tiles);
  89. AARCH64_DECL_OPD_INSERTER (ins_sme_za_list);
  90. AARCH64_DECL_OPD_INSERTER (ins_sme_za_array);
  91. AARCH64_DECL_OPD_INSERTER (ins_sme_addr_ri_u4xvl);
  92. AARCH64_DECL_OPD_INSERTER (ins_sme_sm_za);
  93. AARCH64_DECL_OPD_INSERTER (ins_sme_pred_reg_with_index);
  94. AARCH64_DECL_OPD_INSERTER (ins_imm_rotate1);
  95. AARCH64_DECL_OPD_INSERTER (ins_imm_rotate2);
  96. AARCH64_DECL_OPD_INSERTER (ins_x0_to_x30);
  97. #undef AARCH64_DECL_OPD_INSERTER
  98. #endif /* OPCODES_AARCH64_ASM_H */