提交 2a24374a 编写于 作者: S Stefan Weil 提交者: Stefan Weil

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: NStefan Weil <sw@weilnetz.de>
上级 ce285b17
......@@ -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;
......
......@@ -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];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册