From patchwork Mon Jul 24 20:27:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 9860381 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 77D4E60385 for ; Mon, 24 Jul 2017 20:35:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B834285A3 for ; Mon, 24 Jul 2017 20:35:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 607F0285BD; Mon, 24 Jul 2017 20:35:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D1708285A3 for ; Mon, 24 Jul 2017 20:35:03 +0000 (UTC) Received: from localhost ([::1]:56843 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dZk4F-0007Xs-1c for patchwork-qemu-devel@patchwork.kernel.org; Mon, 24 Jul 2017 16:35:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dZjxh-00035Y-6q for qemu-devel@nongnu.org; Mon, 24 Jul 2017 16:28:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dZjxf-0000vj-0t for qemu-devel@nongnu.org; Mon, 24 Jul 2017 16:28:17 -0400 Received: from mail-qk0-x243.google.com ([2607:f8b0:400d:c09::243]:33431) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dZjxe-0000vS-T0 for qemu-devel@nongnu.org; Mon, 24 Jul 2017 16:28:14 -0400 Received: by mail-qk0-x243.google.com with SMTP id d145so8410412qkc.0 for ; Mon, 24 Jul 2017 13:28:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qyX8WudaQtiIwoWSVuX9E9ie2j+WtmUNYxqR8lmZYTA=; b=nnS9itmqxpENCdrvMNdISTSaslq3MYlQiwrz6l2Xl/bzJqiSnD/QoAoITjeLGHo0fq FjZDN9aQtJQZdclBB55EP308DmDuDSFEjZ/TQ3kiMJ/T+yfW6kN2/hmKIvrD2FLeAoRl Gae4svaHJ/GSnduYJHsnGAVVFLyT8U6U5mLHRTD1pqN+T4t4zzjutHnFDEjYtAA4XGL5 eUQPihTnrK+K3hdF71wwu1fSpdrU3LE+uJvTTup0u2PzX0/v0ZG5V1MA3dJj+9saPol5 GNctTT0cNBPx3FO+6zM1YTD3FnVeLPpwdPcJCHmxfgvAjYjeBj9DfKAGB8yPyBYxM6U7 p70A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=qyX8WudaQtiIwoWSVuX9E9ie2j+WtmUNYxqR8lmZYTA=; b=T6xxAt7l4n1ltArpxeIXBw9Kx9mn7tddd/M3GbjDjQd2PoJT9UNV2WIA+YKLzBaeUN 6il+9bSdTj4/NV2VFeLNF2TtGrc6UtpttxFougZRxZ9jyynTBfNB3+/Le/EXBXPZ1sEo 0PiWkTU0oVnDKMB/oAGwUcb32chtuLzgR6xIaqX0PIV9NKdS1Uy8K6chI6UpCyr2qs4R unQryD+hHhF9zhychgl6juwph5wHVQQyy876rClGUFRONFUI3tPpiBwGecZaFbjoysdE XI794TEAG9010xgV3JLdcsOKWQ9R3kIh5L7v4J0VQYZilYP+kmwPX2QooMpgrKiv1q78 FUmQ== X-Gm-Message-State: AIVw112WpelJoehhK1lnFfpNjaKfzoivEC5DAz+O/TsGuOzXCLUGD7IW DDf1f/m8H+1nNicvacI= X-Received: by 10.55.183.65 with SMTP id h62mr1567226qkf.35.1500928094107; Mon, 24 Jul 2017 13:28:14 -0700 (PDT) Received: from bigtime.com ([71.217.194.233]) by smtp.gmail.com with ESMTPSA id p52sm9196808qtc.74.2017.07.24.13.28.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Jul 2017 13:28:13 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 24 Jul 2017 13:27:05 -0700 Message-Id: <20170724202728.25960-10-rth@twiddle.net> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170724202728.25960-1-rth@twiddle.net> References: <20170724202728.25960-1-rth@twiddle.net> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::243 Subject: [Qemu-devel] [PATCH v15 09/32] target/i386: [tcg] Port to insn_start X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: cota@braap.org, vilanova@ac.upc.edu Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Lluís Vilanova Incrementally paves the way towards using the generic instruction translation loop. Signed-off-by: Lluís Vilanova Reviewed-by: Emilio G. Cota Reviewed-by: Richard Henderson Reviewed-by: Alex Benneé Message-Id: <150002146647.22386.13380064201042141261.stgit@frigg.lan> Signed-off-by: Richard Henderson --- target/i386/translate.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index 651abcaf38..6e1243a5b4 100644 --- a/target/i386/translate.c +++ b/target/i386/translate.c @@ -8448,6 +8448,13 @@ static int i386_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cpu, return max_insns; } +static void i386_tr_insn_start(DisasContextBase *dcbase, CPUState *cpu) +{ + DisasContext *dc = container_of(dcbase, DisasContext, base); + + tcg_gen_insn_start(dc->base.pc_next, dc->cc_op); +} + /* generate intermediate code for basic block 'tb'. */ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb) { @@ -8475,7 +8482,7 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb) num_insns = 0; gen_tb_start(tb); for(;;) { - tcg_gen_insn_start(dc->base.pc_next, dc->cc_op); + i386_tr_insn_start(&dc->base, cs); num_insns++; /* If RF is set, suppress an internally generated breakpoint. */