From a4fbbd779a29b912299bc2830f0157513080ddb7 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 3 May 2021 16:47:37 -0700 Subject: tcg: Change parameters for tcg_target_const_match Change the return value to bool, because that's what is should have been from the start. Pass the ct mask instead of the whole TCGArgConstraint, as that's the only part that's relevant. Change the value argument to int64_t. We will need the extra width for 32-bit hosts wanting to match vector constants. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'tcg/tci') diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index ee6cdfec71..823ecd5d35 100644 --- a/tcg/tci/tcg-target.c.inc +++ b/tcg/tci/tcg-target.c.inc @@ -789,11 +789,9 @@ static inline bool tcg_out_sti(TCGContext *s, TCGType type, TCGArg val, } /* Test if a constant matches the constraint. */ -static int tcg_target_const_match(tcg_target_long val, TCGType type, - const TCGArgConstraint *arg_ct) +static bool tcg_target_const_match(int64_t val, TCGType type, int ct) { - /* No need to return 0 or 1, 0 or != 0 is good enough. */ - return arg_ct->ct & TCG_CT_CONST; + return ct & TCG_CT_CONST; } static void tcg_target_init(TCGContext *s) -- cgit v1.2.3