Steal bits from out_kind to not increase the size of the structure. Both types only require a few bits anyway. Fill in the field in init_call_layout, but don't use it yet. Void calls get TCG_TYPE_I32, as there is no void type to use.
Signed-off-by: Richard Henderson <richard.hender...@linaro.org> --- include/tcg/helper-info.h | 3 ++- tcg/tcg.c | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/tcg/helper-info.h b/include/tcg/helper-info.h index 909fe73afa..7730826867 100644 --- a/include/tcg/helper-info.h +++ b/include/tcg/helper-info.h @@ -58,7 +58,8 @@ struct TCGHelperInfo { unsigned flags : 8; unsigned nr_in : 8; unsigned nr_out : 8; - TCGCallReturnKind out_kind : 8; + TCGCallReturnKind out_kind : 4; + TCGType out_type : 4; /* Maximum physical arguments are constrained by TCG_TYPE_I128. */ TCGCallArgumentLoc in[MAX_CALL_IARGS * (128 / TCG_TARGET_REG_BITS)]; diff --git a/tcg/tcg.c b/tcg/tcg.c index f8c4394e1d..9a1e85ba41 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1138,20 +1138,27 @@ static void init_call_layout(TCGHelperInfo *info) break; case dh_typecode_i32: case dh_typecode_s32: + info->nr_out = 1; + info->out_kind = TCG_CALL_RET_NORMAL; + info->out_type = TCG_TYPE_I32; + break; case dh_typecode_ptr: info->nr_out = 1; info->out_kind = TCG_CALL_RET_NORMAL; + info->out_type = TCG_TYPE_PTR; break; case dh_typecode_i64: case dh_typecode_s64: info->nr_out = 64 / TCG_TARGET_REG_BITS; info->out_kind = TCG_CALL_RET_NORMAL; + info->out_type = TCG_TYPE_I64; /* Query the last register now to trigger any assert early. */ tcg_target_call_oarg_reg(info->out_kind, info->nr_out - 1); break; case dh_typecode_i128: info->nr_out = 128 / TCG_TARGET_REG_BITS; info->out_kind = TCG_TARGET_CALL_RET_I128; + info->out_type = TCG_TYPE_I128; switch (TCG_TARGET_CALL_RET_I128) { case TCG_CALL_RET_NORMAL: /* Query the last register now to trigger any assert early. */ -- 2.43.0