mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 10:34:58 -06:00
tcg: Introduce tcg_target_call_oarg_reg
Replace the flat array tcg_target_call_oarg_regs[] with a function call including the TCGCallReturnKind. Extend the set of registers for ARM to r0-r3 to match the ABI: https://github.com/ARM-software/abi-aa/blob/main/aapcs32/aapcs32.rst#result-return Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
313bdea84d
commit
5e3d0c199f
11 changed files with 72 additions and 46 deletions
|
@ -63,9 +63,13 @@ static const int tcg_target_call_iarg_regs[8] = {
|
|||
TCG_REG_X0, TCG_REG_X1, TCG_REG_X2, TCG_REG_X3,
|
||||
TCG_REG_X4, TCG_REG_X5, TCG_REG_X6, TCG_REG_X7
|
||||
};
|
||||
static const int tcg_target_call_oarg_regs[1] = {
|
||||
TCG_REG_X0
|
||||
};
|
||||
|
||||
static TCGReg tcg_target_call_oarg_reg(TCGCallReturnKind kind, int slot)
|
||||
{
|
||||
tcg_debug_assert(kind == TCG_CALL_RET_NORMAL);
|
||||
tcg_debug_assert(slot >= 0 && slot <= 1);
|
||||
return TCG_REG_X0 + slot;
|
||||
}
|
||||
|
||||
#define TCG_REG_TMP TCG_REG_X30
|
||||
#define TCG_VEC_TMP TCG_REG_V31
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue