diff mbox series

[22/22] tcg: Remove TCG_TARGET_CONSET_H

Message ID 20201223060204.576856-23-richard.henderson@linaro.org
State New
Headers show
Series tcg: backend constraints cleanup | expand

Commit Message

Richard Henderson Dec. 23, 2020, 6:02 a.m. UTC
All backends have now been converted to tcg-target-conset.h,
so we can remove the fallback code.

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     |  2 --
 tcg/tcg.c                | 13 -------------
 10 files changed, 23 deletions(-)

-- 
2.25.1

Comments

Alistair Francis Jan. 7, 2021, 5:31 p.m. UTC | #1
On Tue, Dec 22, 2020 at 10:29 PM Richard Henderson
<richard.henderson@linaro.org> wrote:
>

> All backends have now been converted to tcg-target-conset.h,

> so we can remove the fallback code.

>

> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Reviewed-by: Alistair Francis <alistair.francis@wdc.com>


Alistair

> ---

>  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     |  2 --

>  tcg/tcg.c                | 13 -------------

>  10 files changed, 23 deletions(-)

>

> diff --git a/tcg/aarch64/tcg-target.h b/tcg/aarch64/tcg-target.h

> index a81f6dadf9..663dd0b95e 100644

> --- a/tcg/aarch64/tcg-target.h

> +++ b/tcg/aarch64/tcg-target.h

> @@ -159,6 +159,5 @@ void tb_target_set_jmp_target(uintptr_t, uintptr_t, uintptr_t);

>  #define TCG_TARGET_NEED_LDST_LABELS

>  #endif

>  #define TCG_TARGET_NEED_POOL_LABELS

> -#define TCG_TARGET_CONSET_H

>

>  #endif /* AARCH64_TCG_TARGET_H */

> diff --git a/tcg/arm/tcg-target.h b/tcg/arm/tcg-target.h

> index 918f09239a..17e771374d 100644

> --- a/tcg/arm/tcg-target.h

> +++ b/tcg/arm/tcg-target.h

> @@ -146,6 +146,5 @@ void tb_target_set_jmp_target(uintptr_t, uintptr_t, uintptr_t);

>  #define TCG_TARGET_NEED_LDST_LABELS

>  #endif

>  #define TCG_TARGET_NEED_POOL_LABELS

> -#define TCG_TARGET_CONSET_H

>

>  #endif

> diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h

> index 74a2566900..abd4ac7fc0 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,

>  #define TCG_TARGET_NEED_LDST_LABELS

>  #endif

>  #define TCG_TARGET_NEED_POOL_LABELS

> -#define TCG_TARGET_CONSET_H

>

>  #endif

> diff --git a/tcg/mips/tcg-target.h b/tcg/mips/tcg-target.h

> index 688d691cda..c6b091d849 100644

> --- a/tcg/mips/tcg-target.h

> +++ b/tcg/mips/tcg-target.h

> @@ -217,6 +217,5 @@ void tb_target_set_jmp_target(uintptr_t, uintptr_t, uintptr_t);

>  #ifdef CONFIG_SOFTMMU

>  #define TCG_TARGET_NEED_LDST_LABELS

>  #endif

> -#define TCG_TARGET_CONSET_H

>

>  #endif

> diff --git a/tcg/ppc/tcg-target.h b/tcg/ppc/tcg-target.h

> index c958faffb7..be10363956 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);

>  #define TCG_TARGET_NEED_LDST_LABELS

>  #endif

>  #define TCG_TARGET_NEED_POOL_LABELS

> -#define TCG_TARGET_CONSET_H

>

>  #endif

> diff --git a/tcg/riscv/tcg-target.h b/tcg/riscv/tcg-target.h

> index a357962e01..032439d806 100644

> --- a/tcg/riscv/tcg-target.h

> +++ b/tcg/riscv/tcg-target.h

> @@ -175,6 +175,5 @@ void tb_target_set_jmp_target(uintptr_t, uintptr_t, uintptr_t);

>  #define TCG_TARGET_NEED_POOL_LABELS

>

>  #define TCG_TARGET_HAS_MEMORY_BSWAP 0

> -#define TCG_TARGET_CONSET_H

>

>  #endif

> diff --git a/tcg/s390/tcg-target.h b/tcg/s390/tcg-target.h

> index 78277a8d07..63c8797bd3 100644

> --- a/tcg/s390/tcg-target.h

> +++ b/tcg/s390/tcg-target.h

> @@ -162,6 +162,5 @@ static inline void tb_target_set_jmp_target(uintptr_t tc_ptr,

>  #define TCG_TARGET_NEED_LDST_LABELS

>  #endif

>  #define TCG_TARGET_NEED_POOL_LABELS

> -#define TCG_TARGET_CONSET_H

>

>  #endif

> diff --git a/tcg/sparc/tcg-target.h b/tcg/sparc/tcg-target.h

> index 1304c225b1..633841ebf2 100644

> --- a/tcg/sparc/tcg-target.h

> +++ b/tcg/sparc/tcg-target.h

> @@ -179,6 +179,5 @@ static inline void flush_icache_range(uintptr_t start, uintptr_t stop)

>  void tb_target_set_jmp_target(uintptr_t, uintptr_t, uintptr_t);

>

>  #define TCG_TARGET_NEED_POOL_LABELS

> -#define TCG_TARGET_CONSET_H

>

>  #endif

> diff --git a/tcg/tci/tcg-target.h b/tcg/tci/tcg-target.h

> index 42b84a0e87..8c1c1d265d 100644

> --- a/tcg/tci/tcg-target.h

> +++ b/tcg/tci/tcg-target.h

> @@ -210,6 +210,4 @@ static inline void tb_target_set_jmp_target(uintptr_t tc_ptr,

>      /* no need to flush icache explicitly */

>  }

>

> -#define TCG_TARGET_CONSET_H

> -

>  #endif /* TCG_TARGET_H */

> diff --git a/tcg/tcg.c b/tcg/tcg.c

> index c58d728ca5..dd5b045d88 100644

> --- a/tcg/tcg.c

> +++ b/tcg/tcg.c

> @@ -68,11 +68,7 @@

>  /* Forward declarations for functions declared in tcg-target.c.inc and

>     used here. */

>  static void tcg_target_init(TCGContext *s);

> -#ifdef TCG_TARGET_CONSET_H

>  static int tcg_target_op_def(TCGOpcode);

> -#else

> -static const TCGTargetOpDef *tcg_target_op_def(TCGOpcode);

> -#endif

>  static void tcg_target_qemu_prologue(TCGContext *s);

>  static bool patch_reloc(tcg_insn_unit *code_ptr, int type,

>                          intptr_t value, intptr_t addend);

> @@ -344,7 +340,6 @@ static void set_jmp_reset_offset(TCGContext *s, int which)

>      s->tb_jmp_reset_offset[which] = tcg_current_code_size(s);

>  }

>

> -#ifdef TCG_TARGET_CONSET_H

>  #define C_PFX1(P, A)                    P##A

>  #define C_PFX2(P, A, B)                 P##A##_##B

>  #define C_PFX3(P, A, B, C)              P##A##_##B##_##C

> @@ -457,8 +452,6 @@ static const TCGTargetOpDef constraint_sets[] = {

>  #define C_O2_I4(O1, O2, I1, I2, I3, I4) \

>      C_PFX6(c_o2_i4_, O1, O2, I1, I2, I3, I4)

>

> -#endif /* TCG_TARGET_CONSET_H */

> -

>  #include "tcg-target.c.inc"

>

>  /* compare a pointer @ptr and a tb_tc @s */

> @@ -2367,16 +2360,10 @@ static void process_op_defs(TCGContext *s)

>              continue;

>          }

>

> -#ifdef TCG_TARGET_CONSET_H

>          i = tcg_target_op_def(op);

>          /* Missing TCGTargetOpDef entry. */

>          tcg_debug_assert(i >= 0 && i < ARRAY_SIZE(constraint_sets));

>          tdefs = &constraint_sets[i];

> -#else

> -        tdefs = tcg_target_op_def(op);

> -        /* Missing TCGTargetOpDef entry. */

> -        tcg_debug_assert(tdefs != NULL);

> -#endif

>

>          for (i = 0; i < nb_args; i++) {

>              const char *ct_str = tdefs->args_ct_str[i];

> --

> 2.25.1

>

>
diff mbox series

Patch

diff --git a/tcg/aarch64/tcg-target.h b/tcg/aarch64/tcg-target.h
index a81f6dadf9..663dd0b95e 100644
--- a/tcg/aarch64/tcg-target.h
+++ b/tcg/aarch64/tcg-target.h
@@ -159,6 +159,5 @@  void tb_target_set_jmp_target(uintptr_t, uintptr_t, uintptr_t);
 #define TCG_TARGET_NEED_LDST_LABELS
 #endif
 #define TCG_TARGET_NEED_POOL_LABELS
-#define TCG_TARGET_CONSET_H
 
 #endif /* AARCH64_TCG_TARGET_H */
diff --git a/tcg/arm/tcg-target.h b/tcg/arm/tcg-target.h
index 918f09239a..17e771374d 100644
--- a/tcg/arm/tcg-target.h
+++ b/tcg/arm/tcg-target.h
@@ -146,6 +146,5 @@  void tb_target_set_jmp_target(uintptr_t, uintptr_t, uintptr_t);
 #define TCG_TARGET_NEED_LDST_LABELS
 #endif
 #define TCG_TARGET_NEED_POOL_LABELS
-#define TCG_TARGET_CONSET_H
 
 #endif
diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h
index 74a2566900..abd4ac7fc0 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,
 #define TCG_TARGET_NEED_LDST_LABELS
 #endif
 #define TCG_TARGET_NEED_POOL_LABELS
-#define TCG_TARGET_CONSET_H
 
 #endif
diff --git a/tcg/mips/tcg-target.h b/tcg/mips/tcg-target.h
index 688d691cda..c6b091d849 100644
--- a/tcg/mips/tcg-target.h
+++ b/tcg/mips/tcg-target.h
@@ -217,6 +217,5 @@  void tb_target_set_jmp_target(uintptr_t, uintptr_t, uintptr_t);
 #ifdef CONFIG_SOFTMMU
 #define TCG_TARGET_NEED_LDST_LABELS
 #endif
-#define TCG_TARGET_CONSET_H
 
 #endif
diff --git a/tcg/ppc/tcg-target.h b/tcg/ppc/tcg-target.h
index c958faffb7..be10363956 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);
 #define TCG_TARGET_NEED_LDST_LABELS
 #endif
 #define TCG_TARGET_NEED_POOL_LABELS
-#define TCG_TARGET_CONSET_H
 
 #endif
diff --git a/tcg/riscv/tcg-target.h b/tcg/riscv/tcg-target.h
index a357962e01..032439d806 100644
--- a/tcg/riscv/tcg-target.h
+++ b/tcg/riscv/tcg-target.h
@@ -175,6 +175,5 @@  void tb_target_set_jmp_target(uintptr_t, uintptr_t, uintptr_t);
 #define TCG_TARGET_NEED_POOL_LABELS
 
 #define TCG_TARGET_HAS_MEMORY_BSWAP 0
-#define TCG_TARGET_CONSET_H
 
 #endif
diff --git a/tcg/s390/tcg-target.h b/tcg/s390/tcg-target.h
index 78277a8d07..63c8797bd3 100644
--- a/tcg/s390/tcg-target.h
+++ b/tcg/s390/tcg-target.h
@@ -162,6 +162,5 @@  static inline void tb_target_set_jmp_target(uintptr_t tc_ptr,
 #define TCG_TARGET_NEED_LDST_LABELS
 #endif
 #define TCG_TARGET_NEED_POOL_LABELS
-#define TCG_TARGET_CONSET_H
 
 #endif
diff --git a/tcg/sparc/tcg-target.h b/tcg/sparc/tcg-target.h
index 1304c225b1..633841ebf2 100644
--- a/tcg/sparc/tcg-target.h
+++ b/tcg/sparc/tcg-target.h
@@ -179,6 +179,5 @@  static inline void flush_icache_range(uintptr_t start, uintptr_t stop)
 void tb_target_set_jmp_target(uintptr_t, uintptr_t, uintptr_t);
 
 #define TCG_TARGET_NEED_POOL_LABELS
-#define TCG_TARGET_CONSET_H
 
 #endif
diff --git a/tcg/tci/tcg-target.h b/tcg/tci/tcg-target.h
index 42b84a0e87..8c1c1d265d 100644
--- a/tcg/tci/tcg-target.h
+++ b/tcg/tci/tcg-target.h
@@ -210,6 +210,4 @@  static inline void tb_target_set_jmp_target(uintptr_t tc_ptr,
     /* no need to flush icache explicitly */
 }
 
-#define TCG_TARGET_CONSET_H
-
 #endif /* TCG_TARGET_H */
diff --git a/tcg/tcg.c b/tcg/tcg.c
index c58d728ca5..dd5b045d88 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -68,11 +68,7 @@ 
 /* Forward declarations for functions declared in tcg-target.c.inc and
    used here. */
 static void tcg_target_init(TCGContext *s);
-#ifdef TCG_TARGET_CONSET_H
 static int tcg_target_op_def(TCGOpcode);
-#else
-static const TCGTargetOpDef *tcg_target_op_def(TCGOpcode);
-#endif
 static void tcg_target_qemu_prologue(TCGContext *s);
 static bool patch_reloc(tcg_insn_unit *code_ptr, int type,
                         intptr_t value, intptr_t addend);
@@ -344,7 +340,6 @@  static void set_jmp_reset_offset(TCGContext *s, int which)
     s->tb_jmp_reset_offset[which] = tcg_current_code_size(s);
 }
 
-#ifdef TCG_TARGET_CONSET_H
 #define C_PFX1(P, A)                    P##A
 #define C_PFX2(P, A, B)                 P##A##_##B
 #define C_PFX3(P, A, B, C)              P##A##_##B##_##C
@@ -457,8 +452,6 @@  static const TCGTargetOpDef constraint_sets[] = {
 #define C_O2_I4(O1, O2, I1, I2, I3, I4) \
     C_PFX6(c_o2_i4_, O1, O2, I1, I2, I3, I4)
 
-#endif /* TCG_TARGET_CONSET_H */
-
 #include "tcg-target.c.inc"
 
 /* compare a pointer @ptr and a tb_tc @s */
@@ -2367,16 +2360,10 @@  static void process_op_defs(TCGContext *s)
             continue;
         }
 
-#ifdef TCG_TARGET_CONSET_H
         i = tcg_target_op_def(op);
         /* Missing TCGTargetOpDef entry. */
         tcg_debug_assert(i >= 0 && i < ARRAY_SIZE(constraint_sets));
         tdefs = &constraint_sets[i];
-#else
-        tdefs = tcg_target_op_def(op);
-        /* Missing TCGTargetOpDef entry. */
-        tcg_debug_assert(tdefs != NULL);
-#endif
 
         for (i = 0; i < nb_args; i++) {
             const char *ct_str = tdefs->args_ct_str[i];