mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
target/riscv: Replace DisasContext.w with DisasContext.ol
In preparation for RV128, consider more than just "w" for operand size modification. This will be used for the "d" insns from RV128 as well. Rename oper_len to get_olen to better match get_xlen. Reviewed-by: LIU Zhiwei <zhiwei_liu@c-sky.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20211020031709.359469-10-richard.henderson@linaro.org Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
905b9fcde1
commit
7667cafd5a
4 changed files with 63 additions and 44 deletions
|
@ -214,7 +214,7 @@ static bool trans_mulw(DisasContext *ctx, arg_mulw *a)
|
|||
{
|
||||
REQUIRE_64BIT(ctx);
|
||||
REQUIRE_EXT(ctx, RVM);
|
||||
ctx->w = true;
|
||||
ctx->ol = MXL_RV32;
|
||||
return gen_arith(ctx, a, EXT_NONE, tcg_gen_mul_tl);
|
||||
}
|
||||
|
||||
|
@ -222,7 +222,7 @@ static bool trans_divw(DisasContext *ctx, arg_divw *a)
|
|||
{
|
||||
REQUIRE_64BIT(ctx);
|
||||
REQUIRE_EXT(ctx, RVM);
|
||||
ctx->w = true;
|
||||
ctx->ol = MXL_RV32;
|
||||
return gen_arith(ctx, a, EXT_SIGN, gen_div);
|
||||
}
|
||||
|
||||
|
@ -230,7 +230,7 @@ static bool trans_divuw(DisasContext *ctx, arg_divuw *a)
|
|||
{
|
||||
REQUIRE_64BIT(ctx);
|
||||
REQUIRE_EXT(ctx, RVM);
|
||||
ctx->w = true;
|
||||
ctx->ol = MXL_RV32;
|
||||
return gen_arith(ctx, a, EXT_ZERO, gen_divu);
|
||||
}
|
||||
|
||||
|
@ -238,7 +238,7 @@ static bool trans_remw(DisasContext *ctx, arg_remw *a)
|
|||
{
|
||||
REQUIRE_64BIT(ctx);
|
||||
REQUIRE_EXT(ctx, RVM);
|
||||
ctx->w = true;
|
||||
ctx->ol = MXL_RV32;
|
||||
return gen_arith(ctx, a, EXT_SIGN, gen_rem);
|
||||
}
|
||||
|
||||
|
@ -246,6 +246,6 @@ static bool trans_remuw(DisasContext *ctx, arg_remuw *a)
|
|||
{
|
||||
REQUIRE_64BIT(ctx);
|
||||
REQUIRE_EXT(ctx, RVM);
|
||||
ctx->w = true;
|
||||
ctx->ol = MXL_RV32;
|
||||
return gen_arith(ctx, a, EXT_ZERO, gen_remu);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue