[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 41/43] tcg: Remove TCG_TARGET_SUPPORT_MIRROR
From: |
Richard Henderson |
Subject: |
[PATCH v5 41/43] tcg: Remove TCG_TARGET_SUPPORT_MIRROR |
Date: |
Tue, 5 Jan 2021 07:19:48 -1000 |
Now that all native tcg hosts support splitwx, remove the define.
Replace the one use with a test for CONFIG_TCG_INTERPRETER.
Reviewed-by: Joelle van Dyne <j@getutm.app>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/aarch64/tcg-target.h | 1 -
tcg/arm/tcg-target.h | 1 -
tcg/i386/tcg-target.h | 1 -
tcg/mips/tcg-target.h | 1 -
tcg/ppc/tcg-target.h | 1 -
tcg/riscv/tcg-target.h | 1 -
tcg/s390/tcg-target.h | 1 -
tcg/sparc/tcg-target.h | 1 -
tcg/tci/tcg-target.h | 1 -
accel/tcg/translate-all.c | 16 +++++++++-------
10 files changed, 9 insertions(+), 16 deletions(-)
diff --git a/tcg/aarch64/tcg-target.h b/tcg/aarch64/tcg-target.h
index 079828ea71..5ec30dba25 100644
--- a/tcg/aarch64/tcg-target.h
+++ b/tcg/aarch64/tcg-target.h
@@ -155,6 +155,5 @@ void tb_target_set_jmp_target(uintptr_t, uintptr_t,
uintptr_t, uintptr_t);
#define TCG_TARGET_NEED_LDST_LABELS
#endif
#define TCG_TARGET_NEED_POOL_LABELS
-#define TCG_TARGET_SUPPORT_MIRROR 1
#endif /* AARCH64_TCG_TARGET_H */
diff --git a/tcg/arm/tcg-target.h b/tcg/arm/tcg-target.h
index fdf75ba93f..8d1fee6327 100644
--- a/tcg/arm/tcg-target.h
+++ b/tcg/arm/tcg-target.h
@@ -142,6 +142,5 @@ void tb_target_set_jmp_target(uintptr_t, uintptr_t,
uintptr_t, uintptr_t);
#define TCG_TARGET_NEED_LDST_LABELS
#endif
#define TCG_TARGET_NEED_POOL_LABELS
-#define TCG_TARGET_SUPPORT_MIRROR 1
#endif
diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h
index cb1b138b66..b693d3692d 100644
--- a/tcg/i386/tcg-target.h
+++ b/tcg/i386/tcg-target.h
@@ -235,6 +235,5 @@ static inline void tb_target_set_jmp_target(uintptr_t
tc_ptr, uintptr_t jmp_rx,
#define TCG_TARGET_NEED_LDST_LABELS
#endif
#define TCG_TARGET_NEED_POOL_LABELS
-#define TCG_TARGET_SUPPORT_MIRROR 1
#endif
diff --git a/tcg/mips/tcg-target.h b/tcg/mips/tcg-target.h
index ed5c347374..c2c32fb38f 100644
--- a/tcg/mips/tcg-target.h
+++ b/tcg/mips/tcg-target.h
@@ -201,7 +201,6 @@ extern bool use_mips32r2_instructions;
#define TCG_TARGET_DEFAULT_MO (0)
#define TCG_TARGET_HAS_MEMORY_BSWAP 1
-#define TCG_TARGET_SUPPORT_MIRROR 1
void tb_target_set_jmp_target(uintptr_t, uintptr_t, uintptr_t, uintptr_t);
diff --git a/tcg/ppc/tcg-target.h b/tcg/ppc/tcg-target.h
index ec51f474a7..d1339afc66 100644
--- a/tcg/ppc/tcg-target.h
+++ b/tcg/ppc/tcg-target.h
@@ -185,6 +185,5 @@ void tb_target_set_jmp_target(uintptr_t, uintptr_t,
uintptr_t, uintptr_t);
#define TCG_TARGET_NEED_LDST_LABELS
#endif
#define TCG_TARGET_NEED_POOL_LABELS
-#define TCG_TARGET_SUPPORT_MIRROR 1
#endif
diff --git a/tcg/riscv/tcg-target.h b/tcg/riscv/tcg-target.h
index c50ecf4dab..727c8df418 100644
--- a/tcg/riscv/tcg-target.h
+++ b/tcg/riscv/tcg-target.h
@@ -171,6 +171,5 @@ void tb_target_set_jmp_target(uintptr_t, uintptr_t,
uintptr_t, uintptr_t);
#define TCG_TARGET_NEED_POOL_LABELS
#define TCG_TARGET_HAS_MEMORY_BSWAP 0
-#define TCG_TARGET_SUPPORT_MIRROR 1
#endif
diff --git a/tcg/s390/tcg-target.h b/tcg/s390/tcg-target.h
index 4edcb06044..641464eea4 100644
--- a/tcg/s390/tcg-target.h
+++ b/tcg/s390/tcg-target.h
@@ -159,6 +159,5 @@ static inline void tb_target_set_jmp_target(uintptr_t
tc_ptr, uintptr_t jmp_rx,
#define TCG_TARGET_NEED_LDST_LABELS
#endif
#define TCG_TARGET_NEED_POOL_LABELS
-#define TCG_TARGET_SUPPORT_MIRROR 1
#endif
diff --git a/tcg/sparc/tcg-target.h b/tcg/sparc/tcg-target.h
index 6426e24f17..95ab9af955 100644
--- a/tcg/sparc/tcg-target.h
+++ b/tcg/sparc/tcg-target.h
@@ -172,6 +172,5 @@ extern bool use_vis3_instructions;
void tb_target_set_jmp_target(uintptr_t, uintptr_t, uintptr_t, uintptr_t);
#define TCG_TARGET_NEED_POOL_LABELS
-#define TCG_TARGET_SUPPORT_MIRROR 1
#endif
diff --git a/tcg/tci/tcg-target.h b/tcg/tci/tcg-target.h
index d8c78d1dc7..bb784e018e 100644
--- a/tcg/tci/tcg-target.h
+++ b/tcg/tci/tcg-target.h
@@ -198,7 +198,6 @@ void tci_disas(uint8_t opc);
#define TCG_TARGET_DEFAULT_MO (0)
#define TCG_TARGET_HAS_MEMORY_BSWAP 1
-#define TCG_TARGET_SUPPORT_MIRROR 0
static inline void tb_target_set_jmp_target(uintptr_t tc_ptr, uintptr_t jmp_rx,
uintptr_t jmp_rw, uintptr_t addr)
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index 39a0413524..2155dd4df3 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -1132,6 +1132,7 @@ static bool alloc_code_gen_buffer_anon(size_t size, int
prot,
return true;
}
+#ifndef CONFIG_TCG_INTERPRETER
#ifdef CONFIG_POSIX
#include "qemu/memfd.h"
@@ -1254,17 +1255,18 @@ static bool
alloc_code_gen_buffer_splitwx_vmremap(size_t size, Error **errp)
return true;
}
#endif /* CONFIG_DARWIN */
+#endif /* CONFIG_TCG_INTERPRETER */
static bool alloc_code_gen_buffer_splitwx(size_t size, Error **errp)
{
- if (TCG_TARGET_SUPPORT_MIRROR) {
-#ifdef CONFIG_DARWIN
- return alloc_code_gen_buffer_splitwx_vmremap(size, errp);
+#ifndef CONFIG_TCG_INTERPRETER
+# ifdef CONFIG_DARWIN
+ return alloc_code_gen_buffer_splitwx_vmremap(size, errp);
+# endif
+# ifdef CONFIG_POSIX
+ return alloc_code_gen_buffer_splitwx_memfd(size, errp);
+# endif
#endif
-#ifdef CONFIG_POSIX
- return alloc_code_gen_buffer_splitwx_memfd(size, errp);
-#endif
- }
error_setg(errp, "jit split-wx not supported");
return false;
}
--
2.25.1
- [PATCH v5 37/43] accel/tcg: Add mips support to alloc_code_gen_buffer_splitwx_memfd, (continued)
- [PATCH v5 37/43] accel/tcg: Add mips support to alloc_code_gen_buffer_splitwx_memfd, Richard Henderson, 2021/01/05
- [PATCH v5 35/43] tcg/riscv: Remove branch-over-branch fallback, Richard Henderson, 2021/01/05
- [PATCH v5 31/43] tcg/sparc: Support split-wx code generation, Richard Henderson, 2021/01/05
- [PATCH v5 32/43] tcg/s390: Use tcg_tbrel_diff, Richard Henderson, 2021/01/05
- [PATCH v5 36/43] tcg/riscv: Support split-wx code generation, Richard Henderson, 2021/01/05
- [PATCH v5 39/43] tcg/mips: Support split-wx code generation, Richard Henderson, 2021/01/05
- [PATCH v5 38/43] tcg/mips: Do not assert on relocation overflow, Richard Henderson, 2021/01/05
- [PATCH v5 43/43] tcg: Constify TCGLabelQemuLdst.raddr, Richard Henderson, 2021/01/05
- [PATCH v5 40/43] tcg/arm: Support split-wx code generation, Richard Henderson, 2021/01/05
- [PATCH v5 41/43] tcg: Remove TCG_TARGET_SUPPORT_MIRROR,
Richard Henderson <=
- [PATCH v5 42/43] tcg: Constify tcg_code_gen_epilogue, Richard Henderson, 2021/01/05
- Re: [PATCH v5 00/43] Mirror map JIT memory for TCG, no-reply, 2021/01/05