tcg: Remove tcg_target_get_call_iarg_regs_count
The TCG targets no longer need individual implementations.
Since commit 6a18ae2d29
,
'flags' is no longer used in tcg_target_get_call_iarg_regs_count.
The remaining tcg_target_get_call_iarg_regs_count is trivial and only
called once. Therefore the patch eliminates it completely.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
d73685e3c3
commit
6e17d0c5cd
@ -145,12 +145,6 @@ static void patch_reloc(uint8_t *code_ptr, int type,
|
||||
}
|
||||
}
|
||||
|
||||
/* maximum number of register used for input function arguments */
|
||||
static inline int tcg_target_get_call_iarg_regs_count(int flags)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
/* parse target specific constraints */
|
||||
static int target_parse_constraint(TCGArgConstraint *ct, const char **pct_str)
|
||||
{
|
||||
|
@ -175,12 +175,6 @@ static void patch_reloc(uint8_t *code_ptr, int type,
|
||||
*insn_ptr = insn;
|
||||
}
|
||||
|
||||
/* maximum number of register used for input function arguments */
|
||||
static inline int tcg_target_get_call_iarg_regs_count(int flags)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
/* parse target specific constraints */
|
||||
static int target_parse_constraint(TCGArgConstraint *ct, const char **pct_str)
|
||||
{
|
||||
|
@ -124,12 +124,6 @@ static void patch_reloc(uint8_t *code_ptr, int type,
|
||||
}
|
||||
}
|
||||
|
||||
/* maximum number of register used for input function arguments */
|
||||
static inline int tcg_target_get_call_iarg_regs_count(int flags)
|
||||
{
|
||||
return ARRAY_SIZE(tcg_target_call_iarg_regs);
|
||||
}
|
||||
|
||||
/* parse target specific constraints */
|
||||
static int target_parse_constraint(TCGArgConstraint *ct, const char **pct_str)
|
||||
{
|
||||
|
@ -176,12 +176,6 @@ static const int tcg_target_call_oarg_regs[] = {
|
||||
TCG_REG_R8
|
||||
};
|
||||
|
||||
/* maximum number of register used for input function arguments */
|
||||
static inline int tcg_target_get_call_iarg_regs_count(int flags)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
/*
|
||||
* opcode formation
|
||||
*/
|
||||
|
@ -185,12 +185,6 @@ static void patch_reloc(uint8_t *code_ptr, int type,
|
||||
}
|
||||
}
|
||||
|
||||
/* maximum number of register used for input function arguments */
|
||||
static inline int tcg_target_get_call_iarg_regs_count(int flags)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
/* parse target specific constraints */
|
||||
static int target_parse_constraint(TCGArgConstraint *ct, const char **pct_str)
|
||||
{
|
||||
|
@ -221,12 +221,6 @@ static void patch_reloc(uint8_t *code_ptr, int type,
|
||||
}
|
||||
}
|
||||
|
||||
/* maximum number of register used for input function arguments */
|
||||
static int tcg_target_get_call_iarg_regs_count(int flags)
|
||||
{
|
||||
return ARRAY_SIZE (tcg_target_call_iarg_regs);
|
||||
}
|
||||
|
||||
/* parse target specific constraints */
|
||||
static int target_parse_constraint(TCGArgConstraint *ct, const char **pct_str)
|
||||
{
|
||||
|
@ -208,12 +208,6 @@ static void patch_reloc (uint8_t *code_ptr, int type,
|
||||
}
|
||||
}
|
||||
|
||||
/* maximum number of register used for input function arguments */
|
||||
static int tcg_target_get_call_iarg_regs_count (int flags)
|
||||
{
|
||||
return ARRAY_SIZE (tcg_target_call_iarg_regs);
|
||||
}
|
||||
|
||||
/* parse target specific constraints */
|
||||
static int target_parse_constraint (TCGArgConstraint *ct, const char **pct_str)
|
||||
{
|
||||
|
@ -356,11 +356,6 @@ static void patch_reloc(uint8_t *code_ptr, int type,
|
||||
}
|
||||
}
|
||||
|
||||
static int tcg_target_get_call_iarg_regs_count(int flags)
|
||||
{
|
||||
return sizeof(tcg_target_call_iarg_regs) / sizeof(int);
|
||||
}
|
||||
|
||||
/* parse target specific constraints */
|
||||
static int target_parse_constraint(TCGArgConstraint *ct, const char **pct_str)
|
||||
{
|
||||
|
@ -133,12 +133,6 @@ static void patch_reloc(uint8_t *code_ptr, int type,
|
||||
}
|
||||
}
|
||||
|
||||
/* maximum number of register used for input function arguments */
|
||||
static inline int tcg_target_get_call_iarg_regs_count(int flags)
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
|
||||
/* parse target specific constraints */
|
||||
static int target_parse_constraint(TCGArgConstraint *ct, const char **pct_str)
|
||||
{
|
||||
|
@ -89,7 +89,6 @@ static void tcg_out_st(TCGContext *s, TCGType type, TCGReg arg, TCGReg arg1,
|
||||
tcg_target_long arg2);
|
||||
static int tcg_target_const_match(tcg_target_long val,
|
||||
const TCGArgConstraint *arg_ct);
|
||||
static int tcg_target_get_call_iarg_regs_count(int flags);
|
||||
|
||||
TCGOpDef tcg_op_defs[] = {
|
||||
#define DEF(s, oargs, iargs, cargs, flags) { #s, oargs, iargs, cargs, iargs + oargs + cargs, flags },
|
||||
@ -1853,7 +1852,7 @@ static int tcg_reg_alloc_call(TCGContext *s, const TCGOpDef *def,
|
||||
|
||||
flags = args[nb_oargs + nb_iargs];
|
||||
|
||||
nb_regs = tcg_target_get_call_iarg_regs_count(flags);
|
||||
nb_regs = ARRAY_SIZE(tcg_target_call_iarg_regs);
|
||||
if (nb_regs > nb_params)
|
||||
nb_regs = nb_params;
|
||||
|
||||
|
@ -863,12 +863,6 @@ static int tcg_target_const_match(tcg_target_long val,
|
||||
return arg_ct->ct & TCG_CT_CONST;
|
||||
}
|
||||
|
||||
/* Maximum number of register used for input function arguments. */
|
||||
static int tcg_target_get_call_iarg_regs_count(int flags)
|
||||
{
|
||||
return ARRAY_SIZE(tcg_target_call_iarg_regs);
|
||||
}
|
||||
|
||||
static void tcg_target_init(TCGContext *s)
|
||||
{
|
||||
#if defined(CONFIG_DEBUG_TCG_INTERPRETER)
|
||||
|
Loading…
Reference in New Issue
Block a user