mirror of https://github.com/xqemu/xqemu.git
tcg/i386: Remove unused registers from tcg_target_call_iarg_regs
32 bit x86 hosts don't need registers for helper function arguments because they use the default stack based calling convention. Removing the registers allows simpler code for function tcg_target_get_call_iarg_regs_count. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
b18212c668
commit
d73685e3c3
|
@ -75,9 +75,7 @@ static const int tcg_target_call_iarg_regs[] = {
|
||||||
TCG_REG_R8,
|
TCG_REG_R8,
|
||||||
TCG_REG_R9,
|
TCG_REG_R9,
|
||||||
#else
|
#else
|
||||||
TCG_REG_EAX,
|
/* 32 bit mode uses stack based calling convention (GCC default). */
|
||||||
TCG_REG_EDX,
|
|
||||||
TCG_REG_ECX
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -129,11 +127,7 @@ static void patch_reloc(uint8_t *code_ptr, int type,
|
||||||
/* maximum number of register used for input function arguments */
|
/* maximum number of register used for input function arguments */
|
||||||
static inline int tcg_target_get_call_iarg_regs_count(int flags)
|
static inline int tcg_target_get_call_iarg_regs_count(int flags)
|
||||||
{
|
{
|
||||||
if (TCG_TARGET_REG_BITS == 64) {
|
|
||||||
return ARRAY_SIZE(tcg_target_call_iarg_regs);
|
return ARRAY_SIZE(tcg_target_call_iarg_regs);
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* parse target specific constraints */
|
/* parse target specific constraints */
|
||||||
|
|
Loading…
Reference in New Issue