From patchwork Sat May 12 05:02:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 135640 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1762670lji; Fri, 11 May 2018 22:17:06 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpciefDR4cnmBOcMDl/zJgFYra+iXckEdj91+gHYWvfDKkg7sASMv4ZaOruQ+oTsuLgGHG/ X-Received: by 2002:aed:26c3:: with SMTP id q61-v6mr865459qtd.60.1526102226292; Fri, 11 May 2018 22:17:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526102226; cv=none; d=google.com; s=arc-20160816; b=EJ92lqWoOKrvn9d1qdqHizJUjHVId+08m6G1cH/jd8hoyg8ZNI2NCSMHablp3Q6zgC uvQIDPBWMPkJZisfdFIY5s3nQYburWn+3iE6LMSpKRRADKLVvVSzPSCmo+XeaPEaQ5E3 nKgrmCjw+C1Zgvy0vw+x3g6TFKF3zja1XUCVc6XTJ6Gti883p/4/sHxpVR4ERENsDl0P AmANzMG/1c2jAOLq6SC1AqEgpatUU4lib9r8411E7q7mWUQzlfTzhcXaMY1JrqInGRBw l5Jrt3FELAU/D1X41A9hNbAQB3Ey9IVQkMRbWKL1Ktis69FGHeRlGWfyhSltn8tyRDNA qNCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=U6nS46xM2ODxxohiUKnS5JtgCHRh8ZMrwU73D7F0Pls=; b=M5zwD5iBEP6nWuJ5tWk0gKwR1nE99GtbUAXpUPtlwMeo/3rv2CAC6e+eYOHmITYNIT Zqq1dHOOe6D45ef/YHb1od0jqHmj9mmkoCDR14sqZQNEge+LVc386DwwGJNiEkazEsjI wH54VXU2gSJa8LFKnRTreE+HrKu4a1Eb6LUZlWMy0RsJztt7KHoMTMPI8Sp2q4+zmUWX OTFt1mppZvFc8SekDyIUUXBStiYCPX1TVQjg3WpLa4LRUc/pPJQ6GzV8TK3MlsfUsFP7 t1HCa/kdJzwzx3bYSH6uppfoOCPeN1fSFNdoJofLV/iRBIaD8/sIcncpPD2Ia46YkkH7 x3lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=C8NQSrij; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id s29-v6si4819464qth.44.2018.05.11.22.17.06 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 11 May 2018 22:17:06 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=C8NQSrij; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:46166 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHMu1-0002WU-R0 for patch@linaro.org; Sat, 12 May 2018 01:17:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHMgY-00046g-D1 for qemu-devel@nongnu.org; Sat, 12 May 2018 01:03:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fHMgT-0008Nu-Dr for qemu-devel@nongnu.org; Sat, 12 May 2018 01:03:10 -0400 Received: from mail-pl0-x241.google.com ([2607:f8b0:400e:c01::241]:35682) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fHMgT-0008Nl-99 for qemu-devel@nongnu.org; Sat, 12 May 2018 01:03:05 -0400 Received: by mail-pl0-x241.google.com with SMTP id i5-v6so4373864plt.2 for ; Fri, 11 May 2018 22:03:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=U6nS46xM2ODxxohiUKnS5JtgCHRh8ZMrwU73D7F0Pls=; b=C8NQSrijXQpV5cjscDQk6/XxEBBvgPbfOl8Q/99R0rdkhI/ml7Aq534kBVr61UEc9t aN9YZkN4iEZVQfCb9Pj+CAaomooTnSVMetdJSl/1VXHGMklrcbNZgWyk3ryMStZJN+5y 6iNmaM6piDIIpyNtWSaJG9Tu55MkanHghFJdg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=U6nS46xM2ODxxohiUKnS5JtgCHRh8ZMrwU73D7F0Pls=; b=g/jXZSu3pND38yTEM05J821wfRgScQsDdRFBi/mVn6pPV3rWVK4MgkL+SMNNsMqRW7 fwMkvlUqB98b4zUqnvB59D5GN8mLLFnnxsQezC2Ciju9t0GY7byT/0DPRhqYBWCnE/4T wzNDb8lZX+hfUaLnAU2cB+iFQ1lAmpQEJgCvW8VyBzwNOZvhSNI5AKKF1jjbgmw/rZ0f 4D/MKKDwMvpNx3cbyljtDhpoAa/6M5e0PDxww9wm6hVAkhIPvKQYcqzQ9rLIrsfHV+BD IDGWm6Dj2HH8Bf91oAHqykGpydixJD4+QCxVre9vNABN3SufTPQB/2ay0jjH6k3R7kGk 6r8w== X-Gm-Message-State: ALKqPwfv0e6REZf9d2b5Ey2p2wNTYGT3B9h7nlV/zr+8eacaNaEQKFAH Dq7NGP02A8htqqfAPITx4gMHDcVt0TM= X-Received: by 2002:a17:902:6b44:: with SMTP id g4-v6mr1020962plt.390.1526101384026; Fri, 11 May 2018 22:03:04 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-2-170.tukw.qwest.net. [97.113.2.170]) by smtp.gmail.com with ESMTPSA id x124-v6sm8999945pfx.72.2018.05.11.22.03.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 May 2018 22:03:02 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 11 May 2018 22:02:50 -0700 Message-Id: <20180512050250.12774-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180512050250.12774-1-richard.henderson@linaro.org> References: <20180512050250.12774-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::241 Subject: [Qemu-devel] [PATCH 9/9] target/m68k: Merge disas_m68k_insn into m68k_tr_translate_insn 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: laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/m68k/translate.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) -- 2.17.0 diff --git a/target/m68k/translate.c b/target/m68k/translate.c index 069558bc28..21eeebf4df 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -6049,16 +6049,6 @@ void register_m68k_insns (CPUM68KState *env) #undef INSN } -/* ??? Some of this implementation is not exception safe. We should always - write back the result to memory before setting the condition codes. */ -static void disas_m68k_insn(CPUM68KState * env, DisasContext *s) -{ - uint16_t insn = read_im16(env, s); - opcode_table[insn](env, s, insn); - do_writebacks(s); - do_release(s); -} - static void m68k_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cpu) { DisasContext *dc = container_of(dcbase, DisasContext, base); @@ -6101,8 +6091,13 @@ static bool m68k_tr_breakpoint_check(DisasContextBase *dcbase, CPUState *cpu, static void m68k_tr_translate_insn(DisasContextBase *dcbase, CPUState *cpu) { DisasContext *dc = container_of(dcbase, DisasContext, base); + CPUM68KState *env = cpu->env_ptr; + uint16_t insn = read_im16(env, dc); + + opcode_table[insn](env, dc, insn); + do_writebacks(dc); + do_release(dc); - disas_m68k_insn(cpu->env_ptr, dc); dc->base.pc_next = dc->pc; if (dc->base.is_jmp == DISAS_NEXT) {