diff options
author | Srinath Parvathaneni <srinath.parvathaneni@arm.com> | 2024-01-15 09:34:41 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2024-01-15 11:45:41 +0000 |
commit | 89e06ec1521898892e27615714f51d30703d5139 (patch) | |
tree | 2f51b8db85375d158020794c4a4fcbb63033fcd9 /opcodes/aarch64-asm.c | |
parent | 7e8d2d875701971c77224079056a0c8272d63109 (diff) | |
download | gdb-89e06ec1521898892e27615714f51d30703d5139.zip gdb-89e06ec1521898892e27615714f51d30703d5139.tar.gz gdb-89e06ec1521898892e27615714f51d30703d5139.tar.bz2 |
aarch64: Add support for FEAT_SME2p1 instructions.
Hi,
This patch add support for FEAT_SME2p1 and "movaz" instructions
along with the optional flag +sme2p1.
Following "movaz" instructions are add:
Move and zero two ZA tile slices to vector registers.
Move and zero four ZA tile slices to vector registers.
Regression testing for aarch64-none-elf target and found no regressions.
Ok for binutils-master?
Regards,
Srinath.
Diffstat (limited to 'opcodes/aarch64-asm.c')
-rw-r--r-- | opcodes/aarch64-asm.c | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/opcodes/aarch64-asm.c b/opcodes/aarch64-asm.c index 1db290e..3fac127 100644 --- a/opcodes/aarch64-asm.c +++ b/opcodes/aarch64-asm.c @@ -1375,6 +1375,76 @@ aarch64_ins_sve_float_zero_one (const aarch64_operand *self, return true; } +bool +aarch64_ins_sme_za_vrs1 (const aarch64_operand *self, + const aarch64_opnd_info *info, + aarch64_insn *code, + const aarch64_inst *inst ATTRIBUTE_UNUSED, + aarch64_operand_error *errors ATTRIBUTE_UNUSED) +{ + int za_reg = info->indexed_za.regno; + int regno = info->indexed_za.index.regno & 3; + int imm = info->indexed_za.index.imm; + int v = info->indexed_za.v; + int countm1 = info->indexed_za.index.countm1; + + insert_field (self->fields[0], code, v, 0); + insert_field (self->fields[1], code, regno, 0); + switch (info->qualifier) + { + case AARCH64_OPND_QLF_S_B: + insert_field (self->fields[2], code, imm / (countm1 + 1), 0); + break; + case AARCH64_OPND_QLF_S_H: + case AARCH64_OPND_QLF_S_S: + insert_field (self->fields[2], code, za_reg, 0); + insert_field (self->fields[3], code, imm / (countm1 + 1), 0); + break; + case AARCH64_OPND_QLF_S_D: + insert_field (self->fields[2], code, za_reg, 0); + break; + default: + return false; + } + + return true; +} + +bool +aarch64_ins_sme_za_vrs2 (const aarch64_operand *self, + const aarch64_opnd_info *info, + aarch64_insn *code, + const aarch64_inst *inst ATTRIBUTE_UNUSED, + aarch64_operand_error *errors ATTRIBUTE_UNUSED) +{ + int za_reg = info->indexed_za.regno; + int regno = info->indexed_za.index.regno & 3; + int imm = info->indexed_za.index.imm; + int v = info->indexed_za.v; + int countm1 = info->indexed_za.index.countm1; + + insert_field (self->fields[0], code, v, 0); + insert_field (self->fields[1], code, regno, 0); + switch (info->qualifier) + { + case AARCH64_OPND_QLF_S_B: + insert_field (self->fields[2], code, imm / (countm1 + 1), 0); + break; + case AARCH64_OPND_QLF_S_H: + insert_field (self->fields[2], code, za_reg, 0); + insert_field (self->fields[3], code, imm / (countm1 + 1), 0); + break; + case AARCH64_OPND_QLF_S_S: + case AARCH64_OPND_QLF_S_D: + insert_field (self->fields[2], code, za_reg, 0); + break; + default: + return false; + } + + return true; +} + /* Encode in SME instruction such as MOVA ZA tile vector register number, vector indicator, vector selector and immediate. */ bool @@ -2011,6 +2081,7 @@ aarch64_encode_variant_using_iclass (struct aarch64_inst *inst) break; case sme_misc: + case sme2_movaz: case sve_misc: /* These instructions have only a single variant. */ break; |