[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 77/80] tcg: Remove TARGET_LONG_BITS, TCG_TYPE_TL
|
From: |
Richard Henderson |
|
Subject: |
[PULL 77/80] tcg: Remove TARGET_LONG_BITS, TCG_TYPE_TL |
|
Date: |
Tue, 16 May 2023 12:41:42 -0700 |
All uses replaced with TCGContext.addr_type.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/tcg.c | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 5a2b2b1371..4bd598c18b 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -5612,12 +5612,7 @@ static void tcg_out_ld_helper_args(TCGContext *s, const
TCGLabelQemuLdst *ldst,
next_arg = 1;
loc = &info->in[next_arg];
- if (TCG_TARGET_REG_BITS == 64 || TARGET_LONG_BITS == 64) {
- nmov = tcg_out_helper_add_mov(mov, loc, TCG_TYPE_I64, TCG_TYPE_TL,
- ldst->addrlo_reg, ldst->addrhi_reg);
- tcg_out_helper_load_slots(s, nmov, mov, parm);
- next_arg += nmov;
- } else {
+ if (TCG_TARGET_REG_BITS == 32 && s->addr_type == TCG_TYPE_I32) {
/*
* 32-bit host with 32-bit guest: zero-extend the guest address
* to 64-bits for the helper by storing the low part, then
@@ -5631,6 +5626,11 @@ static void tcg_out_ld_helper_args(TCGContext *s, const
TCGLabelQemuLdst *ldst,
tcg_out_helper_load_imm(s, loc[!HOST_BIG_ENDIAN].arg_slot,
TCG_TYPE_I32, 0, parm);
next_arg += 2;
+ } else {
+ nmov = tcg_out_helper_add_mov(mov, loc, TCG_TYPE_I64, s->addr_type,
+ ldst->addrlo_reg, ldst->addrhi_reg);
+ tcg_out_helper_load_slots(s, nmov, mov, parm);
+ next_arg += nmov;
}
switch (info->out_kind) {
@@ -5785,12 +5785,7 @@ static void tcg_out_st_helper_args(TCGContext *s, const
TCGLabelQemuLdst *ldst,
/* Handle addr argument. */
loc = &info->in[next_arg];
- if (TCG_TARGET_REG_BITS == 64 || TARGET_LONG_BITS == 64) {
- n = tcg_out_helper_add_mov(mov, loc, TCG_TYPE_I64, TCG_TYPE_TL,
- ldst->addrlo_reg, ldst->addrhi_reg);
- next_arg += n;
- nmov += n;
- } else {
+ if (TCG_TARGET_REG_BITS == 32 && s->addr_type == TCG_TYPE_I32) {
/*
* 32-bit host with 32-bit guest: zero-extend the guest address
* to 64-bits for the helper by storing the low part. Later,
@@ -5802,6 +5797,11 @@ static void tcg_out_st_helper_args(TCGContext *s, const
TCGLabelQemuLdst *ldst,
ldst->addrlo_reg, -1);
next_arg += 2;
nmov += 1;
+ } else {
+ n = tcg_out_helper_add_mov(mov, loc, TCG_TYPE_I64, s->addr_type,
+ ldst->addrlo_reg, ldst->addrhi_reg);
+ next_arg += n;
+ nmov += n;
}
/* Handle data argument. */
@@ -5847,7 +5847,8 @@ static void tcg_out_st_helper_args(TCGContext *s, const
TCGLabelQemuLdst *ldst,
g_assert_not_reached();
}
- if (TCG_TARGET_REG_BITS == 32 && TARGET_LONG_BITS == 32) {
+ if (TCG_TARGET_REG_BITS == 32 && s->addr_type == TCG_TYPE_I32) {
+ /* Zero extend the address by loading a zero for the high part. */
loc = &info->in[1 + !HOST_BIG_ENDIAN];
tcg_out_helper_load_imm(s, loc->arg_slot, TCG_TYPE_I32, 0, parm);
}
--
2.34.1
- [PULL 59/80] accel/tcg: Merge gen_mem_wrapped with plugin_gen_empty_mem_callback, (continued)
- [PULL 59/80] accel/tcg: Merge gen_mem_wrapped with plugin_gen_empty_mem_callback, Richard Henderson, 2023/05/16
- [PULL 70/80] tcg/i386: Adjust type of tlb_mask, Richard Henderson, 2023/05/16
- [PULL 53/80] tcg: Split out memory ops to tcg-op-ldst.c, Richard Henderson, 2023/05/16
- [PULL 63/80] tcg: Add addr_type to TCGContext, Richard Henderson, 2023/05/16
- [PULL 66/80] tcg: Split INDEX_op_qemu_{ld, st}* for guest address size, Richard Henderson, 2023/05/16
- [PULL 72/80] tcg/arm: Remove TARGET_LONG_BITS, Richard Henderson, 2023/05/16
- [PULL 73/80] tcg/aarch64: Remove USE_GUEST_BASE, Richard Henderson, 2023/05/16
- [PULL 76/80] tcg/mips: Remove TARGET_LONG_BITS, TCG_TYPE_TL, Richard Henderson, 2023/05/16
- [PULL 67/80] tcg/tci: Elimnate TARGET_LONG_BITS, target_ulong, Richard Henderson, 2023/05/16
- [PULL 78/80] tcg: Add page_bits and page_mask to TCGContext, Richard Henderson, 2023/05/16
- [PULL 77/80] tcg: Remove TARGET_LONG_BITS, TCG_TYPE_TL,
Richard Henderson <=
- [PULL 60/80] accel/tcg: Merge do_gen_mem_cb into caller, Richard Henderson, 2023/05/16
- [PULL 62/80] accel/tcg: Widen plugin_gen_empty_mem_callback to i64, Richard Henderson, 2023/05/16
- [PULL 71/80] tcg/i386: Remove TARGET_LONG_BITS, TCG_TYPE_TL, Richard Henderson, 2023/05/16
- [PULL 69/80] tcg/i386: Conditionalize tcg_out_extu_i32_i64, Richard Henderson, 2023/05/16
- [PULL 75/80] tcg/loongarch64: Remove TARGET_LONG_BITS, TCG_TYPE_TL, Richard Henderson, 2023/05/16
- [PULL 80/80] tcg: Split out exec/user/guest-base.h, Richard Henderson, 2023/05/16
- Re: [PULL 00/80] tcg patch queue, Peter Maydell, 2023/05/17