tcg: Generic expansion of tcg_gen_negsetcondi_*

Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson committed 2026-10-24 17:14:49 +02:00
1 parent 229a672254
commit 4666e2a960
3 files changed
+8 -16

No files matched your search

-4
View File
@@ -146,8 +146,6 @@ void tcg_gen_sextract_i32(TCGv_i32 ret, TCGv_i32 arg,
unsigned int ofs, unsigned int len);
void tcg_gen_extract2_i32(TCGv_i32 ret, TCGv_i32 al, TCGv_i32 ah,
unsigned int ofs);
void tcg_gen_negsetcondi_i32(TCGCond cond, TCGv_i32 ret,
TCGv_i32 arg1, int32_t arg2);
void tcg_gen_movcond_i32(TCGCond cond, TCGv_i32 ret, TCGv_i32 c1,
TCGv_i32 c2, TCGv_i32 v1, TCGv_i32 v2);
void tcg_gen_add2_i32(TCGv_i32 rl, TCGv_i32 rh, TCGv_i32 al,
@@ -211,8 +209,6 @@ void tcg_gen_sextract_i64(TCGv_i64 ret, TCGv_i64 arg,
unsigned int ofs, unsigned int len);
void tcg_gen_extract2_i64(TCGv_i64 ret, TCGv_i64 al, TCGv_i64 ah,
unsigned int ofs);
void tcg_gen_negsetcondi_i64(TCGCond cond, TCGv_i64 ret,
TCGv_i64 arg1, int64_t arg2);
void tcg_gen_movcond_i64(TCGCond cond, TCGv_i64 ret, TCGv_i64 c1,
TCGv_i64 c2, TCGv_i64 v1, TCGv_i64 v2);
void tcg_gen_add2_i64(TCGv_i64 rl, TCGv_i64 rh, TCGv_i64 al,
+1
View File
@@ -19,6 +19,7 @@ DEF3(muli, TCGV, TCGV, TINT)
DEF3(nand, TCGV, TCGV, TCGV)
DEF2(neg, TCGV, TCGV)
DEF4(negsetcond, TCGCond, TCGV, TCGV, TCGV)
DEF4(negsetcondi, TCGCond, TCGV, TCGV, TINT)
DEF3(nor, TCGV, TCGV, TCGV)
DEF2(not, TCGV, TCGV)
DEF3(or, TCGV, TCGV, TCGV)
+7 -12
View File
@@ -530,6 +530,13 @@ void tcg_gen_negsetcond(TCGType type, TCGCond cond, TCGTemp *dst,
}
}
void tcg_gen_negsetcondi(TCGType type, TCGCond cond, TCGTemp *dst,
TCGTemp *src1, int64_t src2)
{
tcg_gen_negsetcond(type, cond, dst, src1,
tcg_constant_internal(type, src2));
}
void tcg_gen_nor(TCGType type, TCGTemp *dst, TCGTemp *src1, TCGTemp *src2)
{
if (tcg_op_supported(INDEX_op_nor, type, 0)) {
@@ -719,12 +726,6 @@ void tcg_gen_xori(TCGType type, TCGTemp *dst, TCGTemp *src1, int64_t src2)
/* 32 bit ops */
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_clz_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2)
{
if (tcg_op_supported(INDEX_op_clz, TCG_TYPE_I32, 0)) {
@@ -1479,12 +1480,6 @@ void tcg_gen_st_i64(TCGv_i64 arg1, TCGv_ptr arg2, tcg_target_long offset)
tcg_gen_ldst_op_i64(INDEX_op_st, arg1, arg2, offset);
}
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_ext8s_i64(TCGv_i64 ret, TCGv_i64 arg)
{
tcg_gen_sextract_i64(ret, arg, 0, 8);