tcg: Move some TCG_CT_* bits to TCGArgConstraint bitfields

These are easier to set and test when they have their own fields.
Reduce the size of alias_index and sort_index to 4 bits, which is
sufficient for TCG_MAX_OP_ARGS.  This leaves only the bits indicating
constants within the ct field.

Move all initialization to allocation time, rather than init
individual fields in process_op_defs.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2019-04-04 19:34:19 -07:00
parent 74a117906b
commit bc2b17e6ea
2 changed files with 19 additions and 23 deletions

View file

@ -976,15 +976,15 @@ int64_t tcg_cpu_exec_time(void);
void tcg_dump_info(void);
void tcg_dump_op_count(void);
#define TCG_CT_ALIAS 0x80
#define TCG_CT_IALIAS 0x40
#define TCG_CT_NEWREG 0x20 /* output requires a new register */
#define TCG_CT_CONST 0x02 /* any constant of register size */
#define TCG_CT_CONST 1 /* any constant of register size */
typedef struct TCGArgConstraint {
uint16_t ct;
uint8_t alias_index;
uint8_t sort_index;
unsigned ct : 16;
unsigned alias_index : 4;
unsigned sort_index : 4;
bool oalias : 1;
bool ialias : 1;
bool newreg : 1;
TCGRegSet regs;
} TCGArgConstraint;