From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, "Alex Bennée" <alex.bennee@linaro.org>
Subject: [PULL 09/40] tcg: Add TCG_CALL_RET_BY_VEC
Date: Sat, 4 Feb 2023 06:32:39 -1000 [thread overview]
Message-ID: <20230204163310.815536-10-richard.henderson@linaro.org> (raw)
In-Reply-To: <20230204163310.815536-1-richard.henderson@linaro.org>
This will be used by _WIN64 to return i128. Not yet used,
because allocation is not yet enabled.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/tcg-internal.h | 1 +
tcg/tcg.c | 19 +++++++++++++++++++
2 files changed, 20 insertions(+)
diff --git a/tcg/tcg-internal.h b/tcg/tcg-internal.h
index 2ec1ea01df..33f1d8b411 100644
--- a/tcg/tcg-internal.h
+++ b/tcg/tcg-internal.h
@@ -37,6 +37,7 @@
typedef enum {
TCG_CALL_RET_NORMAL, /* by registers */
TCG_CALL_RET_BY_REF, /* for i128, by reference */
+ TCG_CALL_RET_BY_VEC, /* for i128, by vector register */
} TCGCallReturnKind;
typedef enum {
diff --git a/tcg/tcg.c b/tcg/tcg.c
index a77483eee8..098be83b00 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -752,6 +752,10 @@ static void init_call_layout(TCGHelperInfo *info)
/* Query the last register now to trigger any assert early. */
tcg_target_call_oarg_reg(info->out_kind, info->nr_out - 1);
break;
+ case TCG_CALL_RET_BY_VEC:
+ /* Query the single register now to trigger any assert early. */
+ tcg_target_call_oarg_reg(TCG_CALL_RET_BY_VEC, 0);
+ break;
case TCG_CALL_RET_BY_REF:
/*
* Allocate the first argument to the output.
@@ -4605,6 +4609,21 @@ static void tcg_reg_alloc_call(TCGContext *s, TCGOp *op)
}
break;
+ case TCG_CALL_RET_BY_VEC:
+ {
+ TCGTemp *ts = arg_temp(op->args[0]);
+
+ tcg_debug_assert(ts->base_type == TCG_TYPE_I128);
+ tcg_debug_assert(ts->temp_subindex == 0);
+ if (!ts->mem_allocated) {
+ temp_allocate_frame(s, ts);
+ }
+ tcg_out_st(s, TCG_TYPE_V128,
+ tcg_target_call_oarg_reg(TCG_CALL_RET_BY_VEC, 0),
+ ts->mem_base->reg, ts->mem_offset);
+ }
+ /* fall through to mark all parts in memory */
+
case TCG_CALL_RET_BY_REF:
/* The callee has performed a write through the reference. */
for (i = 0; i < nb_oargs; i++) {
--
2.34.1
next prev parent reply other threads:[~2023-02-04 16:37 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-04 16:32 [PULL 00/40] tcg patch queue Richard Henderson
2023-02-04 16:32 ` [PULL 01/40] accel/tcg: Test CPUJumpCache in tb_jmp_cache_clear_page Richard Henderson
2023-02-04 16:32 ` [PULL 02/40] tcg: Init temp_subindex in liveness_pass_2 Richard Henderson
2023-02-04 16:32 ` [PULL 03/40] tcg: Define TCG_TYPE_I128 and related helper macros Richard Henderson
2023-02-04 16:32 ` [PULL 04/40] tcg: Handle dh_typecode_i128 with TCG_CALL_{RET, ARG}_NORMAL Richard Henderson
2023-02-04 16:32 ` [PULL 05/40] tcg: Allocate objects contiguously in temp_allocate_frame Richard Henderson
2023-02-04 16:32 ` [PULL 06/40] tcg: Introduce tcg_out_addi_ptr Richard Henderson
2023-02-04 16:32 ` [PULL 07/40] tcg: Add TCG_CALL_{RET,ARG}_BY_REF Richard Henderson
2023-02-04 16:32 ` [PULL 08/40] tcg: Introduce tcg_target_call_oarg_reg Richard Henderson
2023-02-04 16:32 ` Richard Henderson [this message]
2023-02-04 16:32 ` [PULL 10/40] include/qemu/int128: Use Int128 structure for TCI Richard Henderson
2023-02-04 16:32 ` [PULL 11/40] tcg/i386: Add TCG_TARGET_CALL_{RET,ARG}_I128 Richard Henderson
2023-02-04 16:32 ` [PULL 12/40] tcg/tci: Fix big-endian return register ordering Richard Henderson
2023-02-04 16:32 ` [PULL 13/40] tcg/tci: Add TCG_TARGET_CALL_{RET,ARG}_I128 Richard Henderson
2023-02-04 16:32 ` [PULL 14/40] tcg: " Richard Henderson
2023-02-04 16:32 ` [PULL 15/40] tcg: Add temp allocation for TCGv_i128 Richard Henderson
2023-02-04 16:32 ` [PULL 16/40] tcg: Add basic data movement " Richard Henderson
2023-02-04 16:32 ` [PULL 17/40] tcg: Add guest load/store primitives " Richard Henderson
2023-02-04 16:32 ` [PULL 18/40] tcg: Add tcg_gen_{non}atomic_cmpxchg_i128 Richard Henderson
2023-02-04 16:32 ` [PULL 19/40] tcg: Split out tcg_gen_nonatomic_cmpxchg_i{32,64} Richard Henderson
2023-02-04 16:32 ` [PULL 20/40] target/arm: Use tcg_gen_atomic_cmpxchg_i128 for STXP Richard Henderson
2023-02-04 16:32 ` [PULL 21/40] target/arm: Use tcg_gen_atomic_cmpxchg_i128 for CASP Richard Henderson
2023-02-04 16:32 ` [PULL 22/40] target/ppc: Use tcg_gen_atomic_cmpxchg_i128 for STQCX Richard Henderson
2023-02-04 16:32 ` [PULL 23/40] tests/tcg/s390x: Add div.c Richard Henderson
2023-02-04 16:32 ` [PULL 24/40] tests/tcg/s390x: Add clst.c Richard Henderson
2023-02-04 16:32 ` [PULL 25/40] tests/tcg/s390x: Add long-double.c Richard Henderson
2023-02-04 16:32 ` [PULL 26/40] tests/tcg/s390x: Add cdsg.c Richard Henderson
2023-02-04 16:32 ` [PULL 27/40] target/s390x: Use a single return for helper_divs32/u32 Richard Henderson
2023-02-04 16:32 ` [PULL 28/40] target/s390x: Use a single return for helper_divs64/u64 Richard Henderson
2023-02-04 16:32 ` [PULL 29/40] target/s390x: Use Int128 for return from CLST Richard Henderson
2023-02-04 16:33 ` [PULL 30/40] target/s390x: Use Int128 for return from CKSM Richard Henderson
2023-02-04 16:33 ` [PULL 31/40] target/s390x: Use Int128 for return from TRE Richard Henderson
2023-02-04 16:33 ` [PULL 32/40] target/s390x: Copy wout_x1 to wout_x1_P Richard Henderson
2023-02-04 16:33 ` [PULL 33/40] target/s390x: Use Int128 for returning float128 Richard Henderson
2023-02-04 16:33 ` [PULL 34/40] target/s390x: Use Int128 for passing float128 Richard Henderson
2023-02-04 16:33 ` [PULL 35/40] target/s390x: Use tcg_gen_atomic_cmpxchg_i128 for CDSG Richard Henderson
2023-02-04 16:33 ` [PULL 36/40] target/s390x: Implement CC_OP_NZ in gen_op_calc_cc Richard Henderson
2023-02-04 16:33 ` [PULL 37/40] target/i386: Split out gen_cmpxchg8b, gen_cmpxchg16b Richard Henderson
2023-02-04 16:33 ` [PULL 38/40] target/i386: Inline cmpxchg8b Richard Henderson
2023-02-04 16:33 ` [PULL 39/40] target/i386: Inline cmpxchg16b Richard Henderson
2023-02-04 16:33 ` [PULL 40/40] tcg/aarch64: Fix patching of LDR in tb_target_set_jmp_target Richard Henderson
2023-02-05 16:48 ` [PULL 00/40] tcg patch queue Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230204163310.815536-10-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).