[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 27/46] tcg/tci: Fix TCG_REG_R4 misusage
From: |
Richard Henderson |
Subject: |
[PULL 27/46] tcg/tci: Fix TCG_REG_R4 misusage |
Date: |
Fri, 5 Feb 2021 12:56:31 -1000 |
This was removed from tcg_target_reg_alloc_order and
tcg_target_call_iarg_regs on the assumption that it
was the stack. This was incorrectly copied from i386.
For tci, the stack is R15.
By adding R4 back to tcg_target_call_iarg_regs, adjust the other
entries so that 6 (or 12) entries are still present in the array,
and adjust the numbers in the interpreter.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/tci.c | 8 ++++----
tcg/tci/tcg-target.c.inc | 7 +------
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/tcg/tci.c b/tcg/tci.c
index e0d815e4b2..935eb87330 100644
--- a/tcg/tci.c
+++ b/tcg/tci.c
@@ -511,14 +511,14 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchState
*env,
tci_read_reg(regs, TCG_REG_R1),
tci_read_reg(regs, TCG_REG_R2),
tci_read_reg(regs, TCG_REG_R3),
+ tci_read_reg(regs, TCG_REG_R4),
tci_read_reg(regs, TCG_REG_R5),
tci_read_reg(regs, TCG_REG_R6),
tci_read_reg(regs, TCG_REG_R7),
tci_read_reg(regs, TCG_REG_R8),
tci_read_reg(regs, TCG_REG_R9),
tci_read_reg(regs, TCG_REG_R10),
- tci_read_reg(regs, TCG_REG_R11),
- tci_read_reg(regs, TCG_REG_R12));
+ tci_read_reg(regs, TCG_REG_R11));
tci_write_reg(regs, TCG_REG_R0, tmp64);
tci_write_reg(regs, TCG_REG_R1, tmp64 >> 32);
#else
@@ -526,8 +526,8 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchState
*env,
tci_read_reg(regs, TCG_REG_R1),
tci_read_reg(regs, TCG_REG_R2),
tci_read_reg(regs, TCG_REG_R3),
- tci_read_reg(regs, TCG_REG_R5),
- tci_read_reg(regs, TCG_REG_R6));
+ tci_read_reg(regs, TCG_REG_R4),
+ tci_read_reg(regs, TCG_REG_R5));
tci_write_reg(regs, TCG_REG_R0, tmp64);
#endif
break;
diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc
index 7e3bed811e..aba7f75ad1 100644
--- a/tcg/tci/tcg-target.c.inc
+++ b/tcg/tci/tcg-target.c.inc
@@ -181,9 +181,7 @@ static const int tcg_target_reg_alloc_order[] = {
TCG_REG_R1,
TCG_REG_R2,
TCG_REG_R3,
-#if 0 /* used for TCG_REG_CALL_STACK */
TCG_REG_R4,
-#endif
TCG_REG_R5,
TCG_REG_R6,
TCG_REG_R7,
@@ -206,19 +204,16 @@ static const int tcg_target_call_iarg_regs[] = {
TCG_REG_R1,
TCG_REG_R2,
TCG_REG_R3,
-#if 0 /* used for TCG_REG_CALL_STACK */
TCG_REG_R4,
-#endif
TCG_REG_R5,
- TCG_REG_R6,
#if TCG_TARGET_REG_BITS == 32
/* 32 bit hosts need 2 * MAX_OPC_PARAM_IARGS registers. */
+ TCG_REG_R6,
TCG_REG_R7,
TCG_REG_R8,
TCG_REG_R9,
TCG_REG_R10,
TCG_REG_R11,
- TCG_REG_R12,
#endif
};
--
2.25.1
- [PULL 19/46] tcg/tci: Merge INDEX_op_st16_{i32,i64}, (continued)
- [PULL 19/46] tcg/tci: Merge INDEX_op_st16_{i32,i64}, Richard Henderson, 2021/02/05
- [PULL 21/46] tcg/tci: Merge INDEX_op_{st_i32,st32_i64}, Richard Henderson, 2021/02/05
- [PULL 20/46] tcg/tci: Move stack bounds check to compile-time, Richard Henderson, 2021/02/05
- [PULL 22/46] tcg/tci: Use g_assert_not_reached, Richard Henderson, 2021/02/05
- [PULL 23/46] tcg/tci: Remove dead code for TCG_TARGET_HAS_div2_*, Richard Henderson, 2021/02/05
- [PULL 26/46] tcg/tci: Restrict TCG_TARGET_NB_REGS to 16, Richard Henderson, 2021/02/05
- [PULL 28/46] tcg/tci: Remove TCG_CONST, Richard Henderson, 2021/02/05
- [PULL 25/46] tcg/tci: Remove TODO as unused, Richard Henderson, 2021/02/05
- [PULL 32/46] cpu: Move synchronize_from_tb() to tcg_ops, Richard Henderson, 2021/02/05
- [PULL 29/46] cpu: Introduce TCGCpuOperations struct, Richard Henderson, 2021/02/05
- [PULL 27/46] tcg/tci: Fix TCG_REG_R4 misusage,
Richard Henderson <=
- [PULL 24/46] tcg/tci: Implement 64-bit division, Richard Henderson, 2021/02/05
- [PULL 30/46] target/riscv: remove CONFIG_TCG, as it is always TCG, Richard Henderson, 2021/02/05
- [PULL 31/46] accel/tcg: split TCG-only code from cpu_exec_realizefn, Richard Henderson, 2021/02/05
- [PULL 33/46] cpu: Move cpu_exec_* to tcg_ops, Richard Henderson, 2021/02/05
- [PULL 34/46] cpu: Move tlb_fill to tcg_ops, Richard Henderson, 2021/02/05
- [PULL 35/46] cpu: Move debug_excp_handler to tcg_ops, Richard Henderson, 2021/02/05
- [PULL 36/46] target/arm: do not use cc->do_interrupt for KVM directly, Richard Henderson, 2021/02/05
- [PULL 38/46] cpu: move cc->transaction_failed to tcg_ops, Richard Henderson, 2021/02/05