From patchwork Fri May 4 05:40:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 134935 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp425985lji; Thu, 3 May 2018 22:46:55 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqxvi2DCqPYyT7UfRTH1MhxCCRcnDh//xetNb2GuSC7e6RwYTrA6G2Nrmfm1rGoCwRtcf5r X-Received: by 10.55.27.222 with SMTP id m91mr20903486qkh.355.1525412815045; Thu, 03 May 2018 22:46:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525412815; cv=none; d=google.com; s=arc-20160816; b=z7CwAAIQHLo8lvGv/VA4GUmojfAa1V5OxxRSyFM+qnLyq/3Nzc4zYU7pv7jpORMIv7 QDSLw8NeVP+JnpDTrqlAFwOZ1pS/hSZEEr5n5vnIKkTjKi/v8DIcKR5BxP4WGDscdXjT lbSKJe0b9Kkm4icZSJzGq/l8YfmQCrgicnHEaFMRvHET4o8rD7z7wSoAg5uSb0P8EZAW nPDUFiEdQ5fqkS9f8x4KPbCB+DMq5pDO8ehxzvvDXGkH96hoEdZZol3O9dzCtCQhoNRW NcmBu+D9M/vlgRzcsFXXihtowrom10eVYmimPcixv27RLcNYvtXYJbInVQlBocP68xpl 21Sg== 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=0l4W9AJO0Xnm6FybQxBUWCMwbw5S6ncPwqqFelSuDEY=; b=Hr7EFBHEeg/hwpjTG5YKEX85ph0zx5CjVtn/kmtOjQD5YiexcJiKrAUCH2iiVin2mt SSjyjgtr5wEMJNCAfFYhwH3srWM9fFN3J23KYI/v9ZiACTwoQa2Em0b4bl3733uNCv2m KUptaZxDa9+GtbZQW/8JBgHpxJFjL4bS8Xwn069V40ir0aNC8zIrbO+HmRCQWiFa+CLg c9Q0RSZgYMOO6JO9K8HFPYB3TAf8N9h08fxfoPg4TEof1HoxdFMiw+KJvvmdKQsl9Nbx QEZrJp8nwTgutYZozjg/X1NXIZuYOo+TmtZ5X+NPaQ2a/CpJOzkCEcpmWmrr9uKa9ozc 4vDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=eoc3tvfs; 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 r76si5703639qkh.149.2018.05.03.22.46.54 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 03 May 2018 22:46:55 -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=eoc3tvfs; 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]:60576 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fETYU-00057d-E1 for patch@linaro.org; Fri, 04 May 2018 01:46:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38483) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fETSd-00006F-Bo for qemu-devel@nongnu.org; Fri, 04 May 2018 01:40:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fETSc-0004uj-M8 for qemu-devel@nongnu.org; Fri, 04 May 2018 01:40:51 -0400 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]:35836) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fETSc-0004uF-Gw for qemu-devel@nongnu.org; Fri, 04 May 2018 01:40:50 -0400 Received: by mail-pg0-x241.google.com with SMTP id j11-v6so14728807pgf.2 for ; Thu, 03 May 2018 22:40:50 -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=0l4W9AJO0Xnm6FybQxBUWCMwbw5S6ncPwqqFelSuDEY=; b=eoc3tvfs2VqJjkuA6jSlRZm2ISFCQ0RwVqhp8ZOA665ayw/2cqEINk6wI8vE2n6Ms6 AC6ZFQIvO/TrmA8+yFv4g8uhjj7YeCbA5THLrHV78I/8FBxjNDB/5CxFP8HAN+S8hIX7 Qjqv9m0xrA3NPVaTwLX3nTd2gVblydBx3jlPI= 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=0l4W9AJO0Xnm6FybQxBUWCMwbw5S6ncPwqqFelSuDEY=; b=rUaE5/+btSR8d5kwtdE5jopNcq687jSQmGPcGx6VNipKmcftn96EibMByrROJ91gy7 A8bfO3ro22DqQ3mdHIKu47aK+AdIVlgvKPAUig2FdLS6T9hTI2hf8gubU1MMQzkQLDQB VWnPd4knQrN/lma3e+BI47Xyb6VOwjXmSwEO5t7IKCcatCapxvxoprKtGSOEdgWyHqEk 80G+dMccv7WfyLeeVdG+n+q983Y0LsQav1Cqrnp7r6bhHD3PzlfaK+oI7ixxlzgB2L73 qW+WVNizqESJgmHbviG05RqywoqZFCLGql03faXNfHID5hSCsMQjd+M5f9hhjh+kiMqg AY+Q== X-Gm-Message-State: ALQs6tDdCo7hdsfNqzC3M+Qy1cfxUw9PLSCTomcMF9BKdrW85ozPiYG/ EVtx0R/+2rF3dCGQZQXF3B0Hg8HG6H0= X-Received: by 2002:a17:902:125:: with SMTP id 34-v6mr27231142plb.42.1525412449297; Thu, 03 May 2018 22:40:49 -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 t23-v6sm26550809pgu.41.2018.05.03.22.40.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 May 2018 22:40:48 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 3 May 2018 22:40:30 -0700 Message-Id: <20180504054030.24527-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180504054030.24527-1-richard.henderson@linaro.org> References: <20180504054030.24527-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:c05::241 Subject: [Qemu-devel] [PATCH 13/13] target/openrisc: Merge disas_openrisc_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: Stafford Horne Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/openrisc/translate.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) -- 2.14.3 Acked-by: Stafford Horne diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c index 66e493220e..3866106bf6 100644 --- a/target/openrisc/translate.c +++ b/target/openrisc/translate.c @@ -1373,14 +1373,6 @@ static bool trans_lf_sfle_s(DisasContext *dc, arg_ab *a, uint32_t insn) return true; } -static void disas_openrisc_insn(DisasContext *dc, OpenRISCCPU *cpu) -{ - uint32_t insn = cpu_ldl_code(&cpu->env, dc->pc); - if (!decode(dc, insn)) { - gen_illegal_exception(dc); - } -} - void gen_intermediate_code(CPUState *cs, struct TranslationBlock *tb) { CPUOpenRISCState *env = cs->env_ptr; @@ -1388,6 +1380,7 @@ void gen_intermediate_code(CPUState *cs, struct TranslationBlock *tb) struct DisasContext ctx, *dc = &ctx; uint32_t pc_start; uint32_t next_page_start; + uint32_t insn; int num_insns; int max_insns; @@ -1449,7 +1442,11 @@ void gen_intermediate_code(CPUState *cs, struct TranslationBlock *tb) if (num_insns == max_insns && (tb_cflags(tb) & CF_LAST_IO)) { gen_io_start(); } - disas_openrisc_insn(dc, cpu); + + insn = cpu_ldl_code(&cpu->env, dc->pc); + if (!decode(dc, insn)) { + gen_illegal_exception(dc); + } dc->pc = dc->pc + 4; /* delay slot */