mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
target/riscv: rvb: shift ones
Signed-off-by: Kito Cheng <kito.cheng@sifive.com> Signed-off-by: Frank Chang <frank.chang@sifive.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20210505160620.15723-11-frank.chang@sifive.com Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
23cd17773b
commit
91d8fc6768
3 changed files with 74 additions and 0 deletions
|
@ -613,6 +613,20 @@ static void gen_bext(TCGv ret, TCGv arg1, TCGv shamt)
|
|||
tcg_gen_andi_tl(ret, ret, 1);
|
||||
}
|
||||
|
||||
static void gen_slo(TCGv ret, TCGv arg1, TCGv arg2)
|
||||
{
|
||||
tcg_gen_not_tl(ret, arg1);
|
||||
tcg_gen_shl_tl(ret, ret, arg2);
|
||||
tcg_gen_not_tl(ret, ret);
|
||||
}
|
||||
|
||||
static void gen_sro(TCGv ret, TCGv arg1, TCGv arg2)
|
||||
{
|
||||
tcg_gen_not_tl(ret, arg1);
|
||||
tcg_gen_shr_tl(ret, ret, arg2);
|
||||
tcg_gen_not_tl(ret, ret);
|
||||
}
|
||||
|
||||
static void gen_ctzw(TCGv ret, TCGv arg1)
|
||||
{
|
||||
tcg_gen_ori_tl(ret, arg1, (target_ulong)MAKE_64BIT_MASK(32, 32));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue