[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 10/34] tcg: Remove TCG_TARGET_STACK_GROWSUP
From: |
Richard Henderson |
Subject: |
[PATCH v3 10/34] tcg: Remove TCG_TARGET_STACK_GROWSUP |
Date: |
Thu, 1 Dec 2022 21:39:34 -0800 |
The hppa host code has been removed since 2013; this
should have been deleted at the same time.
Fixes: 802b5081233a ("tcg-hppa: Remove tcg backend")
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/aarch64/tcg-target.h | 1 -
tcg/arm/tcg-target.h | 1 -
tcg/tcg.c | 32 ++------------------------------
3 files changed, 2 insertions(+), 32 deletions(-)
diff --git a/tcg/aarch64/tcg-target.h b/tcg/aarch64/tcg-target.h
index 485f685bd2..e145d50fef 100644
--- a/tcg/aarch64/tcg-target.h
+++ b/tcg/aarch64/tcg-target.h
@@ -16,7 +16,6 @@
#define TCG_TARGET_INSN_UNIT_SIZE 4
#define TCG_TARGET_TLB_DISPLACEMENT_BITS 24
#define MAX_CODE_GEN_BUFFER_SIZE (2 * GiB)
-#undef TCG_TARGET_STACK_GROWSUP
typedef enum {
TCG_REG_X0, TCG_REG_X1, TCG_REG_X2, TCG_REG_X3,
diff --git a/tcg/arm/tcg-target.h b/tcg/arm/tcg-target.h
index 7e96495392..56c1ac4586 100644
--- a/tcg/arm/tcg-target.h
+++ b/tcg/arm/tcg-target.h
@@ -30,7 +30,6 @@ extern int arm_arch;
#define use_armv7_instructions (__ARM_ARCH >= 7 || arm_arch >= 7)
-#undef TCG_TARGET_STACK_GROWSUP
#define TCG_TARGET_INSN_UNIT_SIZE 4
#define TCG_TARGET_TLB_DISPLACEMENT_BITS 16
#define MAX_CODE_GEN_BUFFER_SIZE UINT32_MAX
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 72187887c1..98d51e538c 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1552,25 +1552,8 @@ void tcg_gen_callN(void *func, TCGTemp *ret, int nargs,
TCGTemp **args)
}
if (TCG_TARGET_REG_BITS < 64 && is_64bit) {
- /*
- * If stack grows up, then we will be placing successive
- * arguments at lower addresses, which means we need to
- * reverse the order compared to how we would normally
- * treat either big or little-endian. For those arguments
- * that will wind up in registers, this still works for
- * HPPA (the only current STACK_GROWSUP target) since the
- * argument registers are *also* allocated in decreasing
- * order. If another such target is added, this logic may
- * have to get more complicated to differentiate between
- * stack arguments and register arguments.
- */
-#if HOST_BIG_ENDIAN != defined(TCG_TARGET_STACK_GROWSUP)
- op->args[pi++] = temp_arg(args[i] + 1);
- op->args[pi++] = temp_arg(args[i]);
-#else
- op->args[pi++] = temp_arg(args[i]);
- op->args[pi++] = temp_arg(args[i] + 1);
-#endif
+ op->args[pi++] = temp_arg(args[i] + HOST_BIG_ENDIAN);
+ op->args[pi++] = temp_arg(args[i] + !HOST_BIG_ENDIAN);
real_args += 2;
continue;
}
@@ -4125,12 +4108,6 @@ static bool tcg_reg_alloc_dup2(TCGContext *s, const
TCGOp *op)
return true;
}
-#ifdef TCG_TARGET_STACK_GROWSUP
-#define STACK_DIR(x) (-(x))
-#else
-#define STACK_DIR(x) (x)
-#endif
-
static void tcg_reg_alloc_call(TCGContext *s, TCGOp *op)
{
const int nb_oargs = TCGOP_CALLO(op);
@@ -4170,18 +4147,13 @@ static void tcg_reg_alloc_call(TCGContext *s, TCGOp *op)
stack_offset = TCG_TARGET_CALL_STACK_OFFSET;
for (i = nb_regs; i < nb_iargs; i++) {
arg = op->args[nb_oargs + i];
-#ifdef TCG_TARGET_STACK_GROWSUP
- stack_offset -= sizeof(tcg_target_long);
-#endif
if (arg != TCG_CALL_DUMMY_ARG) {
ts = arg_temp(arg);
temp_load(s, ts, tcg_target_available_regs[ts->type],
s->reserved_regs, 0);
tcg_out_st(s, ts->type, ts->reg, TCG_REG_CALL_STACK, stack_offset);
}
-#ifndef TCG_TARGET_STACK_GROWSUP
stack_offset += sizeof(tcg_target_long);
-#endif
}
/* assign input registers */
--
2.34.1
- [PATCH for-8.0 v3 00/34] tcg misc patches, Richard Henderson, 2022/12/02
- [PATCH v3 02/34] meson: Move CONFIG_TCG_INTERPRETER to config_host, Richard Henderson, 2022/12/02
- [PATCH v3 03/34] tcg/s390x: Fix coding style, Richard Henderson, 2022/12/02
- [PATCH v3 04/34] tcg: Cleanup trailing whitespace, Richard Henderson, 2022/12/02
- [PATCH v3 05/34] tcg: Fix tcg_reg_alloc_dup*, Richard Henderson, 2022/12/02
- [PATCH v3 06/34] tcg: Centralize updates to reg_to_temp, Richard Henderson, 2022/12/02
- [PATCH v3 01/34] tcg: convert tcg/README to rst, Richard Henderson, 2022/12/02
- [PATCH v3 07/34] tcg: Remove check_regs, Richard Henderson, 2022/12/02
- [PATCH v3 10/34] tcg: Remove TCG_TARGET_STACK_GROWSUP,
Richard Henderson <=
- [PATCH v3 09/34] tcg: Introduce paired register allocation, Richard Henderson, 2022/12/02
- [PATCH v3 11/34] accel/tcg: Set cflags_next_tb in cpu_common_initfn, Richard Henderson, 2022/12/02
- [PATCH v3 08/34] tcg: Tidy tcg_reg_alloc_op, Richard Henderson, 2022/12/02
- [PATCH v3 12/34] target/sparc: Avoid TCGV_{LOW,HIGH}, Richard Henderson, 2022/12/02
- [PATCH v3 13/34] tcg: Move TCG_{LOW,HIGH} to tcg-internal.h, Richard Henderson, 2022/12/02
- [PATCH v3 14/34] tcg: Add temp_subindex to TCGTemp, Richard Henderson, 2022/12/02
- [PATCH v3 15/34] tcg: Simplify calls to temp_sync vs mem_coherent, Richard Henderson, 2022/12/02
- [PATCH v3 17/34] tcg: Move TCG_TYPE_COUNT outside enum, Richard Henderson, 2022/12/02
- [PATCH v3 16/34] tcg: Allocate TCGTemp pairs in host memory order, Richard Henderson, 2022/12/02
- [PATCH v3 18/34] tcg: Introduce tcg_type_size, Richard Henderson, 2022/12/02