mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-19 08:02:15 -06:00
target/riscv: Remove condition guarding register zero for auipc and lui
Commit 57c108b864
introduced gen_set_gpri(), which already contains
a check for if the destination register is 'zero'. The check in auipc
and lui are then redundant. This patch removes those checks.
Signed-off-by: Víctor Colombo <victor.colombo@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20220610165517.47517-1-victor.colombo@eldorado.org.br>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
d495e432c0
commit
4e245a9e26
1 changed files with 2 additions and 6 deletions
|
@ -32,17 +32,13 @@ static bool trans_c64_illegal(DisasContext *ctx, arg_empty *a)
|
||||||
|
|
||||||
static bool trans_lui(DisasContext *ctx, arg_lui *a)
|
static bool trans_lui(DisasContext *ctx, arg_lui *a)
|
||||||
{
|
{
|
||||||
if (a->rd != 0) {
|
|
||||||
gen_set_gpri(ctx, a->rd, a->imm);
|
gen_set_gpri(ctx, a->rd, a->imm);
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool trans_auipc(DisasContext *ctx, arg_auipc *a)
|
static bool trans_auipc(DisasContext *ctx, arg_auipc *a)
|
||||||
{
|
{
|
||||||
if (a->rd != 0) {
|
|
||||||
gen_set_gpri(ctx, a->rd, a->imm + ctx->base.pc_next);
|
gen_set_gpri(ctx, a->rd, a->imm + ctx->base.pc_next);
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue