]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commitdiff
tcg: Make ARRAY_SIZE(tcg_op_defs) globally available
authorStefan Weil <sw@weilnetz.de>
Thu, 29 Sep 2011 16:33:21 +0000 (18:33 +0200)
committerStefan Weil <weil@mail.berlios.de>
Mon, 31 Oct 2011 20:52:16 +0000 (21:52 +0100)
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 <sw@weilnetz.de>
tcg/tcg.c
tcg/tcg.h

index 30f3aefe69a2c7899428627bb6d1845fda324211..6b27d7bfac7be5dad843c949f78d53d7971b8db3 100644 (file)
--- 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;
index ca480751754b67fa100b434e989d89417c17137f..755a8b31cc0945d7937ba2c264bb6c1b98573434 100644 (file)
--- 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];