From patchwork Sun Jun 25 09:20:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Llu=C3=ADs_Vilanova?= X-Patchwork-Id: 780446 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wwRW14xplz9s9Y for ; Sun, 25 Jun 2017 19:20:43 +1000 (AEST) Received: from localhost ([::1]:41793 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dP3ig-0004AH-Rm for incoming@patchwork.ozlabs.org; Sun, 25 Jun 2017 05:20:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59920) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dP3iN-00049z-N6 for qemu-devel@nongnu.org; Sun, 25 Jun 2017 05:20:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dP3iH-0007B1-Ce for qemu-devel@nongnu.org; Sun, 25 Jun 2017 05:20:19 -0400 Received: from roura.ac.upc.edu ([147.83.33.10]:46116 helo=roura.ac.upc.es) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dP3iH-0007AF-0r for qemu-devel@nongnu.org; Sun, 25 Jun 2017 05:20:13 -0400 Received: from correu-1.ac.upc.es (correu-1.ac.upc.es [147.83.30.91]) by roura.ac.upc.es (8.13.8/8.13.8) with ESMTP id v5P9KBvg019568; Sun, 25 Jun 2017 11:20:11 +0200 Received: from localhost (unknown [132.68.53.125]) by correu-1.ac.upc.es (Postfix) with ESMTPSA id 7F914783; Sun, 25 Jun 2017 11:20:05 +0200 (CEST) From: =?utf-8?b?TGx1w61z?= Vilanova To: qemu-devel@nongnu.org Date: Sun, 25 Jun 2017 12:20:04 +0300 Message-Id: <149838240417.6497.17254324769778894023.stgit@frigg.lan> X-Mailer: git-send-email 2.11.0 In-Reply-To: <149838022308.6497.2104916050645246693.stgit@frigg.lan> References: <149838022308.6497.2104916050645246693.stgit@frigg.lan> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-MIME-Autoconverted: from 8bit to quoted-printable by roura.ac.upc.es id v5P9KBvg019568 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-Received-From: 147.83.33.10 Subject: [Qemu-devel] [PATCH v9 09/26] target: [tcg, i386] Refactor 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: Paolo Bonzini , Peter Crosthwaite , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Eduardo Habkost , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Incrementally paves the way towards using the generic instruction translation loop. Signed-off-by: LluĂ­s Vilanova --- target/i386/translate.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index f0d12a3d13..3c7ef4af67 100644 --- a/target/i386/translate.c +++ b/target/i386/translate.c @@ -8468,6 +8468,12 @@ static void i386_trblock_init_globals(DisasContextBase *db, CPUState *cpu) cpu_cc_srcT = tcg_temp_local_new(); } +static void i386_trblock_insn_start(DisasContextBase *db, CPUState *cpu) +{ + DisasContext *dc = container_of(db, DisasContext, base); + tcg_gen_insn_start(db->pc_next, dc->cc_op); +} + /* generate intermediate code for basic block 'tb'. */ void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb) { @@ -8498,7 +8504,7 @@ void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb) gen_tb_start(tb, cpu_env); for(;;) { - tcg_gen_insn_start(db->pc_next, dc->cc_op); + i386_trblock_insn_start(db, cpu); num_insns++; /* If RF is set, suppress an internally generated breakpoint. */