qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 2/6] tcg: Make ARRAY_SIZE(tcg_op_defs) globally a


From: Stefan Weil
Subject: [Qemu-devel] [PATCH v2 2/6] tcg: Make ARRAY_SIZE(tcg_op_defs) globally available
Date: Thu, 20 Oct 2011 23:11:21 +0200

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 <address@hidden>
---
 tcg/tcg.c |    1 +
 tcg/tcg.h |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tcg/tcg.c b/tcg/tcg.c
index fefce5f..15a1f5e 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 811e312..79ea3cb 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -525,6 +525,7 @@ typedef struct TCGOpDef {
 } TCGOpDef;
 
 extern TCGOpDef tcg_op_defs[];
+extern const size_t tcg_op_defs_max;
 
 typedef struct TCGTargetOpDef {
     TCGOpcode op;
-- 
1.7.2.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]