mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
tcg: Introduce tcg_out_addi_ptr
Implement the function for arm, i386, and s390x, which will use it. Add stubs for all other backends. 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
273eb50c0f
commit
6a6d772e30
11 changed files with 86 additions and 0 deletions
|
@ -1069,6 +1069,14 @@ static void tcg_out_movi(TCGContext *s, TCGType type,
|
|||
}
|
||||
}
|
||||
|
||||
static void tcg_out_addi_ptr(TCGContext *s, TCGReg rd, TCGReg rs,
|
||||
tcg_target_long imm)
|
||||
{
|
||||
/* This function is only used for passing structs by reference. */
|
||||
tcg_debug_assert(TCG_TARGET_REG_BITS == 32);
|
||||
tcg_out_modrm_offset(s, OPC_LEA, rd, rs, imm);
|
||||
}
|
||||
|
||||
static inline void tcg_out_pushi(TCGContext *s, tcg_target_long val)
|
||||
{
|
||||
if (val == (int8_t)val) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue