24 #ifndef OPCODES_AARCH64_OPC_H
25 #define OPCODES_AARCH64_OPC_H
192 #define OPD_F_HAS_INSERTER 0x00000001
193 #define OPD_F_HAS_EXTRACTOR 0x00000002
194 #define OPD_F_SIGN_EXT_T 0x00000004
195 #define OPD_F_SHIFT_BY_2 0x00000008
198 #define OPD_F_MAYBE_SP 0x00000010
199 #define OPD_F_OD_MASK 0x000000e0
200 #define OPD_F_OD_LSB 5
201 #define OPD_F_NO_ZR 0x00000100
206 #define F_DEPRECATED (1 << 0)
209 #define F_ARCHEXT (1 << 1)
212 #define F_HASXT (1 << 2)
216 #define F_REG_READ (1 << 3)
220 #define F_REG_WRITE (1 << 4)
254 static inline unsigned int
261 static inline unsigned
269 static inline unsigned
321 if (lsb_rel < 0 || width <= 0 || lsb_rel + width > field->
width)
323 ret->
lsb = field->
lsb + lsb_rel;
336 && field->
lsb + field->
width <= 32);
434 int src_size = 0, dst_size = 0;
441 if (src_size == dst_size && src_size == 0)
444 if (dst_size == 0 || dst_size == src_size << 1)
479 static inline unsigned int
482 const unsigned char ls[16] =
483 {0, 1, -1, 2, -1, -1, -1, 3, -1, -1, -1, -1, -1, -1, -1, 4};
unsigned char aarch64_get_qualifier_esize(aarch64_opnd_qualifier_t qualifier)
enum aarch64_operand_class aarch64_get_operand_class(enum aarch64_opnd type)
int aarch64_num_of_operands(const aarch64_opcode *opcode)
static bfd_boolean operand_has_inserter(const aarch64_operand *operand)
enum aarch64_modifier_kind aarch64_get_operand_modifier_from_value(aarch64_insn, bfd_boolean)
bfd_boolean aarch64_logical_immediate_p(uint64_t, int, aarch64_insn *)
const char * aarch64_get_qualifier_name(aarch64_opnd_qualifier_t)
static unsigned get_operand_field_width(const aarch64_operand *operand, unsigned n)
static bfd_boolean operand_maybe_stack_pointer(const aarch64_operand *operand)
static int select_operand_for_fptype_field_coding(const aarch64_opcode *opcode)
static bfd_boolean operand_has_extractor(const aarch64_operand *operand)
const aarch64_field fields[]
static unsigned int get_logsz(unsigned int size)
int aarch64_select_operand_for_sizeq_field_coding(const aarch64_opcode *)
static void insert_field_2(const aarch64_field *field, aarch64_insn *code, aarch64_insn value, aarch64_insn mask)
int aarch64_match_operands_constraint(aarch64_inst *, aarch64_operand_error *)
static void copy_operand_info(aarch64_inst *inst, int dst, int src)
static aarch64_insn extract_field_2(const aarch64_field *field, aarch64_insn code, aarch64_insn mask)
static unsigned int get_operand_specific_data(const aarch64_operand *operand)
static int gen_sub_field(enum aarch64_field_kind kind, int lsb_rel, int width, aarch64_field *ret)
static int select_operand_for_scalar_size_field_coding(const aarch64_opcode *opcode)
static const aarch64_operand * get_operand_from_code(enum aarch64_opnd code)
aarch64_insn extract_fields(aarch64_insn code, aarch64_insn mask,...)
#define OPD_F_HAS_INSERTER
bfd_boolean aarch64_wide_constant_p(int64_t, int, unsigned int *)
#define OPD_F_HAS_EXTRACTOR
static int select_operand_for_sf_field_coding(const aarch64_opcode *opcode)
static aarch64_insn gen_mask(int width)
aarch64_insn aarch64_get_operand_modifier_value(enum aarch64_modifier_kind)
static bfd_boolean operand_need_sign_extension(const aarch64_operand *operand)
static unsigned get_operand_fields_width(const aarch64_operand *operand)
int aarch64_find_best_match(const aarch64_inst *, const aarch64_opnd_qualifier_seq_t *, int, aarch64_opnd_qualifier_t *)
unsigned char aarch64_get_qualifier_nelem(aarch64_opnd_qualifier_t)
aarch64_insn aarch64_get_qualifier_standard_value(aarch64_opnd_qualifier_t)
int aarch64_shrink_expanded_imm8(uint64_t)
static void insert_field(enum aarch64_field_kind kind, aarch64_insn *code, aarch64_insn value, aarch64_insn mask)
const aarch64_operand aarch64_operands[]
static bfd_boolean operand_need_shift_by_two(const aarch64_operand *operand)
static void reset_operand_qualifier(aarch64_inst *inst, int idx)
static aarch64_insn extract_field(enum aarch64_field_kind kind, aarch64_insn code, aarch64_insn mask)
unsigned char aarch64_opnd_qualifier_t
@ AARCH64_OPND_CLASS_INT_REG
@ AARCH64_OPND_CLASS_FP_REG
@ AARCH64_OPND_CLASS_SISD_REG
aarch64_opnd_qualifier_t aarch64_opnd_qualifier_seq_t[AARCH64_MAX_OPND_NUM]
#define AARCH64_MAX_OPND_NUM
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
assert(limit<=UINT32_MAX/2)
aarch64_opnd_info operands[AARCH64_MAX_OPND_NUM]
const aarch64_opcode * opcode
aarch64_opnd_qualifier_seq_t qualifiers_list[AARCH64_MAX_QLF_SEQ_NUM]
enum aarch64_opnd operands[AARCH64_MAX_OPND_NUM]
enum aarch64_field_kind fields[4]
enum aarch64_operand_class op_class
aarch64_opnd_qualifier_t qualifier