mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
disas/riscv: Add rv_codec_vror_vi for vror.vi
Add rv_codec_vror_vi for the vector crypto instruction - vror.vi. The rotate amount of vror.vi is defined by combining seperated bits. Signed-off-by: Max Chou <max.chou@sifive.com> Acked-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20231026151828.754279-13-max.chou@sifive.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
ea363626ff
commit
434c609bef
2 changed files with 14 additions and 1 deletions
|
@ -4011,6 +4011,12 @@ static uint32_t operand_vzimm10(rv_inst inst)
|
|||
return (inst << 34) >> 54;
|
||||
}
|
||||
|
||||
static uint32_t operand_vzimm6(rv_inst inst)
|
||||
{
|
||||
return ((inst << 37) >> 63) << 5 |
|
||||
((inst << 44) >> 59);
|
||||
}
|
||||
|
||||
static uint32_t operand_bs(rv_inst inst)
|
||||
{
|
||||
return (inst << 32) >> 62;
|
||||
|
@ -4393,6 +4399,12 @@ static void decode_inst_operands(rv_decode *dec, rv_isa isa)
|
|||
dec->imm = operand_vimm(inst);
|
||||
dec->vm = operand_vm(inst);
|
||||
break;
|
||||
case rv_codec_vror_vi:
|
||||
dec->rd = operand_rd(inst);
|
||||
dec->rs2 = operand_rs2(inst);
|
||||
dec->imm = operand_vzimm6(inst);
|
||||
dec->vm = operand_vm(inst);
|
||||
break;
|
||||
case rv_codec_vsetvli:
|
||||
dec->rd = operand_rd(inst);
|
||||
dec->rs1 = operand_rs1(inst);
|
||||
|
@ -4677,7 +4689,7 @@ static void format_inst(char *buf, size_t buflen, size_t tab, rv_decode *dec)
|
|||
append(buf, tmp, buflen);
|
||||
break;
|
||||
case 'u':
|
||||
snprintf(tmp, sizeof(tmp), "%u", ((uint32_t)dec->imm & 0b11111));
|
||||
snprintf(tmp, sizeof(tmp), "%u", ((uint32_t)dec->imm & 0b111111));
|
||||
append(buf, tmp, buflen);
|
||||
break;
|
||||
case 'j':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue