From patchwork Tue Oct 23 06:21:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evgeny Voevodin X-Patchwork-Id: 193365 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D886E2C0100 for ; Tue, 23 Oct 2012 17:31:47 +1100 (EST) Received: from localhost ([::1]:46676 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQY1h-0005sY-NP for incoming@patchwork.ozlabs.org; Tue, 23 Oct 2012 02:31:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQY1V-0005rC-RY for qemu-devel@nongnu.org; Tue, 23 Oct 2012 02:31:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TQY1U-0004QJ-3a for qemu-devel@nongnu.org; Tue, 23 Oct 2012 02:31:33 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:49200) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQY1T-0004Pu-U9 for qemu-devel@nongnu.org; Tue, 23 Oct 2012 02:31:32 -0400 Received: from eusync4.samsung.com (mailout3.w1.samsung.com [210.118.77.13]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MCC00C6Q1OJJS10@mailout3.w1.samsung.com> for qemu-devel@nongnu.org; Tue, 23 Oct 2012 07:21:55 +0100 (BST) Received: from evvoevodinPC.rnd.samsung.ru ([106.109.8.9]) by eusync4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MCC008ZX1NMAD70@eusync4.samsung.com> for qemu-devel@nongnu.org; Tue, 23 Oct 2012 07:21:28 +0100 (BST) From: Evgeny Voevodin To: qemu-devel@nongnu.org Date: Tue, 23 Oct 2012 10:21:13 +0400 Message-id: <1350973278-2236-3-git-send-email-e.voevodin@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1350973278-2236-1-git-send-email-e.voevodin@samsung.com> References: <1350973278-2236-1-git-send-email-e.voevodin@samsung.com> X-TM-AS-MML: No X-detected-operating-system: by eggs.gnu.org: Solaris 10 (1203?) X-Received-From: 210.118.77.13 Cc: Evgeny Voevodin , blauwirbel@gmail.com, kyungmin.park@samsung.com, edgar.iglesias@gmail.com, aurelien@aurel32.net, rth@twiddle.net Subject: [Qemu-devel] [PATCH v2 2/7] translate-all.c: Introduce TCGContext *tcg_cur_ctx X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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];