tcg: Remove TCG_TARGET_SUPPORT_MIRROR
authorRichard Henderson <richard.henderson@linaro.org>
Thu, 5 Nov 2020 23:37:02 +0000 (15:37 -0800)
committerRichard Henderson <richard.henderson@linaro.org>
Thu, 7 Jan 2021 15:09:42 +0000 (05:09 -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>
accel/tcg/translate-all.c
tcg/aarch64/tcg-target.h
tcg/arm/tcg-target.h
tcg/i386/tcg-target.h
tcg/mips/tcg-target.h
tcg/ppc/tcg-target.h
tcg/riscv/tcg-target.h
tcg/s390/tcg-target.h
tcg/sparc/tcg-target.h
tcg/tci/tcg-target.h

index 02e1b05c424e53fa049a58db1646e0fbf768b930..e9de6ff9dd76f4adc812b6e4b01641873b6a5e84 100644 (file)
@@ -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);
-#endif
-#ifdef CONFIG_POSIX
-        return alloc_code_gen_buffer_splitwx_memfd(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
-    }
     error_setg(errp, "jit split-wx not supported");
     return false;
 }
index 079828ea714cf4e98ef134ddd56acd65289be1dd..5ec30dba25360c3e44b204bc0cfd441d2343cb01 100644 (file)
@@ -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 */
index fdf75ba93fe30ab389282b2d48aa370b2b649b4f..8d1fee6327f5fe71ef49c3c31747eeb714252c25 100644 (file)
@@ -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
index cb1b138b662db17262e45b2b6819de1b44b1b8b7..b693d3692d3bbf920cb8657d46a4f8893e19c7a7 100644 (file)
@@ -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
index ed5c347374a2bec6c405e15ba04f2c0cb79ddf0c..c2c32fb38f5344b706b9651461ed91fecba52d85 100644 (file)
@@ -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);
 
index ec51f474a7c4547a7e0939da80d8fce95bcf275c..d1339afc6668f723aaeb86f7afeecf4615ae5aec 100644 (file)
@@ -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
index c50ecf4dab9e2cbe56491660bfbf79d5abca1d2c..727c8df418dcc042ec11f47b5347c368423514c6 100644 (file)
@@ -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
index 4edcb06044a345fb9ced3bca569b5ffb15114461..641464eea4892e385e854604c6c211e086104603 100644 (file)
@@ -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
index 6426e24f176dce7c2ee8da0f80d3d6ce62662963..95ab9af955d83e5394216d4dcc8f50d5d2bf7533 100644 (file)
@@ -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
index d8c78d1dc71893f3b90251d4dc3057c49681e41f..bb784e018e2e73167b6e6d81ac201b93c5eab63e 100644 (file)
@@ -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)