tcg: backend constraints cleanup
cover tcg: backend constraints cleanup
This pulls out constraints to a couple of headers, which reduces the boilerplate just a little.
I have a longer term goal, which this aids, in which I move some of the startup-time debug-only validation into build/compile-time validation. But not yet.
r~
Richard Henderson (22):
tcg/tci: Drop L and S constraints
tcg/i386: Move constraint type check to tcg_target_const_match
tcg: Split out target constraints to tcg-target-constr.h tcg/arm: Convert to tcg-target-constr.h
tcg/aarch64: Convert to tcg-target-constr.h
tcg/ppc: Convert to tcg-target-constr.h
tcg/tci: Convert to tcg-target-constr.h
tcg/mips: Convert to tcg-target-constr.h
tcg/riscv: Convert to tcg-target-constr.h
tcg/s390: Convert to tcg-target-constr.h
tcg/sparc: Convert to tcg-target-constr.h
tcg: Remove TCG_TARGET_CONSTR_H
tcg: Split out constraint sets to tcg-target-conset.h tcg/aarch64: Convert to tcg-target-conset.h
tcg/arm: Convert to tcg-target-conset.h
tcg/mips: Convert to tcg-target-conset.h
tcg/ppc: Convert to tcg-target-conset.h
tcg/riscv: Convert to tcg-target-conset.h
tcg/s390: Convert to tcg-target-conset.h
tcg/sparc: Convert to tcg-target-conset.h
tcg/tci: Convert to tcg-target-conset.h
tcg: Remove TCG_TARGET_CONSET_H
tcg/aarch64/tcg-target-conset.h | 31 +++ tcg/aarch64/tcg-target-constr.h | 27 +++ tcg/arm/tcg-target-conset.h | 30 +++ tcg/arm/tcg-target-constr.h | 31 +++ tcg/i386/tcg-target-conset.h | 44 ++++ tcg/i386/tcg-target-constr.h | 26 +++ tcg/mips/tcg-target-conset.h | 31 +++ tcg/mips/tcg-target-constr.h | 31 +++ tcg/ppc/tcg-target-conset.h | 37 ++++ tcg/ppc/tcg-target-constr.h | 37 ++++ tcg/riscv/tcg-target-conset.h | 25 +++ tcg/riscv/tcg-target-constr.h | 24 +++ tcg/s390/tcg-target-conset.h | 24 +++ tcg/s390/tcg-target-constr.h | 15 ++ tcg/sparc/tcg-target-conset.h | 27 +++ tcg/sparc/tcg-target-constr.h | 16 ++ tcg/tci/tcg-target-conset.h | 20 ++ tcg/tci/tcg-target-constr.h | 9 + tcg/tcg.c | 140 ++++++++++++- tcg/aarch64/tcg-target.c.inc | 132 +++--------- tcg/arm/tcg-target.c.inc | 154 +++----------- tcg/i386/tcg-target.c.inc | 281 ++++++++----------------- tcg/mips/tcg-target.c.inc | 152 +++----------- tcg/ppc/tcg-target.c.inc | 194 +++++------------ tcg/riscv/tcg-target.c.inc | 122 ++--------- tcg/s390/tcg-target.c.inc | 161 +++++--------- tcg/sparc/tcg-target.c.inc | 114 ++-------- tcg/tci/tcg-target.c.inc | 359 +++++++++++--------------------- 28 files changed, 1064 insertions(+), 1230 deletions(-) create mode 100644 tcg/aarch64/tcg-target-conset.h create mode 100644 tcg/aarch64/tcg-target-constr.h create mode 100644 tcg/arm/tcg-target-conset.h create mode 100644 tcg/arm/tcg-target-constr.h create mode 100644 tcg/i386/tcg-target-conset.h create mode 100644 tcg/i386/tcg-target-constr.h create mode 100644 tcg/mips/tcg-target-conset.h create mode 100644 tcg/mips/tcg-target-constr.h create mode 100644 tcg/ppc/tcg-target-conset.h create mode 100644 tcg/ppc/tcg-target-constr.h create mode 100644 tcg/riscv/tcg-target-conset.h create mode 100644 tcg/riscv/tcg-target-constr.h create mode 100644 tcg/s390/tcg-target-conset.h create mode 100644 tcg/s390/tcg-target-constr.h create mode 100644 tcg/sparc/tcg-target-conset.h create mode 100644 tcg/sparc/tcg-target-constr.h create mode 100644 tcg/tci/tcg-target-conset.h create mode 100644 tcg/tci/tcg-target-constr.h
Signature · 1 line
2.25.1
PATCH 1/22 tcg/tci: Drop L and S constraints
These are identical to the 'r' constraint.
--- tcg/tci/tcg-target.c.inc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
tcg/tci/tcg-target.c.inc +4 -6
@@ -46,11 +46,11 @@ # define R64 "r" #endif #if TARGET_LONG_BITS > TCG_TARGET_REG_BITS -# define L "L", "L" -# define S "S", "S" +# define L "r", "r" +# define S "r", "r" #else -# define L "L" -# define S "S" +# define L "r" +# define S "r" #endif /* TODO: documentation. */
@@ -390,8 +390,6 @@ static const char *target_parse_constraint(TCGArgConstraint *ct, { switch (*ct_str++) { case 'r': - case 'L': /* qemu_ld constraint */ - case 'S': /* qemu_st constraint */ ct->regs = BIT(TCG_TARGET_NB_REGS) - 1; break; default:
Signature · 1 line
2.25.1
PATCH 2/22 tcg/i386: Move constraint type check to tcg_target_const_match
In reply to Richard HendersonRather than check the type when filling in the constraint, check it when matching the constant. This removes the only use of the type argument to target_parse_constraint.
--- tcg/i386/tcg-target.c.inc | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-)
tcg/i386/tcg-target.c.inc +17 -11
@@ -254,13 +254,13 @@ static const char *target_parse_constraint(TCGArgConstraint *ct, break; case 'e': - ct->ct |= (type == TCG_TYPE_I32 ? TCG_CT_CONST : TCG_CT_CONST_S32); + ct->ct |= TCG_CT_CONST_S32; break; case 'Z': - ct->ct |= (type == TCG_TYPE_I32 ? TCG_CT_CONST : TCG_CT_CONST_U32); + ct->ct |= TCG_CT_CONST_U32; break; case 'I': - ct->ct |= (type == TCG_TYPE_I32 ? TCG_CT_CONST : TCG_CT_CONST_I32); + ct->ct |= TCG_CT_CONST_I32; break; default:
@@ -277,14 +277,20 @@ static inline int tcg_target_const_match(tcg_target_long val, TCGType type, if (ct & TCG_CT_CONST) { return 1; } - if ((ct & TCG_CT_CONST_S32) && val == (int32_t)val) { - return 1; - } - if ((ct & TCG_CT_CONST_U32) && val == (uint32_t)val) { - return 1; - } - if ((ct & TCG_CT_CONST_I32) && ~val == (int32_t)~val) { - return 1; + if (TCG_TARGET_REG_BITS == 32 || type == TCG_TYPE_I32) { + if (ct & (TCG_CT_CONST_S32 | TCG_CT_CONST_U32 | TCG_CT_CONST_I32)) { + return 1; + } + } else { + if ((ct & TCG_CT_CONST_S32) && val == (int32_t)val) { + return 1; + } + if ((ct & TCG_CT_CONST_U32) && val == (uint32_t)val) { + return 1; + } + if ((ct & TCG_CT_CONST_I32) && ~val == (int32_t)~val) { + return 1; + } } if ((ct & TCG_CT_CONST_WSZ) && val == (type == TCG_TYPE_I32 ? 32 : 64)) { return 1;
Signature · 1 line
2.25.1
PATCH 3/22 tcg: Split out target constraints to tcg-target-constr.h
In reply to Richard HendersonThis eliminates the target-specific function target_parse_constraint and folds it into the single caller, process_op_defs. Since this is done directly into the switch statement, duplicates are compilation errors rather than silently ignored at runtime.
--- tcg/i386/tcg-target-constr.h | 26 ++++++++++++++ tcg/i386/tcg-target.h | 1 + tcg/tcg.c | 33 ++++++++++++++--- tcg/i386/tcg-target.c.inc | 70 ++---------------------------------- 4 files changed, 58 insertions(+), 72 deletions(-) create mode 100644 tcg/i386/tcg-target-constr.h
tcg/i386/tcg-target-constr.h new file +26 -0
@@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: MIT */ +/* +* i386 target-specific operand constaints. +* Copyright (c) 2020 Linaro +*/ + +REGS('a', 1u << TCG_REG_EAX) +REGS('b', 1u << TCG_REG_EBX) +REGS('c', 1u << TCG_REG_ECX) +REGS('d', 1u << TCG_REG_EDX) +REGS('S', 1u << TCG_REG_ESI) +REGS('D', 1u << TCG_REG_EDI) + +REGS('r', ALL_GENERAL_REGS) +REGS ('x' ,ALL_VECTOR_REGS ) +/* A register that can be used as a byte operand. */ +REGS ('q' ,ALL_BYTEL_REGS ) +/* A register with an addressable second byte (e.g. %ah). */ +REGS ('Q' ,ALL_BYTEH_REGS ) +/* qemu_ld/st address constraint */ +REGS('L', ALL_GENERAL_REGS & ~((1 << TCG_REG_L0) | (1 << TCG_REG_L1))) + +CONST('e', TCG_CT_CONST_S32) +CONST('I', TCG_CT_CONST_I32) +CONST('W', TCG_CT_CONST_WSZ) +CONST ('Z' ,TCG_CT_CONST_U32 )
tcg/i386/tcg-target.h +1 -0
@@ -235,5 +235,6 @@ 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_CONSTR_H #endif
tcg/tcg.c +28 -5
@@ -102,8 +102,10 @@ static void tcg_register_jit_int(void *buf, size_t size, __attribute__((unused));/* Forward declarations for functions declared and used in tcg-target.c.inc. */ +#ifndef TCG_TARGET_CONSTR_H static const char *target_parse_constraint (TCGArgConstraint *ct,const char *ct_str,TCGType type); +#endif static void tcg_out_ld (TCGContext *s,TCGType type,TCGReg ret,TCGReg arg1,intptr_t arg2);static bool tcg_out_mov (TCGContext *s,TCGType type,TCGReg ret,TCGReg arg);
@@ -2239,7 +2241,6 @@ static void process_op_defs(TCGContext *s)for (op =0 ; op <NB_OPS ; op++) {TCGOpDef *def = &tcg_op_defs[op];const TCGTargetOpDef *tdefs; -TCGType type;int i, nb_args;if (def->flags &TCG_OPF_NOT_PRESENT ) {
@@ -2255,7 +2256,6 @@ static void process_op_defs(TCGContext *s)/* Missing TCGTargetOpDef entry. */ tcg_debug_assert (tdefs !=NULL ); - type = (def->flags &TCG_OPF_64BIT ?TCG_TYPE_I64 :TCG_TYPE_I32 );for (i =0 ; i < nb_args; i++) {const char *ct_str = tdefs->args_ct_str[i];/* Incomplete TCGTargetOpDef entry. */
@@ -2287,11 +2287,34 @@ static void process_op_defs(TCGContext *s) def->args_ct[i].ct |=TCG_CT_CONST ; ct_str++;break ; + +#ifdef TCG_TARGET_CONSTR_H +/* Include all of the target-specific constraints. */ + +#undef CONST +#define CONST (CASE ,MASK ) \ + case CASE: def->args_ct[i].ct |= MASK; ct_str++; break; +#define REGS (CASE ,MASK ) \ + case CASE: def->args_ct[i].regs |= MASK; ct_str++; break; + +#include "tcg-target-constr.h" + +#undef REGS +#undef CONSTdefault : - ct_str =target_parse_constraint (&def->args_ct[i], - ct_str, type);/* Typo in TCGTargetOpDef constraint. */ -tcg_debug_assert (ct_str !=NULL ); +g_assert_not_reached (); +#else +default : + { +TCGType type = (def->flags &TCG_OPF_64BIT + ?TCG_TYPE_I64 :TCG_TYPE_I32 ); + ct_str =target_parse_constraint (&def->args_ct[i], + ct_str, type); +/* Typo in TCGTargetOpDef constraint. */ +tcg_debug_assert (ct_str !=NULL ); + } +#endif } } }
tcg/i386/tcg-target.c.inc +3 -67
84 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [PATCH 03/22] tcg: Split out target constraints to tcg-target-constr.h
Quoted 21 lines · Richard Henderson
This eliminates the target-specific function
target_parse_constraintand folds it into the single caller,process_op_defs. Since this is done directly into the switch statement, duplicates are compilation errors rather than silently ignored at runtime.Signed-off-by Richard Henderson <[email protected]>--- tcg/i386/tcg-target-constr.h | 26 ++++++++++++++ tcg/i386/tcg-target.h | 1 + tcg/tcg.c | 33 ++++++++++++++--- tcg/i386/tcg-target.c.inc | 70 ++---------------------------------- 4 files changed, 58 insertions(+), 72 deletions(-) create mode 100644 tcg/i386/tcg-target-constr.htcg/i386/tcg-target-constr.h new file +0
-0
tcg/i386/tcg-target-constr.h line 3
Quoted 3 lines
tcg/i386/tcg-target-constr.h new file +3
-0@@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: MIT */ +/* +* i386 target-specific operand constaints.
"constraints"
Quoted 13 lines
tcg/i386/tcg-target-constr.h new file +13
-0+* Copyright (c) 2020 Linaro +*/ + +REGS('a', 1u << TCG_REG_EAX) +REGS('b', 1u << TCG_REG_EBX) +REGS('c', 1u << TCG_REG_ECX) +REGS('d', 1u << TCG_REG_EDX) +REGS('S', 1u << TCG_REG_ESI) +REGS('D', 1u << TCG_REG_EDI) + +REGS('r', ALL_GENERAL_REGS) +REGS ('x' ,ALL_VECTOR_REGS ) +/* A register that can be used as a byte operand. */
tcg/i386/tcg-target-constr.h line 26
Quoted 10 lines
tcg/i386/tcg-target-constr.h new file +10
-0+REGS ('q' ,ALL_BYTEL_REGS ) +/* A register with an addressable second byte (e.g. %ah). */ +REGS ('Q' ,ALL_BYTEH_REGS ) +/* qemu_ld/st address constraint */ +REGS('L', ALL_GENERAL_REGS & ~((1 << TCG_REG_L0) | (1 << TCG_REG_L1))) + +CONST('e', TCG_CT_CONST_S32) +CONST('I', TCG_CT_CONST_I32) +CONST('W', TCG_CT_CONST_WSZ) +CONST ('Z' ,TCG_CT_CONST_U32 )
This is a little bit less obscure than the conset.h macros, but it would still be nice to have some documentation of what's actually going on here.
thanks
-- PMM
PATCH 4/22 tcg/arm: Convert to tcg-target-constr.h
In reply to Richard Henderson--- tcg/arm/tcg-target-constr.h | 31 +++++++++++++++++++ tcg/arm/tcg-target.h | 1 + tcg/arm/tcg-target.c.inc | 60 ------------------------------------- 3 files changed, 32 insertions(+), 60 deletions(-) create mode 100644 tcg/arm/tcg-target-constr.h
tcg/arm/tcg-target-constr.h new file +31 -0
@@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Arm target-specific operand constaints. +* Copyright (c) 2020 Linaro +*/ + +#define ALL_GENERAL_REGS 0xffffu + +#ifdef CONFIG_SOFTMMU +#define ALL_QLOAD_REGS \ + (ALL_GENERAL_REGS & ~((1 << TCG_REG_R0) | (1 << TCG_REG_R1) | \ + (1 << TCG_REG_R2) | (1 << TCG_REG_R3) | \ + (1 << TCG_REG_R14))) +#define ALL_QSTORE_REGS \ + (ALL_GENERAL_REGS & ~((1 << TCG_REG_R0) | (1 << TCG_REG_R1) | \ + (1 << TCG_REG_R2) | (1 << TCG_REG_R14) | \ + ((TARGET_LONG_BITS == 64) << TCG_REG_R3))) +#else +#define ALL_QLOAD_REGS ALL_GENERAL_REGS +#define ALL_QSTORE_REGS \ + (ALL_GENERAL_REGS & ~((1 << TCG_REG_R0) | (1 << TCG_REG_R1))) +#endif + +REGS('r', ALL_GENERAL_REGS) +REGS('l', ALL_QLOAD_REGS) +REGS('s', ALL_QSTORE_REGS) + +CONST('I', TCG_CT_CONST_ARM) +CONST('K', TCG_CT_CONST_INV) +CONST('N', TCG_CT_CONST_NEG) +CONST ('Z' ,TCG_CT_CONST_ZERO )
tcg/arm/tcg-target.h +1 -0
@@ -146,5 +146,6 @@ 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_CONSTR_H #endif
tcg/arm/tcg-target.c.inc +0 -60
66 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH 5/22 tcg/aarch64: Convert to tcg-target-constr.h
In reply to Richard Henderson--- tcg/aarch64/tcg-target-constr.h | 27 +++++++++++++++++++ tcg/aarch64/tcg-target.h | 1 + tcg/aarch64/tcg-target.c.inc | 46 --------------------------------- 3 files changed, 28 insertions(+), 46 deletions(-) create mode 100644 tcg/aarch64/tcg-target-constr.h
tcg/aarch64/tcg-target-constr.h new file +27 -0
@@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* +* AArch64 target-specific operand constaints. +* Copyright (c) 2020 Linaro +*/ + +#define ALL_GENERAL_REGS 0xffffffffu +#define ALL_VECTOR_REGS 0xffffffff00000000ull + +#ifdef CONFIG_SOFTMMU +#define ALL_QLDST_REGS \ + (ALL_GENERAL_REGS & ~((1 << TCG_REG_X0) | (1 << TCG_REG_X1) | \ + (1 << TCG_REG_X2) | (1 << TCG_REG_X3))) +#else +#define ALL_QLDST_REGS ALL_GENERAL_REGS +#endif + +REGS('r', ALL_GENERAL_REGS) +REGS('l', ALL_QLDST_REGS) +REGS('w', ALL_VECTOR_REGS) + +CONST('A', TCG_CT_CONST_AIMM) +CONST('L', TCG_CT_CONST_LIMM) +CONST('M', TCG_CT_CONST_MONE) +CONST('O', TCG_CT_CONST_ORRI) +CONST('N', TCG_CT_CONST_ANDI) +CONST ('Z' ,TCG_CT_CONST_ZERO )
tcg/aarch64/tcg-target.h +1 -0
@@ -159,5 +159,6 @@ 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_CONSTR_H #endif /* AARCH64_TCG_TARGET_H */
tcg/aarch64/tcg-target.c.inc +0 -46
52 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH 6/22 tcg/ppc: Convert to tcg-target-constr.h
In reply to Richard Henderson--- tcg/ppc/tcg-target-constr.h | 37 +++++++++++++++++++++++ tcg/ppc/tcg-target.h | 1 + tcg/ppc/tcg-target.c.inc | 58 ------------------------------------- 3 files changed, 38 insertions(+), 58 deletions(-) create mode 100644 tcg/ppc/tcg-target-constr.h
tcg/ppc/tcg-target-constr.h new file +37 -0
@@ -0,0 +1,37 @@ +/* SPDX-License-Identifier: MIT */ +/* +* PowerPC target-specific operand constaints. +* Copyright (c) 2020 Linaro +*/ + +#define ALL_GENERAL_REGS 0xffffffffu +#define ALL_VECTOR_REGS 0xffffffff00000000ull + +#ifdef CONFIG_SOFTMMU +#define ALL_QLOAD_REGS \ + (ALL_GENERAL_REGS & \ + ~((1 << TCG_REG_R3) | (1 << TCG_REG_R4) | (1 << TCG_REG_R5))) +#define ALL_QSTORE_REGS \ + (ALL_GENERAL_REGS & ~((1 << TCG_REG_R3) | (1 << TCG_REG_R4) | \ + (1 << TCG_REG_R5) | (1 << TCG_REG_R6))) +#else +#define ALL_QLOAD_REGS (ALL_GENERAL_REGS & ~(1 << TCG_REG_R3)) +#define ALL_QSTORE_REGS ALL_QLOAD_REGS +#endif + +REGS('r', ALL_GENERAL_REGS) +REGS('v', ALL_VECTOR_REGS) +REGS('A', 1u << TCG_REG_R3) +REGS('B', 1u << TCG_REG_R4) +REGS('C', 1u << TCG_REG_R5) +REGS('D', 1u << TCG_REG_R6) +REGS('L', ALL_QLOAD_REGS) +REGS('S', ALL_QSTORE_REGS) + +CONST('I', TCG_CT_CONST_S16) +CONST('J', TCG_CT_CONST_U16) +CONST('M', TCG_CT_CONST_MONE) +CONST('T', TCG_CT_CONST_S32) +CONST('U', TCG_CT_CONST_U32) +CONST('W', TCG_CT_CONST_WSZ) +CONST ('Z' ,TCG_CT_CONST_ZERO )
tcg/ppc/tcg-target.h +1 -0
@@ -185,5 +185,6 @@ 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_CONSTR_H #endif
tcg/ppc/tcg-target.c.inc +0 -58
64 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH 7/22 tcg/tci: Convert to tcg-target-constr.h
In reply to Richard Henderson--- tcg/tci/tcg-target-constr.h | 9 +++++++++ tcg/tci/tcg-target.h | 2 ++ tcg/tci/tcg-target.c.inc | 14 -------------- 3 files changed, 11 insertions(+), 14 deletions(-) create mode 100644 tcg/tci/tcg-target-constr.h
tcg/tci/tcg-target-constr.h new file +9 -0
@@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: MIT */ +/* +* TCI target-specific operand constaints. +* Copyright (c) 2020 Linaro +*/ + +REGS('r', MAKE_64BIT_MASK(0, TCG_TARGET_NB_REGS)) +REGS('L', MAKE_64BIT_MASK(0, TCG_TARGET_NB_REGS)) +REGS ('S' ,MAKE_64BIT_MASK (0 ,TCG_TARGET_NB_REGS ))
tcg/tci/tcg-target.h +2 -0
@@ -210,4 +210,6 @@ static inline void tb_target_set_jmp_target(uintptr_t tc_ptr, /* no need to flush icache explicitly */ } +#define TCG_TARGET_CONSTR_H +#endif /* TCG_TARGET_H */
tcg/tci/tcg-target.c.inc +0 -14
@@ -384,20 +384,6 @@ static bool patch_reloc(tcg_insn_unit *code_ptr, int type, return true; } -/* Parse target specific constraints. */ -static const char *target_parse_constraint(TCGArgConstraint *ct, - const char *ct_str, TCGType type) -{ - switch (*ct_str++) { - case 'r': - ct->regs = BIT(TCG_TARGET_NB_REGS) - 1; - break; - default: - return NULL; - } - return ct_str; -} - #if defined(CONFIG_DEBUG_TCG_INTERPRETER) /* Show current bytecode. Used by tcg interpreter. */ void tci_disas(uint8_t opc)
Signature · 1 line
2.25.1
PATCH 8/22 tcg/mips: Convert to tcg-target-constr.h
In reply to Richard Henderson--- tcg/mips/tcg-target-constr.h | 31 ++++++++++++++++++++ tcg/mips/tcg-target.h | 1 + tcg/mips/tcg-target.c.inc | 56 ------------------------------------ 3 files changed, 32 insertions(+), 56 deletions(-) create mode 100644 tcg/mips/tcg-target-constr.h
tcg/mips/tcg-target-constr.h new file +31 -0
@@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: MIT */ +/* +* MIPS target-specific operand constaints. +* Copyright (c) 2020 Linaro +*/ + +#define ALL_GENERAL_REGS 0xffffffffu +#define NOA0_REGS (ALL_GENERAL_REGS & ~(1 << TCG_REG_A0)) + +#ifdef CONFIG_SOFTMMU +#define ALL_QLOAD_REGS \ + (NOA0_REGS & ~((TCG_TARGET_REG_BITS < TARGET_LONG_BITS) << TCG_REG_A2)) +#define ALL_QSTORE_REGS \ + (NOA0_REGS & ~(TCG_TARGET_REG_BITS < TARGET_LONG_BITS \ + ? (1 << TCG_REG_A2) | (1 << TCG_REG_A3) \ + : (1 << TCG_REG_A1))) +#else +#define ALL_QLOAD_REGS NOA0_REGS +#define ALL_QSTORE_REGS NOA0_REGS +#endif + +REGS('r', ALL_GENERAL_REGS) +REGS('L', ALL_QLOAD_REGS) +REGS('S', ALL_QSTORE_REGS) + +CONST('I', TCG_CT_CONST_U16) +CONST('J', TCG_CT_CONST_S16) +CONST('K', TCG_CT_CONST_P2M1) +CONST('N', TCG_CT_CONST_N16) +CONST('W', TCG_CT_CONST_WSZ) +CONST ('Z' ,TCG_CT_CONST_ZERO )
tcg/mips/tcg-target.h +1 -0
@@ -217,5 +217,6 @@ 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_CONSTR_H #endif
tcg/mips/tcg-target.c.inc +0 -56
62 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH 9/22 tcg/riscv: Convert to tcg-target-constr.h
In reply to Richard Henderson--- tcg/riscv/tcg-target-constr.h | 24 +++++++++++++++++++++ tcg/riscv/tcg-target.h | 1 + tcg/riscv/tcg-target.c.inc | 39 ----------------------------------- 3 files changed, 25 insertions(+), 39 deletions(-) create mode 100644 tcg/riscv/tcg-target-constr.h
tcg/riscv/tcg-target-constr.h new file +24 -0
@@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: MIT */ +/* +* RISC-V target-specific operand constaints. +* Copyright (c) 2020 Linaro +*/ + +#define ALL_GENERAL_REGS 0xffffffffu + +#ifdef CONFIG_SOFTMMU +#define ALL_QLDST_REGS \ + (ALL_GENERAL_REGS & ~((1 << TCG_REG_A0) | (1 << TCG_REG_A1) | \ + (1 << TCG_REG_A2) | (1 << TCG_REG_A3) | \ + (1 << TCG_REG_A5))) +#else +#define ALL_QLDST_REGS ALL_GENERAL_REGS +#endif + +REGS('r', ALL_GENERAL_REGS) +REGS('L', ALL_QLDST_REGS) + +CONST('I', TCG_CT_CONST_S12) +CONST('N', TCG_CT_CONST_N12) +CONST('M', TCG_CT_CONST_M12) +CONST ('Z' ,TCG_CT_CONST_ZERO )
tcg/riscv/tcg-target.h +1 -0
@@ -175,5 +175,6 @@ 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_CONSTR_H #endif
tcg/riscv/tcg-target.c.inc +0 -39
@@ -131,45 +131,6 @@ static inline tcg_target_long sextreg(tcg_target_long val, int pos, int len) } } -/* parse target specific constraints */ -static const char *target_parse_constraint(TCGArgConstraint *ct, - const char *ct_str, TCGType type) -{ - switch (*ct_str++) { - case 'r': - ct->regs = 0xffffffff; - break; - case 'L': - /* qemu_ld/qemu_st constraint */ - ct->regs = 0xffffffff; - /* qemu_ld/qemu_st uses TCG_REG_TMP0 */ -#if defined(CONFIG_SOFTMMU) - tcg_regset_reset_reg(ct->regs, tcg_target_call_iarg_regs[0]); - tcg_regset_reset_reg(ct->regs, tcg_target_call_iarg_regs[1]); - tcg_regset_reset_reg(ct->regs, tcg_target_call_iarg_regs[2]); - tcg_regset_reset_reg(ct->regs, tcg_target_call_iarg_regs[3]); - tcg_regset_reset_reg(ct->regs, tcg_target_call_iarg_regs[4]); -#endif - break; - case 'I': - ct->ct |= TCG_CT_CONST_S12; - break; - case 'N': - ct->ct |= TCG_CT_CONST_N12; - break; - case 'M': - ct->ct |= TCG_CT_CONST_M12; - break; - case 'Z': - /* we can use a zero immediate as a zero register argument. */ - ct->ct |= TCG_CT_CONST_ZERO; - break; - default: - return NULL; - } - return ct_str; -} - /* test if a constant matches the constraint */ static int tcg_target_const_match(tcg_target_long val, TCGType type, const TCGArgConstraint *arg_ct)
Signature · 1 line
2.25.1
Re: [PATCH 09/22] tcg/riscv: Convert to tcg-target-constr.h
Quoted 2 lines · Richard Henderson
Signed-off-by Richard Henderson <[email protected]>
Alistair
Quoted 102 lines
--- tcg/riscv/tcg-target-constr.h | 24 +++++++++++++++++++++ tcg/riscv/tcg-target.h | 1 + tcg/riscv/tcg-target.c.inc | 39 ----------------------------------- 3 files changed, 25 insertions(+), 39 deletions(-) create mode 100644 tcg/riscv/tcg-target-constr.htcg/riscv/tcg-target-constr.h new file +24
-0@@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: MIT */ +/* +* RISC-V target-specific operand constaints. +* Copyright (c) 2020 Linaro +*/ + +#define ALL_GENERAL_REGS 0xffffffffu + +#ifdef CONFIG_SOFTMMU +#define ALL_QLDST_REGS \ + (ALL_GENERAL_REGS & ~((1 << TCG_REG_A0) | (1 << TCG_REG_A1) | \ + (1 << TCG_REG_A2) | (1 << TCG_REG_A3) | \ + (1 << TCG_REG_A5))) +#else +#define ALL_QLDST_REGS ALL_GENERAL_REGS +#endif + +REGS('r', ALL_GENERAL_REGS) +REGS('L', ALL_QLDST_REGS) + +CONST('I', TCG_CT_CONST_S12) +CONST('N', TCG_CT_CONST_N12) +CONST('M', TCG_CT_CONST_M12) +CONST ('Z' ,TCG_CT_CONST_ZERO )tcg/riscv/tcg-target.h +1
-0@@ -175,5 +175,6 @@ 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_CONSTR_H #endif tcg/riscv/tcg-target.c.inc +0
-40@@ -131,45 +131,6 @@ static inline tcg_target_long sextreg(tcg_target_long val, int pos, int len) } } -/* parse target specific constraints */ -static const char *target_parse_constraint(TCGArgConstraint *ct, - const char *ct_str, TCGType type) -{ - switch (*ct_str++) { - case 'r': - ct->regs = 0xffffffff; - break; - case 'L': - /* qemu_ld/qemu_st constraint */ - ct->regs = 0xffffffff; - /* qemu_ld/qemu_st uses TCG_REG_TMP0 */ -#if defined(CONFIG_SOFTMMU) - tcg_regset_reset_reg(ct->regs, tcg_target_call_iarg_regs[0]); - tcg_regset_reset_reg(ct->regs, tcg_target_call_iarg_regs[1]); - tcg_regset_reset_reg(ct->regs, tcg_target_call_iarg_regs[2]); - tcg_regset_reset_reg(ct->regs, tcg_target_call_iarg_regs[3]); - tcg_regset_reset_reg(ct->regs, tcg_target_call_iarg_regs[4]); -#endif - break; - case 'I': - ct->ct |= TCG_CT_CONST_S12; - break; - case 'N': - ct->ct |= TCG_CT_CONST_N12; - break; - case 'M': - ct->ct |= TCG_CT_CONST_M12; - break; - case 'Z': - /* we can use a zero immediate as a zero register argument. */ - ct->ct |= TCG_CT_CONST_ZERO; - break; - default: - return NULL; - } - return ct_str; -} - /* test if a constant matches the constraint */ static int tcg_target_const_match(tcg_target_long val, TCGType type, const TCGArgConstraint *arg_ct) --2.25.1
PATCH 10/22 tcg/s390: Convert to tcg-target-constr.h
In reply to Richard Henderson--- tcg/s390/tcg-target-constr.h | 15 ++++++++++++++ tcg/s390/tcg-target.h | 1 + tcg/s390/tcg-target.c.inc | 40 ------------------------------------ 3 files changed, 16 insertions(+), 40 deletions(-) create mode 100644 tcg/s390/tcg-target-constr.h
tcg/s390/tcg-target-constr.h new file +15 -0
@@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: MIT */ +/* +* S390 target-specific operand constaints. +* Copyright (c) 2020 Linaro +*/ + +REGS('r', 0xffff) +REGS('L', 0xffff & ~((1 << TCG_REG_R2) | (1 << TCG_REG_R3) | (1 << TCG_REG_R4))) +REGS('a', 1u << TCG_REG_R2) +REGS('b', 1u << TCG_REG_R3) + +CONST('A', TCG_CT_CONST_S33) +CONST('I', TCG_CT_CONST_S16) +CONST('J', TCG_CT_CONST_S32) +CONST ('Z' ,TCG_CT_CONST_ZERO )
tcg/s390/tcg-target.h +1 -0
@@ -162,5 +162,6 @@ 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_CONSTR_H #endif
tcg/s390/tcg-target.c.inc +0 -40
@@ -402,46 +402,6 @@ static bool patch_reloc(tcg_insn_unit *code_ptr, int type, return false; } -/* parse target specific constraints */ -static const char *target_parse_constraint(TCGArgConstraint *ct, - const char *ct_str, TCGType type) -{ - switch (*ct_str++) { - case 'r': /* all registers */ - ct->regs = 0xffff; - break; - case 'L': /* qemu_ld/st constraint */ - ct->regs = 0xffff; - tcg_regset_reset_reg(ct->regs, TCG_REG_R2); - tcg_regset_reset_reg(ct->regs, TCG_REG_R3); - tcg_regset_reset_reg(ct->regs, TCG_REG_R4); - break; - case 'a': /* force R2 for division */ - ct->regs = 0; - tcg_regset_set_reg(ct->regs, TCG_REG_R2); - break; - case 'b': /* force R3 for division */ - ct->regs = 0; - tcg_regset_set_reg(ct->regs, TCG_REG_R3); - break; - case 'A': - ct->ct |= TCG_CT_CONST_S33; - break; - case 'I': - ct->ct |= TCG_CT_CONST_S16; - break; - case 'J': - ct->ct |= TCG_CT_CONST_S32; - break; - case 'Z': - ct->ct |= TCG_CT_CONST_ZERO; - break; - default: - return NULL; - } - return ct_str; -} - /* Test if a constant matches the constraint. */ static int tcg_target_const_match(tcg_target_long val, TCGType type, const TCGArgConstraint *arg_ct)
Signature · 1 line
2.25.1
PATCH 11/22 tcg/sparc: Convert to tcg-target-constr.h
In reply to Richard Henderson--- tcg/sparc/tcg-target-constr.h | 16 ++++++++++++++ tcg/sparc/tcg-target.h | 1 + tcg/sparc/tcg-target.c.inc | 39 ----------------------------------- 3 files changed, 17 insertions(+), 39 deletions(-) create mode 100644 tcg/sparc/tcg-target-constr.h
tcg/sparc/tcg-target-constr.h new file +16 -0
@@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Sparc target-specific operand constaints. +* Copyright (c) 2020 Linaro +*/ + +#define RESERVE_QLDST (7u << TCG_REG_O0)/* O0, O1, O2 */ + +REGS('r', 0xffffffff) +REGS('R', ALL_64) +REGS('s', 0xffffffff & ~RESERVE_QLDST) +REGS('S', ALL_64 & ~RESERVE_QLDST) + +CONST('I', TCG_CT_CONST_S11) +CONST('J', TCG_CT_CONST_S13) +CONST ('Z' ,TCG_CT_CONST_ZERO )
tcg/sparc/tcg-target.h +1 -0
@@ -179,5 +179,6 @@ 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_CONSTR_H #endif
tcg/sparc/tcg-target.c.inc +0 -39
@@ -319,45 +319,6 @@ static bool patch_reloc(tcg_insn_unit *code_ptr, int type, return true; } -/* parse target specific constraints */ -static const char *target_parse_constraint(TCGArgConstraint *ct, - const char *ct_str, TCGType type) -{ - switch (*ct_str++) { - case 'r': - ct->regs = 0xffffffff; - break; - case 'R': - ct->regs = ALL_64; - break; - case 'A': /* qemu_ld/st address constraint */ - ct->regs = TARGET_LONG_BITS == 64 ? ALL_64 : 0xffffffff; - reserve_helpers: - tcg_regset_reset_reg(ct->regs, TCG_REG_O0); - tcg_regset_reset_reg(ct->regs, TCG_REG_O1); - tcg_regset_reset_reg(ct->regs, TCG_REG_O2); - break; - case 's': /* qemu_st data 32-bit constraint */ - ct->regs = 0xffffffff; - goto reserve_helpers; - case 'S': /* qemu_st data 64-bit constraint */ - ct->regs = ALL_64; - goto reserve_helpers; - case 'I': - ct->ct |= TCG_CT_CONST_S11; - break; - case 'J': - ct->ct |= TCG_CT_CONST_S13; - break; - case 'Z': - ct->ct |= TCG_CT_CONST_ZERO; - break; - default: - return NULL; - } - return ct_str; -} - /* test if a constant matches the constraint */ static inline int tcg_target_const_match(tcg_target_long val, TCGType type, const TCGArgConstraint *arg_ct)
Signature · 1 line
2.25.1
PATCH 12/22 tcg: Remove TCG_TARGET_CONSTR_H
In reply to Richard HendersonAll backends have now been converted to tcg-target-constr.h, so we can remove the fallback code.
--- 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 | 16 ---------------- 10 files changed, 26 deletions(-)
tcg/aarch64/tcg-target.h +0 -1
@@ -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_CONSTR_H #endif /* AARCH64_TCG_TARGET_H */
tcg/arm/tcg-target.h +0 -1
@@ -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_CONSTR_H #endif
tcg/i386/tcg-target.h +0 -1
@@ -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_CONSTR_H #endif
tcg/mips/tcg-target.h +0 -1
@@ -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_CONSTR_H #endif
tcg/ppc/tcg-target.h +0 -1
@@ -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_CONSTR_H #endif
tcg/riscv/tcg-target.h +0 -1
@@ -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_CONSTR_H #endif
tcg/s390/tcg-target.h +0 -1
@@ -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_CONSTR_H #endif
tcg/sparc/tcg-target.h +0 -1
@@ -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_CONSTR_H #endif
tcg/tci/tcg-target.h +0 -2
@@ -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_CONSTR_H -#endif /* TCG_TARGET_H */
tcg/tcg.c +0 -16
@@ -102,10 +102,6 @@ static void tcg_register_jit_int(void *buf, size_t size, __attribute__((unused));/* Forward declarations for functions declared and used in tcg-target.c.inc. */ -#ifndef TCG_TARGET_CONSTR_H -static const char *target_parse_constraint (TCGArgConstraint *ct, -const char *ct_str,TCGType type); -#endif static void tcg_out_ld (TCGContext *s,TCGType type,TCGReg ret,TCGReg arg1,intptr_t arg2);static bool tcg_out_mov (TCGContext *s,TCGType type,TCGReg ret,TCGReg arg);
@@ -2288,7 +2284,6 @@ static void process_op_defs(TCGContext *s) ct_str++;break ; -#ifdef TCG_TARGET_CONSTR_H /* Include all of the target-specific constraints. */ #undef CONST
@@ -2304,17 +2299,6 @@ static void process_op_defs(TCGContext *s)default :/* Typo in TCGTargetOpDef constraint. */ g_assert_not_reached (); -#else -default : - { -TCGType type = (def->flags &TCG_OPF_64BIT - ?TCG_TYPE_I64 :TCG_TYPE_I32 ); - ct_str =target_parse_constraint (&def->args_ct[i], - ct_str, type); -/* Typo in TCGTargetOpDef constraint. */ -tcg_debug_assert (ct_str !=NULL ); - } -#endif } } }
Signature · 1 line
2.25.1
Re: [PATCH 12/22] tcg: Remove TCG_TARGET_CONSTR_H
Quoted 5 lines · Richard Henderson
All backends have now been converted to
tcg-target-constr.h, so we can remove the fallback code.Signed-off-by Richard Henderson <[email protected]>
Alistair
Quoted 157 lines
--- 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 | 16 ---------------- 10 files changed, 26 deletions(-)tcg/aarch64/tcg-target.h +0
-1@@ -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_CONSTR_H #endif /* AARCH64_TCG_TARGET_H */ tcg/arm/tcg-target.h +0
-1@@ -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_CONSTR_H #endif tcg/i386/tcg-target.h +0
-1@@ -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_CONSTR_H #endif tcg/mips/tcg-target.h +0
-1@@ -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_CONSTR_H #endif tcg/ppc/tcg-target.h +0
-1@@ -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_CONSTR_H #endif tcg/riscv/tcg-target.h +0
-1@@ -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_CONSTR_H #endif tcg/s390/tcg-target.h +0
-1@@ -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_CONSTR_H #endif tcg/sparc/tcg-target.h +0
-1@@ -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_CONSTR_H #endif tcg/tci/tcg-target.h +0
-2@@ -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_CONSTR_H -#endif /* TCG_TARGET_H */ tcg/tcg.c +0
-17@@ -102,10 +102,6 @@ static void tcg_register_jit_int(void *buf, size_t size, __attribute__((unused));/* Forward declarations for functions declared and used in tcg-target.c.inc. */ -#ifndef TCG_TARGET_CONSTR_H -static const char *target_parse_constraint (TCGArgConstraint *ct, -const char *ct_str,TCGType type); -#endif static void tcg_out_ld (TCGContext *s,TCGType type,TCGReg ret,TCGReg arg1,intptr_t arg2);static bool tcg_out_mov (TCGContext *s,TCGType type,TCGReg ret,TCGReg arg);@@ -2288,7 +2284,6 @@ static void process_op_defs(TCGContext *s) ct_str++;break ; -#ifdef TCG_TARGET_CONSTR_H /* Include all of the target-specific constraints. */ #undef CONST@@ -2304,17 +2299,6 @@ static void process_op_defs(TCGContext *s)default :/* Typo in TCGTargetOpDef constraint. */ g_assert_not_reached (); -#else -default : - { -TCGType type = (def->flags &TCG_OPF_64BIT - ?TCG_TYPE_I64 :TCG_TYPE_I32 ); - ct_str =target_parse_constraint (&def->args_ct[i], - ct_str, type); -/* Typo in TCGTargetOpDef constraint. */ -tcg_debug_assert (ct_str !=NULL ); - } -#endif } } } --2.25.1
PATCH 13/22 tcg: Split out constraint sets to tcg-target-conset.h
In reply to Richard HendersonThis exports the constraint sets from tcg_target_op_def to a place we will be able to manipulate more in future.
--- tcg/i386/tcg-target-conset.h | 44 ++++++++ tcg/i386/tcg-target.h | 1 + tcg/tcg.c | 126 +++++++++++++++++++++++ tcg/i386/tcg-target.c.inc | 189 ++++++++++++----------------------- 4 files changed, 236 insertions(+), 124 deletions(-) create mode 100644 tcg/i386/tcg-target-conset.h
tcg/i386/tcg-target-conset.h new file +44 -0
@@ -0,0 +1,44 @@ +/* SPDX-License-Identifier: MIT */ +/* +* i386 target-specific constaint sets. +* Copyright (c) 2020 Linaro +*/ + +C_O0_I1(r) +C_O0_I2(L, L) +C_O0_I2(qi, r) +C_O0_I2(re, r) +C_O0_I2(ri, r) +C_O0_I2(r, re) +C_O0_I2(x, r) +C_O0_I3(L, L, L) +C_O0_I4(L, L, L, L) +C_O0_I4(r, r, ri, ri) +C_O1_I1(r, 0) +C_O1_I1(r, L) +C_O1_I1(r, q) +C_O1_I1(r, r) +C_O1_I1(x, r) +C_O1_I1(x, x) +C_O1_I2(Q, 0, Q) +C_O1_I2(q, r, re) +C_O1_I2(r, 0, ci) +C_O1_I2(r, 0, r) +C_O1_I2(r, 0, re) +C_O1_I2(r, 0, reZ) +C_O1_I2(r, 0, ri) +C_O1_I2(r, 0, rI) +C_O1_I2(r, L, L) +C_O1_I2(r, r, re) +C_O1_I2(r, r, ri) +C_O1_I2(x, x, x) +C_N1_I2(r, r, r) +C_N1_I2(r, r, rW) +C_O1_I3(x, x, x, x) +C_O1_I4(r, r, re, r, 0) +C_O1_I4(r, r, r, ri, ri) +C_O2_I1(r, r, L) +C_O2_I2(a, d, a, r) +C_O2_I2(r, r, L, L) +C_O2_I3(a, d, 0, 1, r) +C_O2_I4(r, r, 0, 1, re, re)
tcg/i386/tcg-target.h +1 -0
@@ -235,5 +235,6 @@ 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
tcg/tcg.c +126 -0
148 lines not on this page · raw message
tcg/i386/tcg-target.c.inc +65 -124
308 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [PATCH 13/22] tcg: Split out constraint sets to tcg-target-conset.h
Quoted 19 lines · Richard Henderson
This exports the constraint sets from
tcg_target_op_defto a place we will be able to manipulate more in future.Signed-off-by Richard Henderson <[email protected]>--- tcg/i386/tcg-target-conset.h | 44 ++++++++ tcg/i386/tcg-target.h | 1 + tcg/tcg.c | 126 +++++++++++++++++++++++ tcg/i386/tcg-target.c.inc | 189 ++++++++++++----------------------- 4 files changed, 236 insertions(+), 124 deletions(-) create mode 100644 tcg/i386/tcg-target-conset.htcg/i386/tcg-target-conset.h new file +0
-0
tcg/i386/tcg-target-conset.h line 3
Quoted 3 lines
tcg/i386/tcg-target-conset.h new file +3
-0@@ -0,0 +1,44 @@ +/* SPDX-License-Identifier: MIT */ +/* +* i386 target-specific constaint sets.
"constraint"
tcg/i386/tcg-target-conset.h line 13
Quoted 10 lines
tcg/i386/tcg-target-conset.h new file +10
-0+* Copyright (c) 2020 Linaro +*/ + +C_O0_I1(r) +C_O0_I2(L, L) +C_O0_I2(qi, r) +C_O0_I2(re, r) +C_O0_I2(ri, r) +C_O0_I2(r, re) +C_O0_I2(x, r)
I'm afraid this is completely incomprehensible to me. Can we have some documentation of what these macros are doing (which we can then reference in the comment at the top of each conset.h file)?
thanks
-- PMM
PATCH 14/22 tcg/aarch64: Convert to tcg-target-conset.h
In reply to Richard Henderson--- tcg/aarch64/tcg-target-conset.h | 31 ++++++++++++ tcg/aarch64/tcg-target.h | 1 + tcg/aarch64/tcg-target.c.inc | 86 +++++++++++---------------------- 3 files changed, 60 insertions(+), 58 deletions(-) create mode 100644 tcg/aarch64/tcg-target-conset.h
tcg/aarch64/tcg-target-conset.h new file +31 -0
@@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* +* AArch64 target-specific constaint sets. +* Copyright (c) 2020 Linaro +*/ + +C_O0_I1(r) +C_O0_I2(lZ, l) +C_O0_I2(r, rA) +C_O0_I2(rZ, r) +C_O0_I2(w, r) +C_O1_I1(r, l) +C_O1_I1(r, r) +C_O1_I1(w, r) +C_O1_I1(w, w) +C_O1_I1(w, wr) +C_O1_I2(r, 0, rZ) +C_O1_I2(r, r, r) +C_O1_I2(r, r, rA) +C_O1_I2(r, r, rAL) +C_O1_I2(r, r, ri) +C_O1_I2(r, r, rL) +C_O1_I2(r, rZ, rZ) +C_O1_I2(w, 0, w) +C_O1_I2(w, w, w) +C_O1_I2(w, w, wN) +C_O1_I2(w, w, wO) +C_O1_I2(w, w, wZ) +C_O1_I3(w, w, w, w) +C_O1_I4(r, r, rA, rZ, rZ) +C_O2_I4(r, r, rZ, rZ, rA, rMZ)
tcg/aarch64/tcg-target.h +1 -0
@@ -159,5 +159,6 @@ 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 */
tcg/aarch64/tcg-target.c.inc +28 -58
182 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH 15/22 tcg/arm: Convert to tcg-target-conset.h
In reply to Richard Henderson--- tcg/arm/tcg-target-conset.h | 30 ++++++++++++ tcg/arm/tcg-target.h | 1 + tcg/arm/tcg-target.c.inc | 94 +++++++++++++------------------------ 3 files changed, 63 insertions(+), 62 deletions(-) create mode 100644 tcg/arm/tcg-target-conset.h
tcg/arm/tcg-target-conset.h new file +30 -0
@@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Arm target-specific constaint sets. +* Copyright (c) 2020 Linaro +*/ + +C_O0_I1(r) +C_O0_I2(r, r) +C_O0_I2(r, rIN) +C_O0_I2(s, s) +C_O0_I3(s, s, s) +C_O0_I4(r, r, rI, rI) +C_O0_I4(s, s, s, s) +C_O1_I1(r, l) +C_O1_I1(r, r) +C_O1_I2(r, 0, rZ) +C_O1_I2(r, l, l) +C_O1_I2(r, r, r) +C_O1_I2(r, r, rI) +C_O1_I2(r, r, rIK) +C_O1_I2(r, r, rIN) +C_O1_I2(r, r, ri) +C_O1_I2(r, rZ, rZ) +C_O1_I4(r, r, r, rI, rI) +C_O1_I4(r, r, rIN, rIK, 0) +C_O2_I1(r, r, l) +C_O2_I2(r, r, l, l) +C_O2_I2(r, r, r, r) +C_O2_I4(r, r, r, r, rIN, rIK) +C_O2_I4(r, r, rI, rI, rIN, rIK)
tcg/arm/tcg-target.h +1 -0
@@ -146,5 +146,6 @@ 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
tcg/arm/tcg-target.c.inc +32 -62
151 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH 16/22 tcg/mips: Convert to tcg-target-conset.h
In reply to Richard Henderson--- tcg/mips/tcg-target-conset.h | 31 ++++++++++++ tcg/mips/tcg-target.h | 1 + tcg/mips/tcg-target.c.inc | 96 +++++++++++------------------------- 3 files changed, 61 insertions(+), 67 deletions(-) create mode 100644 tcg/mips/tcg-target-conset.h
tcg/mips/tcg-target-conset.h new file +31 -0
@@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: MIT */ +/* +* MIPS target-specific constaint sets. +* Copyright (c) 2020 Linaro +*/ + +C_O0_I1(r) +C_O0_I2(rZ, r) +C_O0_I2(rZ, rZ) +C_O0_I2(SZ, S) +C_O0_I3(SZ, S, S) +C_O0_I3(SZ, SZ, S) +C_O0_I4(rZ, rZ, rZ, rZ) +C_O0_I4(SZ, SZ, S, S) +C_O1_I1(r, L) +C_O1_I1(r, r) +C_O1_I2(r, 0, rZ) +C_O1_I2(r, L, L) +C_O1_I2(r, r, ri) +C_O1_I2(r, r, rI) +C_O1_I2(r, r, rIK) +C_O1_I2(r, r, rJ) +C_O1_I2(r, r, rWZ) +C_O1_I2(r, rZ, rN) +C_O1_I2(r, rZ, rZ) +C_O1_I4(r, rZ, rZ, rZ, 0) +C_O1_I4(r, rZ, rZ, rZ, rZ) +C_O2_I1(r, r, L) +C_O2_I2(r, r, L, L) +C_O2_I2(r, r, r, r) +C_O2_I4(r, r, rZ, rZ, rN, rN)
tcg/mips/tcg-target.h +1 -0
@@ -217,5 +217,6 @@ 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
tcg/mips/tcg-target.c.inc +29 -67
166 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH 17/22 tcg/ppc: Convert to tcg-target-conset.h
In reply to Richard Henderson--- tcg/ppc/tcg-target-conset.h | 37 ++++++++++ tcg/ppc/tcg-target.h | 1 + tcg/ppc/tcg-target.c.inc | 136 +++++++++++++++--------------------- 3 files changed, 94 insertions(+), 80 deletions(-) create mode 100644 tcg/ppc/tcg-target-conset.h
tcg/ppc/tcg-target-conset.h new file +37 -0
@@ -0,0 +1,37 @@ +/* SPDX-License-Identifier: MIT */ +/* +* PowerPC target-specific constaint sets. +* Copyright (c) 2020 Linaro +*/ + +C_O0_I1(r) +C_O0_I2(r, r) +C_O0_I2(r, ri) +C_O0_I2(S, S) +C_O0_I2(v, r) +C_O0_I3(S, S, S) +C_O0_I4(r, r, ri, ri) +C_O0_I4(S, S, S, S) +C_O1_I1(r, L) +C_O1_I1(r, r) +C_O1_I1(v, r) +C_O1_I1(v, v) +C_O1_I1(v, vr) +C_O1_I2(r, 0, rZ) +C_O1_I2(r, L, L) +C_O1_I2(r, rI, ri) +C_O1_I2(r, rI, rT) +C_O1_I2(r, r, r) +C_O1_I2(r, r, ri) +C_O1_I2(r, r, rI) +C_O1_I2(r, r, rT) +C_O1_I2(r, r, rU) +C_O1_I2(r, r, rZW) +C_O1_I2(v, v, v) +C_O1_I3(v, v, v, v) +C_O1_I4(r, r, ri, rZ, rZ) +C_O1_I4(r, r, r, ri, ri) +C_O2_I1(L, L, L) +C_O2_I2(L, L, L, L) +C_O2_I4(r, r, rI, rZM, r, r) +C_O2_I4(r, r, r, r, rI, rZM)
tcg/ppc/tcg-target.h +1 -0
@@ -185,5 +185,6 @@ 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
tcg/ppc/tcg-target.c.inc +56 -80
222 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH 18/22 tcg/riscv: Convert to tcg-target-conset.h
In reply to Richard Henderson--- tcg/riscv/tcg-target-conset.h | 25 +++++++++++ tcg/riscv/tcg-target.h | 1 + tcg/riscv/tcg-target.c.inc | 83 ++++++++++------------------------- 3 files changed, 49 insertions(+), 60 deletions(-) create mode 100644 tcg/riscv/tcg-target-conset.h
tcg/riscv/tcg-target-conset.h new file +25 -0
@@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: MIT */ +/* +* RISC-V target-specific constaint sets. +* Copyright (c) 2020 Linaro +*/ + +C_O0_I1(r) +C_O0_I2(LZ, L) +C_O0_I2(rZ, r) +C_O0_I2(rZ, rZ) +C_O0_I3(LZ, L, L) +C_O0_I3(LZ, LZ, L) +C_O0_I4(LZ, LZ, L, L) +C_O0_I4(rZ, rZ, rZ, rZ) +C_O1_I1(r, L) +C_O1_I1(r, r) +C_O1_I2(r, L, L) +C_O1_I2(r, r, ri) +C_O1_I2(r, r, rI) +C_O1_I2(r, rZ, rN) +C_O1_I2(r, rZ, rZ) +C_O1_I4(r, rZ, rZ, rZ, rZ) +C_O2_I1(r, r, L) +C_O2_I2(r, r, L, L) +C_O2_I4(r, r, rZ, rZ, rM, rM)
tcg/riscv/tcg-target.h +1 -0
@@ -175,5 +175,6 @@ 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
tcg/riscv/tcg-target.c.inc +23 -60
144 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [PATCH 18/22] tcg/riscv: Convert to tcg-target-conset.h
Quoted 2 lines · Richard Henderson
Signed-off-by Richard Henderson <[email protected]>
Alistair
Quoted 207 lines
--- tcg/riscv/tcg-target-conset.h | 25 +++++++++++ tcg/riscv/tcg-target.h | 1 + tcg/riscv/tcg-target.c.inc | 83 ++++++++++------------------------- 3 files changed, 49 insertions(+), 60 deletions(-) create mode 100644 tcg/riscv/tcg-target-conset.htcg/riscv/tcg-target-conset.h new file +25
-0@@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: MIT */ +/* +* RISC-V target-specific constaint sets. +* Copyright (c) 2020 Linaro +*/ + +C_O0_I1(r) +C_O0_I2(LZ, L) +C_O0_I2(rZ, r) +C_O0_I2(rZ, rZ) +C_O0_I3(LZ, L, L) +C_O0_I3(LZ, LZ, L) +C_O0_I4(LZ, LZ, L, L) +C_O0_I4(rZ, rZ, rZ, rZ) +C_O1_I1(r, L) +C_O1_I1(r, r) +C_O1_I2(r, L, L) +C_O1_I2(r, r, ri) +C_O1_I2(r, r, rI) +C_O1_I2(r, rZ, rN) +C_O1_I2(r, rZ, rZ) +C_O1_I4(r, rZ, rZ, rZ, rZ) +C_O2_I1(r, r, L) +C_O2_I2(r, r, L, L) +C_O2_I4(r, r, rZ, rZ, rM, rM)tcg/riscv/tcg-target.h +1
-0@@ -175,5 +175,6 @@ 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 tcg/riscv/tcg-target.c.inc +23
-61@@ -1571,50 +1571,11 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, } } -static const TCGTargetOpDef *tcg_target_op_def(TCGOpcode op) +static int tcg_target_op_def(TCGOpcode op) { - static const TCGTargetOpDef r - = { .args_ct_str = { "r" } }; - static const TCGTargetOpDef r_r - = { .args_ct_str = { "r", "r" } }; - static const TCGTargetOpDef rZ_r - = { .args_ct_str = { "rZ", "r" } }; - static const TCGTargetOpDef rZ_rZ - = { .args_ct_str = { "rZ", "rZ" } }; - static const TCGTargetOpDef rZ_rZ_rZ_rZ - = { .args_ct_str = { "rZ", "rZ", "rZ", "rZ" } }; - static const TCGTargetOpDef r_r_ri - = { .args_ct_str = { "r", "r", "ri" } }; - static const TCGTargetOpDef r_r_rI - = { .args_ct_str = { "r", "r", "rI" } }; - static const TCGTargetOpDef r_rZ_rN - = { .args_ct_str = { "r", "rZ", "rN" } }; - static const TCGTargetOpDef r_rZ_rZ - = { .args_ct_str = { "r", "rZ", "rZ" } }; - static const TCGTargetOpDef r_rZ_rZ_rZ_rZ - = { .args_ct_str = { "r", "rZ", "rZ", "rZ", "rZ" } }; - static const TCGTargetOpDef r_L - = { .args_ct_str = { "r", "L" } }; - static const TCGTargetOpDef r_r_L - = { .args_ct_str = { "r", "r", "L" } }; - static const TCGTargetOpDef r_L_L - = { .args_ct_str = { "r", "L", "L" } }; - static const TCGTargetOpDef r_r_L_L - = { .args_ct_str = { "r", "r", "L", "L" } }; - static const TCGTargetOpDef LZ_L - = { .args_ct_str = { "LZ", "L" } }; - static const TCGTargetOpDef LZ_L_L - = { .args_ct_str = { "LZ", "L", "L" } }; - static const TCGTargetOpDef LZ_LZ_L - = { .args_ct_str = { "LZ", "LZ", "L" } }; - static const TCGTargetOpDef LZ_LZ_L_L - = { .args_ct_str = { "LZ", "LZ", "L", "L" } }; - static const TCGTargetOpDef r_r_rZ_rZ_rM_rM - = { .args_ct_str = { "r", "r", "rZ", "rZ", "rM", "rM" } }; - switch (op) { case INDEX_op_goto_ptr: - return &r; + return C_O0_I1(r); case INDEX_op_ld8u_i32: case INDEX_op_ld8s_i32:@@ -1646,7 +1607,7 @@ static const TCGTargetOpDef *tcg_target_op_def(TCGOpcode op) case INDEX_op_extrl_i64_i32: case INDEX_op_extrh_i64_i32: case INDEX_op_ext_i32_i64: - return &r_r; + return C_O1_I1(r, r); case INDEX_op_st8_i32: case INDEX_op_st16_i32:@@ -1655,7 +1616,7 @@ static const TCGTargetOpDef *tcg_target_op_def(TCGOpcode op) case INDEX_op_st16_i64: case INDEX_op_st32_i64: case INDEX_op_st_i64: - return &rZ_r; + return C_O0_I2(rZ, r); case INDEX_op_add_i32: case INDEX_op_and_i32:@@ -1665,11 +1626,11 @@ static const TCGTargetOpDef *tcg_target_op_def(TCGOpcode op) case INDEX_op_and_i64: case INDEX_op_or_i64: case INDEX_op_xor_i64: - return &r_r_rI; + return C_O1_I2(r, r, rI); case INDEX_op_sub_i32: case INDEX_op_sub_i64: - return &r_rZ_rN; + return C_O1_I2(r, rZ, rN); case INDEX_op_mul_i32: case INDEX_op_mulsh_i32:@@ -1687,7 +1648,7 @@ static const TCGTargetOpDef *tcg_target_op_def(TCGOpcode op) case INDEX_op_rem_i64: case INDEX_op_remu_i64: case INDEX_op_setcond_i64: - return &r_rZ_rZ; + return C_O1_I2(r, rZ, rZ); case INDEX_op_shl_i32: case INDEX_op_shr_i32:@@ -1695,39 +1656,41 @@ static const TCGTargetOpDef *tcg_target_op_def(TCGOpcode op) case INDEX_op_shl_i64: case INDEX_op_shr_i64: case INDEX_op_sar_i64: - return &r_r_ri; + return C_O1_I2(r, r, ri); case INDEX_op_brcond_i32: case INDEX_op_brcond_i64: - return &rZ_rZ; + return C_O0_I2(rZ, rZ); case INDEX_op_add2_i32: case INDEX_op_add2_i64: case INDEX_op_sub2_i32: case INDEX_op_sub2_i64: - return &r_r_rZ_rZ_rM_rM; + return C_O2_I4(r, r, rZ, rZ, rM, rM); case INDEX_op_brcond2_i32: - return &rZ_rZ_rZ_rZ; + return C_O0_I4(rZ, rZ, rZ, rZ); case INDEX_op_setcond2_i32: - return &r_rZ_rZ_rZ_rZ; + return C_O1_I4(r, rZ, rZ, rZ, rZ); case INDEX_op_qemu_ld_i32: - return TARGET_LONG_BITS <= TCG_TARGET_REG_BITS ? &r_L : &r_L_L; + return (TARGET_LONG_BITS <= TCG_TARGET_REG_BITS + ? C_O1_I1(r, L) : C_O1_I2(r, L, L)); case INDEX_op_qemu_st_i32: - return TARGET_LONG_BITS <= TCG_TARGET_REG_BITS ? &LZ_L : &LZ_L_L; + return (TARGET_LONG_BITS <= TCG_TARGET_REG_BITS + ? C_O0_I2(LZ, L) : C_O0_I3(LZ, L, L)); case INDEX_op_qemu_ld_i64: - return TCG_TARGET_REG_BITS == 64 ? &r_L - : TARGET_LONG_BITS <= TCG_TARGET_REG_BITS ? &r_r_L - : &r_r_L_L; + return (TCG_TARGET_REG_BITS == 64 ? C_O1_I1(r, L) + : TARGET_LONG_BITS <= TCG_TARGET_REG_BITS ? C_O2_I1(r, r, L) + : C_O2_I2(r, r, L, L)); case INDEX_op_qemu_st_i64: - return TCG_TARGET_REG_BITS == 64 ? &LZ_L - : TARGET_LONG_BITS <= TCG_TARGET_REG_BITS ? &LZ_LZ_L - : &LZ_LZ_L_L; + return (TCG_TARGET_REG_BITS == 64 ? C_O0_I2(LZ, L) + : TARGET_LONG_BITS <= TCG_TARGET_REG_BITS ? C_O0_I3(LZ, LZ, L) + : C_O0_I4(LZ, LZ, L, L)); default: - return NULL; + g_assert_not_reached(); } } --2.25.1
Re: [PATCH 18/22] tcg/riscv: Convert to tcg-target-conset.h
In reply to Richard HendersonQuoted 15 lines · Richard Henderson
Signed-off-by Richard Henderson <[email protected]>--- tcg/riscv/tcg-target-conset.h | 25 +++++++++++ tcg/riscv/tcg-target.h | 1 + tcg/riscv/tcg-target.c.inc | 83 ++++++++++------------------------- 3 files changed, 49 insertions(+), 60 deletions(-) create mode 100644 tcg/riscv/tcg-target-conset.htcg/riscv/tcg-target-conset.h new file +0
-0
tcg/riscv/tcg-target-conset.h line 3
Quoted 3 lines
tcg/riscv/tcg-target-conset.h new file +3
-0@@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: MIT */ +/* +* RISC-V target-specific constaint sets.
"constraint"
tcg/riscv/tcg-target-conset.h line 6
Quoted 3 lines
tcg/riscv/tcg-target-conset.h new file +3
-0+* Copyright (c) 2020 Linaro +*/ +
(Also "conset.h" looks really like a typo for "const.h" which is kinda confusing :-))
-- PMM
Re: [PATCH 18/22] tcg/riscv: Convert to tcg-target-conset.h
Quoted 23 lines · Peter Maydell
Quoted 15 lines · Richard Henderson
Signed-off-by Richard Henderson <[email protected]>--- tcg/riscv/tcg-target-conset.h | 25 +++++++++++ tcg/riscv/tcg-target.h | 1 + tcg/riscv/tcg-target.c.inc | 83 ++++++++++------------------------- 3 files changed, 49 insertions(+), 60 deletions(-) create mode 100644 tcg/riscv/tcg-target-conset.htcg/riscv/tcg-target-conset.h new file +0
-0tcg/riscv/tcg-target-conset.h line 3
Quoted 3 lines
tcg/riscv/tcg-target-conset.h new file +3
-0@@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: MIT */ +/* +* RISC-V target-specific constaint sets. "constraint"
Quoted 6 lines
tcg/riscv/tcg-target-conset.h line 6
Quoted 3 lines
tcg/riscv/tcg-target-conset.h new file +3
-0+* Copyright (c) 2020 Linaro +*/ +(Also "
conset.h" looks really like a typo for "const.h" which is kinda confusing :-))
Isn't it an abbrev for "constraint sets"?
Re: [PATCH 18/22] tcg/riscv: Convert to tcg-target-conset.h
In reply to Peter MaydellQuoted 2 lines · Peter Maydell
(Also "
conset.h" looks really like a typo for "const.h" which is kinda confusing :-))
Naming suggestions? :-)
r~
Re: [PATCH 18/22] tcg/riscv: Convert to tcg-target-conset.h
Quoted 6 lines · Richard Henderson
Quoted 2 lines · Peter Maydell
(Also "
conset.h" looks really like a typo for "const.h" which is kinda confusing :-))Naming suggestions? :-)
tcg-target-con-set.h ?
-- PMM
PATCH 19/22 tcg/s390: Convert to tcg-target-conset.h
In reply to Richard Henderson--- tcg/s390/tcg-target-conset.h | 24 +++++++ tcg/s390/tcg-target.h | 1 + tcg/s390/tcg-target.c.inc | 121 +++++++++++++++-------------------- 3 files changed, 76 insertions(+), 70 deletions(-) create mode 100644 tcg/s390/tcg-target-conset.h
tcg/s390/tcg-target-conset.h new file +24 -0
@@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: MIT */ +/* +* S390 target-specific constaint sets. +* Copyright (c) 2020 Linaro +*/ + +C_O0_I1(r) +C_O0_I2(L, L) +C_O0_I2(r, r) +C_O0_I2(r, ri) +C_O1_I1(r, L) +C_O1_I1(r, r) +C_O1_I2(r, 0, ri) +C_O1_I2(r, 0, rI) +C_O1_I2(r, 0, rJ) +C_O1_I2(r, r, ri) +C_O1_I2(r, rZ, r) +C_O1_I4(r, r, ri, r, 0) +C_O1_I4(r, r, ri, rI, 0) +C_O2_I2(b, a, 0, r) +C_O2_I3(b, a, 0, 1, r) +C_O2_I4(r, r, 0, 1, rA, r) +C_O2_I4(r, r, 0, 1, ri, r) +C_O2_I4(r, r, 0, 1, r, r)
tcg/s390/tcg-target.h +1 -0
@@ -162,5 +162,6 @@ 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
tcg/s390/tcg-target.c.inc +51 -70
193 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH 20/22 tcg/sparc: Convert to tcg-target-conset.h
In reply to Richard Henderson--- tcg/sparc/tcg-target-conset.h | 27 +++++++++++++ tcg/sparc/tcg-target.h | 1 + tcg/sparc/tcg-target.c.inc | 75 +++++++++++------------------------ 3 files changed, 51 insertions(+), 52 deletions(-) create mode 100644 tcg/sparc/tcg-target-conset.h
tcg/sparc/tcg-target-conset.h new file +27 -0
@@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Sparc target-specific constaint sets. +* Copyright (c) 2020 Linaro +*/ + +C_O0_I1(r) +C_O0_I2(rZ, r) +C_O0_I2(RZ, r) +C_O0_I2(rZ, rJ) +C_O0_I2(RZ, RJ) +C_O0_I2(sZ, A) +C_O0_I2(SZ, A) +C_O1_I1(r, A) +C_O1_I1(R, A) +C_O1_I1(r, r) +C_O1_I1(r, R) +C_O1_I1(R, r) +C_O1_I1(R, R) +C_O1_I2(R, R, R) +C_O1_I2(r, rZ, rJ) +C_O1_I2(R, RZ, RJ) +C_O1_I4(r, rZ, rJ, rI, 0) +C_O1_I4(R, RZ, RJ, RI, 0) +C_O2_I2(r, r, rZ, rJ) +C_O2_I4(R, R, RZ, RZ, RJ, RI) +C_O2_I4(r, r, rZ, rZ, rJ, rJ)
tcg/sparc/tcg-target.h +1 -0
@@ -179,5 +179,6 @@ 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
tcg/sparc/tcg-target.c.inc +23 -52
145 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH 21/22 tcg/tci: Convert to tcg-target-conset.h
In reply to Richard HendersonThis does require finishing the conversion to tcg_target_op_def. Remove quite a lot of ifdefs, since we can reference opcodes even if they are not implemented.
--- tcg/tci/tcg-target-conset.h | 20 +++ tcg/tci/tcg-target.h | 2 + tcg/tci/tcg-target.c.inc | 343 +++++++++++++----------------------- 3 files changed, 147 insertions(+), 218 deletions(-) create mode 100644 tcg/tci/tcg-target-conset.h
tcg/tci/tcg-target-conset.h new file +20 -0
@@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: MIT */ +/* +* TCI target-specific constaint sets. +* Copyright (c) 2020 Linaro +*/ + +C_O0_I2(r, r) +C_O0_I2(r, ri) +C_O0_I3(r, r, r) +C_O0_I4(r, r, ri, ri) +C_O0_I4(r, r, r, r) +C_O1_I1(r, r) +C_O1_I2(r, 0, r) +C_O1_I2(r, ri, ri) +C_O1_I2(r, r, r) +C_O1_I2(r, r, ri) +C_O1_I4(r, r, r, ri, ri) +C_O2_I1(r, r, r) +C_O2_I2(r, r, r, r) +C_O2_I4 (r, r, r, r, r, r)
tcg/tci/tcg-target.h +2 -0
@@ -210,4 +210,6 @@ 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 */
tcg/tci/tcg-target.c.inc +125 -218
361 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH 22/22 tcg: Remove TCG_TARGET_CONSET_H
In reply to Richard HendersonAll backends have now been converted to tcg-target-conset.h, so we can remove the fallback code.
--- 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(-)
tcg/aarch64/tcg-target.h +0 -1
@@ -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 */
tcg/arm/tcg-target.h +0 -1
@@ -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
tcg/i386/tcg-target.h +0 -1
@@ -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
tcg/mips/tcg-target.h +0 -1
@@ -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
tcg/ppc/tcg-target.h +0 -1
@@ -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
tcg/riscv/tcg-target.h +0 -1
@@ -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
tcg/s390/tcg-target.h +0 -1
@@ -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
tcg/sparc/tcg-target.h +0 -1
@@ -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
tcg/tci/tcg-target.h +0 -2
@@ -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 */
tcg/tcg.c +0 -13
@@ -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];
Signature · 1 line
2.25.1
Re: [PATCH 22/22] tcg: Remove TCG_TARGET_CONSET_H
Quoted 5 lines · Richard Henderson
All backends have now been converted to
tcg-target-conset.h, so we can remove the fallback code.Signed-off-by Richard Henderson <[email protected]>
Alistair
Quoted 166 lines
--- 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(-)tcg/aarch64/tcg-target.h +0
-1@@ -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 */ tcg/arm/tcg-target.h +0
-1@@ -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 tcg/i386/tcg-target.h +0
-1@@ -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 tcg/mips/tcg-target.h +0
-1@@ -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 tcg/ppc/tcg-target.h +0
-1@@ -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 tcg/riscv/tcg-target.h +0
-1@@ -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 tcg/s390/tcg-target.h +0
-1@@ -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 tcg/sparc/tcg-target.h +0
-1@@ -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 tcg/tci/tcg-target.h +0
-2@@ -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 */ tcg/tcg.c +0
-14@@ -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
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Type: series
Message-id: [email protected]
Subject: [PATCH 00/22] tcg: backend constraints cleanup
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
* [new tag] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
8b65955 tcg: Remove TCG_TARGET_CONSET_H
3a9c766 tcg/tci: Convert to tcg-target-conset.h
7e3d876 tcg/sparc: Convert to tcg-target-conset.h
759b112 tcg/s390: Convert to tcg-target-conset.h
c9e097a tcg/riscv: Convert to tcg-target-conset.h
6b86815 tcg/ppc: Convert to tcg-target-conset.h
5b5b4b5 tcg/mips: Convert to tcg-target-conset.h
8664281 tcg/arm: Convert to tcg-target-conset.h
80ce8a8 tcg/aarch64: Convert to tcg-target-conset.h
fbe649c tcg: Split out constraint sets to tcg-target-conset.h c3f9af7 tcg: Remove TCG_TARGET_CONSTR_H
758fd8b tcg/sparc: Convert to tcg-target-constr.h
0c2e793 tcg/s390: Convert to tcg-target-constr.h
9c409ea tcg/riscv: Convert to tcg-target-constr.h
54c599f tcg/mips: Convert to tcg-target-constr.h
7231211 tcg/tci: Convert to tcg-target-constr.h
c641c2e tcg/ppc: Convert to tcg-target-constr.h
dc946e3 tcg/aarch64: Convert to tcg-target-constr.h
8cef9ef tcg/arm: Convert to tcg-target-constr.h
00f2363 tcg: Split out target constraints to tcg-target-constr.h a23958f tcg/i386: Move constraint type check to tcg_target_const_match 940927d tcg/tci: Drop L and S constraints
=== OUTPUT BEGIN ===
1/22 Checking commit 940927ddc8e8 (tcg/tci: Drop L and S constraints)
2/22 Checking commit a23958fc7bde (tcg/i386: Move constraint type check to tcg_target_const_match) 3/22 Checking commit 00f236316045 (tcg: Split out target constraints to tcg-target-constr.h)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#16:
new file mode 100644
ERROR: Macros with multiple statements should be enclosed in a do - while loop #187: FILE: tcg/tcg.c:2295:
+#define CONST(CASE, MASK) \
+ case CASE: def->args_ct[i].ct |= MASK; ct_str++; break;
ERROR: trailing statements should be on next line
#188: FILE: tcg/tcg.c:2296:
+ case CASE: def->args_ct[i].ct |= MASK; ct_str++; break;
ERROR: Macros with multiple statements should be enclosed in a do - while loop #189: FILE: tcg/tcg.c:2297:
+#define REGS(CASE, MASK) \
+ case CASE: def->args_ct[i].regs |= MASK; ct_str++; break;
ERROR: trailing statements should be on next line
#190: FILE: tcg/tcg.c:2298:
+ case CASE: def->args_ct[i].regs |= MASK; ct_str++; break;
total: 4 errors, 1 warnings, 177 lines checked
Patch 3/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
4/22 Checking commit 8cef9ef1733f (tcg/arm: Convert to tcg-target-constr.h)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #11:
new file mode 100644
total: 0 errors, 1 warnings, 103 lines checked
Patch 4/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
5/22 Checking commit dc946e3eef6d (tcg/aarch64: Convert to tcg-target-constr.h)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #11:
new file mode 100644
total: 0 errors, 1 warnings, 85 lines checked
Patch 5/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
6/22 Checking commit c641c2e55a80 (tcg/ppc: Convert to tcg-target-constr.h)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #11:
new file mode 100644
total: 0 errors, 1 warnings, 107 lines checked
Patch 6/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
7/22 Checking commit 72312113a5a2 (tcg/tci: Convert to tcg-target-constr.h)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #11:
new file mode 100644
total: 0 errors, 1 warnings, 35 lines checked
Patch 7/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
8/22 Checking commit 54c599f39de4 (tcg/mips: Convert to tcg-target-constr.h)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #11:
new file mode 100644
total: 0 errors, 1 warnings, 99 lines checked
Patch 8/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
9/22 Checking commit 9c409ea55307 (tcg/riscv: Convert to tcg-target-constr.h)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #11:
new file mode 100644
total: 0 errors, 1 warnings, 75 lines checked
Patch 9/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
10/22 Checking commit 0c2e793db503 (tcg/s390: Convert to tcg-target-constr.h)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #11:
new file mode 100644
total: 0 errors, 1 warnings, 67 lines checked
Patch 10/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
11/22 Checking commit 758fd8bea2ca (tcg/sparc: Convert to tcg-target-constr.h)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #11:
new file mode 100644
total: 0 errors, 1 warnings, 67 lines checked
Patch 11/22 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
12/22 Checking commit c3f9af77c862 (tcg: Remove TCG_TARGET_CONSTR_H)
13/22 Checking commit fbe649c12074 (tcg: Split out constraint sets to tcg-target-conset.h)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #14:
new file mode 100644
ERROR: Macros with complex values should be enclosed in parenthesis #423: FILE: tcg/tcg.c:357:
+#define C_O0_I1(I1) C_PFX1(c_o0_i1_, I1),
ERROR: Macros with complex values should be enclosed in parenthesis #424: FILE: tcg/tcg.c:358:
+#define C_O0_I2(I1, I2) C_PFX2(c_o0_i2_, I1, I2),
ERROR: Macros with complex values should be enclosed in parenthesis #425: FILE: tcg/tcg.c:359:
+#define C_O0_I3(I1, I2, I3) C_PFX3(c_o0_i3_, I1, I2, I3),
ERROR: Macros with complex values should be enclosed in parenthesis #426: FILE: tcg/tcg.c:360:
+#define C_O0_I4(I1, I2, I3, I4) C_PFX4(c_o0_i4_, I1, I2, I3, I4),
ERROR: Macros with complex values should be enclosed in parenthesis #428: FILE: tcg/tcg.c:362:
+#define C_O1_I1(O1, I1) C_PFX2(c_o1_i1_, O1, I1),
ERROR: Macros with complex values should be enclosed in parenthesis #429: FILE: tcg/tcg.c:363:
+#define C_O1_I2(O1, I1, I2) C_PFX3(c_o1_i2_, O1, I1, I2),
ERROR: Macros with complex values should be enclosed in parenthesis #430: FILE: tcg/tcg.c:364:
+#define C_O1_I3(O1, I1, I2, I3) C_PFX4(c_o1_i3_, O1, I1, I2, I3),
ERROR: Macros with complex values should be enclosed in parenthesis #431: FILE: tcg/tcg.c:365:
+#define C_O1_I4(O1, I1, I2, I3, I4) C_PFX5(c_o1_i4_, O1, I1, I2, I3, I4),
ERROR: Macros with complex values should be enclosed in parenthesis #433: FILE: tcg/tcg.c:367:
+#define C_N1_I2(O1, I1, I2) C_PFX3(c_n1_i2_, O1, I1, I2),
ERROR: Macros with complex values should be enclosed in parenthesis #435: FILE: tcg/tcg.c:369:
+#define C_O2_I1(O1, O2, I1) C_PFX3(c_o2_i1_, O1, O2, I1),
ERROR: Macros with complex values should be enclosed in parenthesis #436: FILE: tcg/tcg.c:370:
+#define C_O2_I2(O1, O2, I1, I2) C_PFX4(c_o2_i2_, O1, O2, I1, I2),
ERROR: Macros with complex values should be enclosed in parenthesis #437: FILE: tcg/tcg.c:371:
+#define C_O2_I3(O1, O2, I1, I2, I3) C_PFX5(c_o2_i3_, O1, O2, I1, I2, I3),
ERROR: Macros with complex values should be enclosed in parenthesis #438: FILE: tcg/tcg.c:372:
+#define C_O2_I4(O1, O2, I1, I2, I3, I4) \
+ C_PFX6(c_o2_i4_, O1, O2, I1, I2, I3, I4),
total: 13 errors, 1 warnings, 506 lines checked
Patch 13/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
14/22 Checking commit 80ce8a8cce5c (tcg/aarch64: Convert to tcg-target-conset.h)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #11:
new file mode 100644
total: 0 errors, 1 warnings, 219 lines checked
Patch 14/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
15/22 Checking commit 86642819eb3e (tcg/arm: Convert to tcg-target-conset.h)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #11:
new file mode 100644
total: 0 errors, 1 warnings, 187 lines checked
Patch 15/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
16/22 Checking commit 5b5b4b527edd (tcg/mips: Convert to tcg-target-conset.h)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #11:
new file mode 100644
total: 0 errors, 1 warnings, 203 lines checked
Patch 16/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
17/22 Checking commit 6b8681521e36 (tcg/ppc: Convert to tcg-target-conset.h)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #11:
new file mode 100644
total: 0 errors, 1 warnings, 265 lines checked
Patch 17/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
18/22 Checking commit c9e097afd8a3 (tcg/riscv: Convert to tcg-target-conset.h)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #11:
new file mode 100644
total: 0 errors, 1 warnings, 175 lines checked
Patch 18/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
19/22 Checking commit 759b11287ddc (tcg/s390: Convert to tcg-target-conset.h)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #11:
new file mode 100644
total: 0 errors, 1 warnings, 223 lines checked
Patch 19/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
20/22 Checking commit 7e3d876c1fff (tcg/sparc: Convert to tcg-target-conset.h)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #11:
new file mode 100644
total: 0 errors, 1 warnings, 178 lines checked
Patch 20/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
21/22 Checking commit 3a9c766171ee (tcg/tci: Convert to tcg-target-conset.h)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #15:
new file mode 100644
total: 0 errors, 1 warnings, 387 lines checked
Patch 21/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
22/22 Checking commit 8b65955e39e2 (tcg: Remove TCG_TARGET_CONSET_H) === OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]