diff options
Diffstat (limited to 'opcodes/aarch64-dis.c')
-rw-r--r-- | opcodes/aarch64-dis.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c index 17bd342..bcf5232 100644 --- a/opcodes/aarch64-dis.c +++ b/opcodes/aarch64-dis.c @@ -351,6 +351,14 @@ aarch64_ext_reglane (const aarch64_operand *self, aarch64_opnd_info *info, default: return 0; } + + if (inst->opcode->op == OP_FCMLA_ELEM) + { + /* Complex operand takes two elements. */ + if (info->reglane.index & 1) + return 0; + info->reglane.index /= 2; + } } return 1; @@ -703,6 +711,40 @@ aarch64_ext_fpimm (const aarch64_operand *self, aarch64_opnd_info *info, return 1; } +/* Decode rotate immediate for FCMLA <Vd>.<T>, <Vn>.<T>, <Vm>.<T>, #rotate. */ +int +aarch64_ext_imm_rotate (const aarch64_operand *self, aarch64_opnd_info *info, + const aarch64_insn code, + const aarch64_inst *inst ATTRIBUTE_UNUSED) +{ + uint64_t rot = extract_field (self->fields[0], code, 0); + + switch (info->type) + { + case AARCH64_OPND_IMM_ROT1: + case AARCH64_OPND_IMM_ROT2: + /* rot value + 0 0 + 1 90 + 2 180 + 3 270 */ + assert (rot < 4U); + break; + case AARCH64_OPND_IMM_ROT3: + /* rot value + 0 90 + 1 270 */ + assert (rot < 2U); + rot = 2 * rot + 1; + break; + default: + assert (0); + return 0; + } + info->imm.value = rot * 90; + return 1; +} + /* Decode scale for e.g. SCVTF <Dd>, <Wn>, #<fbits>. */ int aarch64_ext_fbits (const aarch64_operand *self ATTRIBUTE_UNUSED, |