diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2017-11-14 13:02:51 +0100 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2017-12-29 12:43:39 -0800 |
commit | cd9090aa9dbba30db8aec9a2fc103aaf1ab0f5a7 (patch) | |
tree | ff6496ee4d1e5329f130f08487259af12c547009 /tcg/tcg.h | |
parent | 15fa08f8451babc88d733bd411d4c94976f9d0f8 (diff) |
tcg: Generalize TCGOp parameters
We had two fields specific to INDEX_op_call. Rename these and
add some macros so that the fields may be reused for other opcodes.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg/tcg.h')
-rw-r--r-- | tcg/tcg.h | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -566,10 +566,9 @@ typedef uint16_t TCGLifeData; typedef struct TCGOp { TCGOpcode opc : 8; /* 8 */ - /* The number of out and in parameter for a call. */ - unsigned calli : 4; /* 12 */ - unsigned callo : 2; /* 14 */ - unsigned : 2; /* 16 */ + /* Parameters for this opcode. See below. */ + unsigned param1 : 4; /* 12 */ + unsigned param2 : 4; /* 16 */ /* Lifetime data of the operands. */ unsigned life : 16; /* 32 */ @@ -581,6 +580,9 @@ typedef struct TCGOp { TCGArg args[MAX_OPC_PARAM]; } TCGOp; +#define TCGOP_CALLI(X) (X)->param1 +#define TCGOP_CALLO(X) (X)->param2 + /* Make sure operands fit in the bitfields above. */ QEMU_BUILD_BUG_ON(NB_OPS > (1 << 8)); |