mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
target/riscv: Merge argument decode for RVC shifti
Special handling for IMM==0 is the only difference between RVC shifti and RVI shifti. This can be handled with !function. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Palmer Dabbelt <palmer@sifive.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
This commit is contained in:
parent
e1d455dd91
commit
6cafec92f1
3 changed files with 12 additions and 53 deletions
|
@ -558,6 +558,12 @@ static int ex_rvc_register(DisasContext *ctx, int reg)
|
|||
return 8 + reg;
|
||||
}
|
||||
|
||||
static int ex_rvc_shifti(DisasContext *ctx, int imm)
|
||||
{
|
||||
/* For RV128 a shamt of 0 means a shift by 64. */
|
||||
return imm ? imm : 64;
|
||||
}
|
||||
|
||||
/* Include the auto-generated decoder for 32 bit insn */
|
||||
#include "decode_insn32.inc.c"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue