[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 2/5] tcg/tci: Adjust call-clobbered regs for int128_t
From: |
Richard Henderson |
Subject: |
[PULL 2/5] tcg/tci: Adjust call-clobbered regs for int128_t |
Date: |
Wed, 7 Jun 2023 08:40:51 -0700 |
We require either 2 or 4 registers to hold int128_t.
Failure to do so results in a register allocation assert.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/tci/tcg-target.c.inc | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc
index 5b456e1277..0037f904f1 100644
--- a/tcg/tci/tcg-target.c.inc
+++ b/tcg/tci/tcg-target.c.inc
@@ -179,8 +179,6 @@ static TCGConstraintSetIndex tcg_target_op_def(TCGOpcode op)
}
static const int tcg_target_reg_alloc_order[] = {
- TCG_REG_R2,
- TCG_REG_R3,
TCG_REG_R4,
TCG_REG_R5,
TCG_REG_R6,
@@ -193,6 +191,9 @@ static const int tcg_target_reg_alloc_order[] = {
TCG_REG_R13,
TCG_REG_R14,
TCG_REG_R15,
+ /* Either 2 or 4 of these are call clobbered, so use them last. */
+ TCG_REG_R3,
+ TCG_REG_R2,
TCG_REG_R1,
TCG_REG_R0,
};
@@ -934,11 +935,11 @@ static void tcg_target_init(TCGContext *s)
/*
* The interpreter "registers" are in the local stack frame and
* cannot be clobbered by the called helper functions. However,
- * the interpreter assumes a 64-bit return value and assigns to
+ * the interpreter assumes a 128-bit return value and assigns to
* the return value registers.
*/
tcg_target_call_clobber_regs =
- MAKE_64BIT_MASK(TCG_REG_R0, 64 / TCG_TARGET_REG_BITS);
+ MAKE_64BIT_MASK(TCG_REG_R0, 128 / TCG_TARGET_REG_BITS);
s->reserved_regs = 0;
tcg_regset_set_reg(s->reserved_regs, TCG_REG_TMP);
--
2.34.1
- [PULL 0/5] misc ci fixes, Richard Henderson, 2023/06/07
- [PULL 1/5] tcg/tci: Adjust passing of MemOpIdx, Richard Henderson, 2023/06/07
- [PULL 2/5] tcg/tci: Adjust call-clobbered regs for int128_t,
Richard Henderson <=
- [PULL 3/5] target/arm: Only include tcg/oversized-guest.h if CONFIG_TCG, Richard Henderson, 2023/06/07
- [PULL 4/5] gitlab: Add cross-arm64-kvm-only, Richard Henderson, 2023/06/07
- [PULL 5/5] iotests: fix 194: filter out racy postcopy-active event, Richard Henderson, 2023/06/07
- Re: [PULL 0/5] misc ci fixes, Richard Henderson, 2023/06/07