aboutsummaryrefslogtreecommitdiff
path: root/tcg/tcg.h
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2017-11-14 13:02:51 +0100
committerRichard Henderson <richard.henderson@linaro.org>2017-12-29 12:43:39 -0800
commitcd9090aa9dbba30db8aec9a2fc103aaf1ab0f5a7 (patch)
treeff6496ee4d1e5329f130f08487259af12c547009 /tcg/tcg.h
parent15fa08f8451babc88d733bd411d4c94976f9d0f8 (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.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/tcg/tcg.h b/tcg/tcg.h
index a577447846..f25efa9795 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -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));