[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 32/70] tcg/tci: Reduce qemu_ld/st TCGMemOpIdx operand to 32-bi
From: |
Richard Henderson |
Subject: |
[PATCH v3 32/70] tcg/tci: Reduce qemu_ld/st TCGMemOpIdx operand to 32-bits |
Date: |
Sun, 7 Feb 2021 18:37:14 -0800 |
We are currently using the "natural" size routine, which
uses 64-bits on a 64-bit host. The TCGMemOpIdx operand
has 11 bits, so we can safely reduce to 32-bits.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/tci.c | 8 ++++----
tcg/tci/tcg-target.c.inc | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/tcg/tci.c b/tcg/tci.c
index e10ccfc344..ddc138359b 100644
--- a/tcg/tci.c
+++ b/tcg/tci.c
@@ -855,7 +855,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchState
*env,
case INDEX_op_qemu_ld_i32:
t0 = *tb_ptr++;
taddr = tci_read_ulong(regs, &tb_ptr);
- oi = tci_read_i(&tb_ptr);
+ oi = tci_read_i32(&tb_ptr);
switch (get_memop(oi) & (MO_BSWAP | MO_SSIZE)) {
case MO_UB:
tmp32 = qemu_ld_ub;
@@ -892,7 +892,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchState
*env,
t1 = *tb_ptr++;
}
taddr = tci_read_ulong(regs, &tb_ptr);
- oi = tci_read_i(&tb_ptr);
+ oi = tci_read_i32(&tb_ptr);
switch (get_memop(oi) & (MO_BSWAP | MO_SSIZE)) {
case MO_UB:
tmp64 = qemu_ld_ub;
@@ -941,7 +941,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchState
*env,
case INDEX_op_qemu_st_i32:
t0 = tci_read_rval(regs, &tb_ptr);
taddr = tci_read_ulong(regs, &tb_ptr);
- oi = tci_read_i(&tb_ptr);
+ oi = tci_read_i32(&tb_ptr);
switch (get_memop(oi) & (MO_BSWAP | MO_SIZE)) {
case MO_UB:
qemu_st_b(t0);
@@ -965,7 +965,7 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchState
*env,
case INDEX_op_qemu_st_i64:
tmp64 = tci_read_r64(regs, &tb_ptr);
taddr = tci_read_ulong(regs, &tb_ptr);
- oi = tci_read_i(&tb_ptr);
+ oi = tci_read_i32(&tb_ptr);
switch (get_memop(oi) & (MO_BSWAP | MO_SIZE)) {
case MO_UB:
qemu_st_b(tmp64);
diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc
index 640407b4a8..6c187a25cc 100644
--- a/tcg/tci/tcg-target.c.inc
+++ b/tcg/tci/tcg-target.c.inc
@@ -550,7 +550,7 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const
TCGArg *args,
if (TARGET_LONG_BITS > TCG_TARGET_REG_BITS) {
tcg_out_r(s, *args++);
}
- tcg_out_i(s, *args++);
+ tcg_out32(s, *args++);
break;
case INDEX_op_qemu_ld_i64:
@@ -563,7 +563,7 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const
TCGArg *args,
if (TARGET_LONG_BITS > TCG_TARGET_REG_BITS) {
tcg_out_r(s, *args++);
}
- tcg_out_i(s, *args++);
+ tcg_out32(s, *args++);
break;
case INDEX_op_mb:
--
2.25.1
- [PATCH v3 27/70] tcg/tci: Reuse tci_args_l for exit_tb, (continued)
- [PATCH v3 27/70] tcg/tci: Reuse tci_args_l for exit_tb, Richard Henderson, 2021/02/07
- [PATCH v3 33/70] tcg/tci: Split out tci_args_{rrm,rrrm,rrrrm}, Richard Henderson, 2021/02/07
- [PATCH v3 39/70] tcg/tci: Improve tcg_target_call_clobber_regs, Richard Henderson, 2021/02/07
- [PATCH v3 38/70] tcg/tci: Use ffi for calls, Richard Henderson, 2021/02/07
- [PATCH v3 25/70] tcg/tci: Split out tci_args_ri and tci_args_rI, Richard Henderson, 2021/02/07
- [PATCH v3 37/70] tcg: Build ffi data structures for helpers, Richard Henderson, 2021/02/07
- [PATCH v3 34/70] tcg/tci: Hoist op_size checking into tci_args_*, Richard Henderson, 2021/02/07
- [PATCH v3 36/70] tcg/tci: Implement the disassembler properly, Richard Henderson, 2021/02/07
- [PATCH v3 29/70] tcg/tci: Split out tci_args_rrrrrr, Richard Henderson, 2021/02/07
- [PATCH v3 35/70] tcg/tci: Remove tci_disas, Richard Henderson, 2021/02/07
- [PATCH v3 32/70] tcg/tci: Reduce qemu_ld/st TCGMemOpIdx operand to 32-bits,
Richard Henderson <=
- [PATCH v3 30/70] tcg/tci: Split out tci_args_rrrr, Richard Henderson, 2021/02/07
- [PATCH v3 40/70] tcg/tci: Move call-return regs to end of tcg_target_reg_alloc_order, Richard Henderson, 2021/02/07
- [PATCH v3 41/70] tcg/tci: Push opcode emit into each case, Richard Henderson, 2021/02/07
- [PATCH v3 42/70] tcg/tci: Split out tcg_out_op_rrs, Richard Henderson, 2021/02/07
- [PATCH v3 43/70] tcg/tci: Split out tcg_out_op_l, Richard Henderson, 2021/02/07
- [PATCH v3 44/70] tcg/tci: Split out tcg_out_op_p, Richard Henderson, 2021/02/07
- [PATCH v3 46/70] tcg/tci: Split out tcg_out_op_rrr, Richard Henderson, 2021/02/07
- [PATCH v3 45/70] tcg/tci: Split out tcg_out_op_rr, Richard Henderson, 2021/02/07
- [PATCH v3 47/70] tcg/tci: Split out tcg_out_op_rrrc, Richard Henderson, 2021/02/07
- [PATCH v3 48/70] tcg/tci: Split out tcg_out_op_rrrrrc, Richard Henderson, 2021/02/07