From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Subject: [PATCH 09/31] tcg: Move TCG_{LOW,HIGH} to tcg-internal.h
Date: Thu, 20 Oct 2022 21:52:20 +1000 [thread overview]
Message-ID: <20221020115242.2301066-10-richard.henderson@linaro.org> (raw)
In-Reply-To: <20221020115242.2301066-1-richard.henderson@linaro.org>
Move the error-generating fallback from tcg-op.c, and
replace "_link_error" with modern QEMU_ERROR markup.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/tcg/tcg.h | 12 ------------
tcg/tcg-internal.h | 14 ++++++++++++++
tcg/tcg-op.c | 10 +---------
3 files changed, 15 insertions(+), 21 deletions(-)
diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h
index 5c2254ce9f..d207bc47be 100644
--- a/include/tcg/tcg.h
+++ b/include/tcg/tcg.h
@@ -737,18 +737,6 @@ static inline TCGv_vec temp_tcgv_vec(TCGTemp *t)
return (TCGv_vec)temp_tcgv_i32(t);
}
-#if TCG_TARGET_REG_BITS == 32
-static inline TCGv_i32 TCGV_LOW(TCGv_i64 t)
-{
- return temp_tcgv_i32(tcgv_i64_temp(t));
-}
-
-static inline TCGv_i32 TCGV_HIGH(TCGv_i64 t)
-{
- return temp_tcgv_i32(tcgv_i64_temp(t) + 1);
-}
-#endif
-
static inline TCGArg tcg_get_insn_param(TCGOp *op, int arg)
{
return op->args[arg];
diff --git a/tcg/tcg-internal.h b/tcg/tcg-internal.h
index cc82088d52..a9ea27f67a 100644
--- a/tcg/tcg-internal.h
+++ b/tcg/tcg-internal.h
@@ -59,4 +59,18 @@ static inline unsigned tcg_call_flags(TCGOp *op)
return tcg_call_info(op)->flags;
}
+#if TCG_TARGET_REG_BITS == 32
+static inline TCGv_i32 TCGV_LOW(TCGv_i64 t)
+{
+ return temp_tcgv_i32(tcgv_i64_temp(t));
+}
+static inline TCGv_i32 TCGV_HIGH(TCGv_i64 t)
+{
+ return temp_tcgv_i32(tcgv_i64_temp(t) + 1);
+}
+#else
+extern TCGv_i32 TCGV_LOW(TCGv_i64) QEMU_ERROR("32-bit code path is reachable");
+extern TCGv_i32 TCGV_HIGH(TCGv_i64) QEMU_ERROR("32-bit code path is reachable");
+#endif
+
#endif /* TCG_INTERNAL_H */
diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c
index 019fab00cc..3ed98ffa01 100644
--- a/tcg/tcg-op.c
+++ b/tcg/tcg-op.c
@@ -28,16 +28,8 @@
#include "tcg/tcg-op.h"
#include "tcg/tcg-mo.h"
#include "exec/plugin-gen.h"
+#include "tcg-internal.h"
-/* Reduce the number of ifdefs below. This assumes that all uses of
- TCGV_HIGH and TCGV_LOW are properly protected by a conditional that
- the compiler can eliminate. */
-#if TCG_TARGET_REG_BITS == 64
-extern TCGv_i32 TCGV_LOW_link_error(TCGv_i64);
-extern TCGv_i32 TCGV_HIGH_link_error(TCGv_i64);
-#define TCGV_LOW TCGV_LOW_link_error
-#define TCGV_HIGH TCGV_HIGH_link_error
-#endif
void tcg_gen_op1(TCGOpcode opc, TCGArg a1)
{
--
2.34.1
next prev parent reply other threads:[~2022-10-20 14:05 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-20 11:52 [PATCH 00/31] tcg: Support for Int128 with helpers Richard Henderson
2022-10-20 11:52 ` [PATCH 01/31] tcg: Tidy tcg_reg_alloc_op Richard Henderson
2022-10-20 11:52 ` [PATCH 02/31] tcg: Introduce paired register allocation Richard Henderson
2022-10-20 11:52 ` [PATCH 03/31] tcg/s390x: Use register pair allocation for div and mulu2 Richard Henderson
2022-10-20 11:52 ` [PATCH 04/31] tcg/arm: Use register pair allocation for qemu_{ld, st}_i64 Richard Henderson
2022-10-20 11:52 ` [PATCH 05/31] meson: Move CONFIG_TCG_INTERPRETER to config_host Richard Henderson
2022-10-20 11:52 ` [PATCH 06/31] tcg: Remove TCG_TARGET_STACK_GROWSUP Richard Henderson
2022-10-20 15:25 ` Philippe Mathieu-Daudé
2022-10-20 11:52 ` [PATCH 07/31] accel/tcg: Set cflags_next_tb in cpu_common_initfn Richard Henderson
2022-10-20 11:52 ` [PATCH 08/31] target/sparc: Avoid TCGV_{LOW,HIGH} Richard Henderson
2022-10-20 11:52 ` Richard Henderson [this message]
2022-10-20 14:52 ` [PATCH 09/31] tcg: Move TCG_{LOW,HIGH} to tcg-internal.h Philippe Mathieu-Daudé
2022-10-20 11:52 ` [PATCH 10/31] tcg: Add temp_subindex to TCGTemp Richard Henderson
2022-10-20 14:57 ` Philippe Mathieu-Daudé
2022-10-20 11:52 ` [PATCH 11/31] tcg: Allocate TCGTemp pairs in host memory order Richard Henderson
2022-10-20 15:01 ` Philippe Mathieu-Daudé
2022-10-20 21:33 ` Richard Henderson
2022-10-20 11:52 ` [PATCH 12/31] tcg: Move TCG_TYPE_COUNT outside enum Richard Henderson
2022-10-20 15:03 ` Philippe Mathieu-Daudé
2022-10-20 11:52 ` [PATCH 13/31] tcg: Introduce tcg_type_size Richard Henderson
2022-10-20 11:52 ` [PATCH 14/31] tcg: Introduce TCGCallReturnKind and TCGCallArgumentKind Richard Henderson
2022-10-20 11:52 ` [PATCH 15/31] tcg: Replace TCG_TARGET_CALL_ALIGN_ARGS with TCG_TARGET_CALL_ARG_I64 Richard Henderson
2022-10-20 15:12 ` Philippe Mathieu-Daudé
2022-10-20 21:39 ` Richard Henderson
2022-10-20 11:52 ` [PATCH 16/31] tcg: Replace TCG_TARGET_EXTEND_ARGS with TCG_TARGET_CALL_ARG_I32 Richard Henderson
2022-10-20 11:52 ` [PATCH 17/31] tcg: Use TCG_CALL_ARG_EVEN for TCI special case Richard Henderson
2022-10-20 11:52 ` [PATCH 18/31] tcg: Reorg function calls Richard Henderson
2022-10-20 11:52 ` [PATCH 19/31] tcg: Move ffi_cif pointer into TCGHelperInfo Richard Henderson
2022-10-20 11:52 ` [PATCH 20/31] tcg: Add TCGHelperInfo argument to tcg_out_call Richard Henderson
2022-10-20 15:41 ` Philippe Mathieu-Daudé
2022-10-20 11:52 ` [PATCH 21/31] tcg: Define TCG_TYPE_I128 and related helper macros Richard Henderson
2022-10-20 11:52 ` [PATCH 22/31] tcg: Add TCG_CALL_{RET,ARG}_NORMAL_4 Richard Henderson
2022-10-20 11:52 ` [PATCH 23/31] tcg: Allocate objects contiguously in temp_allocate_frame Richard Henderson
2022-10-20 11:52 ` [PATCH 24/31] tcg: Introduce tcg_out_addi_ptr Richard Henderson
2022-10-20 11:52 ` [PATCH 25/31] tcg: Add TCG_CALL_{RET,ARG}_BY_REF Richard Henderson
2022-10-20 11:52 ` [PATCH 26/31] tcg: Introduce tcg_target_call_oarg_reg Richard Henderson
2022-10-20 11:52 ` [PATCH 27/31] tcg: Add TCG_CALL_RET_BY_VEC Richard Henderson
2022-10-20 11:52 ` [PATCH 28/31] include/qemu/int128: Use Int128 structure for TCI Richard Henderson
2022-10-20 11:52 ` [PATCH 29/31] tcg: Add TCG_TARGET_CALL_{RET,ARG}_I128 Richard Henderson
2022-10-20 11:52 ` [PATCH 30/31] tcg: Add temp allocation for TCGv_i128 Richard Henderson
2022-10-20 11:52 ` [PATCH 31/31] tcg: Add tcg_gen_extr_i128_i64, tcg_gen_concat_i64_i128 Richard Henderson
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=20221020115242.2301066-10-richard.henderson@linaro.org \
--to=richard.henderson@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).