On 8/1/25 22:23, Richard Henderson wrote:
On 1/8/25 09:39, Philippe Mathieu-Daudé wrote:
On 7/1/25 08:59, Richard Henderson wrote:
In the replacement, drop the TCGType - TCG_TYPE_V64 adjustment,
except for the call to tcg_out_vec_op. Pass type to tcg_gen_op[1-6],
so that all integer opcodes gain the type.
Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
---
include/tcg/tcg.h | 2 +-
tcg/tcg-internal.h | 13 ++---
tcg/optimize.c | 10 +---
tcg/tcg-op-ldst.c | 26 ++++++----
tcg/tcg-op-vec.c | 8 +--
tcg/tcg-op.c | 113 +++++++++++++++++++++++------------------
tcg/tcg.c | 11 ++--
docs/devel/tcg-ops.rst | 15 +++---
8 files changed, 105 insertions(+), 93 deletions(-)
@@ -3320,7 +3333,7 @@ void tcg_gen_exit_tb(const TranslationBlock
*tb, unsigned idx)
tcg_debug_assert(idx == TB_EXIT_REQUESTED);
}
- tcg_gen_op1i(INDEX_op_exit_tb, val);
+ tcg_gen_op1i(INDEX_op_exit_tb, 0, val);
Having TCG_TYPE_I32 = 0 is confusing.
Should we define TCG_TYPE_VOID = 0 first, shifting all other types
(and updating tcg_type_size())?
No. E.g. tcg/aarch64/tcg-target.c.inc:
/* We're going to re-use TCGType in setting of the SF bit, which controls
the size of the operation performed. If we know the values match, it
makes things much cleaner. */
QEMU_BUILD_BUG_ON(TCG_TYPE_I32 != 0 || TCG_TYPE_I64 != 1);
Obviously this value is never used for INDEX_op_exit_tb (and others).
If you really think it's important, we could add VOID as another value.
But I think that might be more confusing than anything else. So far
we're restricted to integer and vector types. If we add a third
classification, we're going to want to adjust all of the checks everywhere.
No need for VOID, I'm good ;)
Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>