mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
tcg: add negsetcondi
This can be useful to write a shift bit extraction that does not depend on TARGET_LONG_BITS. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20231019104648.389942-15-pbonzini@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
46c684c862
commit
93c86ecd77
3 changed files with 18 additions and 0 deletions
12
tcg/tcg-op.c
12
tcg/tcg-op.c
|
@ -291,6 +291,12 @@ void tcg_gen_negsetcond_i32(TCGCond cond, TCGv_i32 ret,
|
|||
}
|
||||
}
|
||||
|
||||
void tcg_gen_negsetcondi_i32(TCGCond cond, TCGv_i32 ret,
|
||||
TCGv_i32 arg1, int32_t arg2)
|
||||
{
|
||||
tcg_gen_negsetcond_i32(cond, ret, arg1, tcg_constant_i32(arg2));
|
||||
}
|
||||
|
||||
void tcg_gen_muli_i32(TCGv_i32 ret, TCGv_i32 arg1, int32_t arg2)
|
||||
{
|
||||
if (arg2 == 0) {
|
||||
|
@ -1602,6 +1608,12 @@ void tcg_gen_setcondi_i64(TCGCond cond, TCGv_i64 ret,
|
|||
}
|
||||
}
|
||||
|
||||
void tcg_gen_negsetcondi_i64(TCGCond cond, TCGv_i64 ret,
|
||||
TCGv_i64 arg1, int64_t arg2)
|
||||
{
|
||||
tcg_gen_negsetcond_i64(cond, ret, arg1, tcg_constant_i64(arg2));
|
||||
}
|
||||
|
||||
void tcg_gen_negsetcond_i64(TCGCond cond, TCGv_i64 ret,
|
||||
TCGv_i64 arg1, TCGv_i64 arg2)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue