diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2022-10-18 21:28:04 +1000 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-02-04 06:19:42 -1000 |
commit | 6a6d772e30d62e209587ef341df243e9789f5a9f (patch) | |
tree | 5528dffefabf63075cb8591d49291fba7c40b7f7 /tcg/i386 | |
parent | 273eb50c0fed6696d4600d9cf26f1b2dfcccab0c (diff) | |
download | qemu-6a6d772e30d62e209587ef341df243e9789f5a9f.zip qemu-6a6d772e30d62e209587ef341df243e9789f5a9f.tar.gz qemu-6a6d772e30d62e209587ef341df243e9789f5a9f.tar.bz2 |
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>
Diffstat (limited to 'tcg/i386')
-rw-r--r-- | tcg/i386/tcg-target.c.inc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc index c71c3e6..7b573bd 100644 --- a/tcg/i386/tcg-target.c.inc +++ b/tcg/i386/tcg-target.c.inc @@ -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) { |