From patchwork Tue Oct 23 06:21:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [v2,2/7] translate-all.c: Introduce TCGContext *tcg_cur_ctx Date: Mon, 22 Oct 2012 20:21:13 -0000 From: Evgeny Voevodin X-Patchwork-Id: 193365 Message-Id: <1350973278-2236-3-git-send-email-e.voevodin@samsung.com> To: qemu-devel@nongnu.org Cc: Evgeny Voevodin , blauwirbel@gmail.com, kyungmin.park@samsung.com, edgar.iglesias@gmail.com, aurelien@aurel32.net, rth@twiddle.net We will use this pointer from functions where we don't have an interface to pass tcg_ctx as a parameter. Signed-off-by: Evgeny Voevodin --- tcg/tcg.h | 1 + translate-all.c | 1 + 2 files changed, 2 insertions(+) diff --git a/tcg/tcg.h b/tcg/tcg.h index 43b4317..d326b36 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -431,6 +431,7 @@ struct TCGContext { }; extern TCGContext tcg_ctx; +extern TCGContext *tcg_cur_ctx; extern uint16_t *gen_opc_ptr; extern TCGArg *gen_opparam_ptr; extern uint16_t gen_opc_buf[]; diff --git a/translate-all.c b/translate-all.c index 5bd2d37..ccdcddf 100644 --- a/translate-all.c +++ b/translate-all.c @@ -32,6 +32,7 @@ /* code generation context */ TCGContext tcg_ctx; +TCGContext *tcg_cur_ctx = &tcg_ctx; uint16_t gen_opc_buf[OPC_BUF_SIZE]; TCGArg gen_opparam_buf[OPPARAM_BUF_SIZE];