From: Stefan Weil Date: Thu, 29 Sep 2011 16:33:21 +0000 (+0200) Subject: tcg: Make ARRAY_SIZE(tcg_op_defs) globally available X-Git-Tag: v1.0-rc1~13^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2a24374ab6c27c00dd346f0961a0f05e13672a86;p=thirdparty%2Fqemu.git tcg: Make ARRAY_SIZE(tcg_op_defs) globally available tcg_op_defs was already a global array. The tci disassembler also needs ARRAY_SIZE(tcg_op_defs), so add a new global constant with this value. Signed-off-by: Stefan Weil --- diff --git a/tcg/tcg.c b/tcg/tcg.c index 30f3aefe69a..6b27d7bfac7 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -89,6 +89,7 @@ TCGOpDef tcg_op_defs[] = { #include "tcg-opc.h" #undef DEF }; +const size_t tcg_op_defs_max = ARRAY_SIZE(tcg_op_defs); static TCGRegSet tcg_target_available_regs[2]; static TCGRegSet tcg_target_call_clobber_regs; diff --git a/tcg/tcg.h b/tcg/tcg.h index ca480751754..755a8b31cc0 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -525,7 +525,8 @@ typedef struct TCGOpDef { } TCGOpDef; extern TCGOpDef tcg_op_defs[]; - +extern const size_t tcg_op_defs_max; + typedef struct TCGTargetOpDef { TCGOpcode op; const char *args_ct_str[TCG_MAX_OP_ARGS];