From patchwork Mon Apr 1 03:11:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 161505 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4868643jan; Sun, 31 Mar 2019 20:18:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqyl05ZEvBpoxt8lF4mM6VnIYe/eF3Zs859ukJV8GXLtvZzIc+8PWfK3DCHaUz89T1Tpakl4 X-Received: by 2002:a25:5d03:: with SMTP id r3mr16523956ybb.154.1554088707708; Sun, 31 Mar 2019 20:18:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554088707; cv=none; d=google.com; s=arc-20160816; b=aq6Lzy2ym7edXlNJaFnvRv3DPphZpt3kHcRAgDF96ibeXpatBJFZnSn4K8iNslX8eJ JsDhnCBk9L5/yM9D2gDQffv0qtSXUXbx2STmtU6+oRluDW5L1WN8znzO3pIFU0WjI5Yl DLJ1aN0E5YnZxhYwMYuNkWJJ7p6HEmhlIzspaeLohaKHAfZJXRMfwfCZIXiYqJfC8Aci fQDkOLRZYE/WI+ECZEVcmECiuOZldNDGiieTWXu3b8BYR1oVFQlg4n53tLA0srxs87uU hXJE8A5dk4RffizeUmnB1cSfoD/EWyFRHDaKzQ6xqXyprQn/vdO3BbhSPWLAKnOY+XG/ LXPg== 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; bh=dpFu0UtJn3h4iEnuE21ntkTj1sL+0aSszxtNnRJ8slY=; b=pqHMrE+mtzGknVIjsBuFQMq3wDE5t9hxU91awtXYeTt7TdK3noCDapWCbujJYwrc8U qDkHRf2q/acH3da14jWd2BkJjaZkYVIoRSqIEIgevD9oSToHTdJ+OAXmweZ6nHXWGigB Ek7h/hwAYDacj5t13pwB65tk2k7JbkRUWKjI7k26yjylNs2rGnM6fadUDnkbrPIYrKIL mGkaDOQGnn+FeCMVGUeHwwlwIsI+EUVaEfUEzKnxmiVu6lzeD/PZGl/Oov3p5aAPeDbH j+VHu8cUgdECRz1xOcGJ83FNwkZuj5dJuOlC3SAatI3wL1Q9IsuTtf7JgXAsEjG6JG/7 VRSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=cuvFpT6d; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id f8si5154905ybr.13.2019.03.31.20.18.27 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 31 Mar 2019 20:18:27 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=cuvFpT6d; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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 ([127.0.0.1]:34683 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hAnSt-0003NO-7i for patch@linaro.org; Sun, 31 Mar 2019 23:18:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hAnN0-0006nk-Cf for qemu-devel@nongnu.org; Sun, 31 Mar 2019 23:12:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hAnMz-0002rO-EB for qemu-devel@nongnu.org; Sun, 31 Mar 2019 23:12:22 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:46562) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hAnMx-0002p7-Jl for qemu-devel@nongnu.org; Sun, 31 Mar 2019 23:12:21 -0400 Received: by mail-pg1-x541.google.com with SMTP id q1so3971949pgv.13 for ; Sun, 31 Mar 2019 20:12:15 -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=dpFu0UtJn3h4iEnuE21ntkTj1sL+0aSszxtNnRJ8slY=; b=cuvFpT6dCZz+T+10qlpByshL2+NDRl94HsNxeEyC20fAX1tH5dXkxflFqc0waLOfNa JCgKXbvPc1BZzJQufk13MwVRwsOkbWUo/+ShzyVRA8NR3GG1Uc5tZqKQ2EH4US63QR+2 ZqqFwu+DLNpQI2qYUm3Jkw2SJGO4VYn8Bo7HjimL+96MU3FOtP8d9CXTtnIyEnoQfvej 3/IePFcUbfLImhDldIhPHBZu3Boqku2SQmglLyY/LUCpizZSIWV7zghrZFhFHHehQy3Q 1o2gCKh5/xnsPFk1v5rJnj3yb63ok+XHzaqsGkN54Z0aEFCLKITytK8OT86up4x1H8vc vsQw== 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=dpFu0UtJn3h4iEnuE21ntkTj1sL+0aSszxtNnRJ8slY=; b=Tp0l2IyAYCDNPGmANrvrovAuhnSwKpcYSXXgHHjspka7LP449M4RyqcjYk37rBdq8Y 8gzA2mJQTAC/xpf5Qq8zSrEr6RRJpQcGsSwH5rGrzdEtEXLUAR95Qusa2mLA8F0F6q1K Pj+4YzYEIu+L2jZLECM51+7yeiXjHUSGHeQ00YF7tanUvJKPKdkixkS76UeI7YuhQX6f I9ZW/0nPGxjAtkFVVyp4Qy9C4XpccyqliuogPKeWY/m9oqrfUs9ZCp2LOhjUnTWUgMO9 F5unrQsxHXVEnJUvIpxm0puyzkqsE9+0jOGOnzxdhGwqqck54H9DXFIkNMqW/tX7r0XM utWw== X-Gm-Message-State: APjAAAWhL3sh/zX66LKkBeAL/x+EjbgiB9yqS6/vjp7IL1Pp46T96IFv AEOutklmprODyCEqQY3nhxKIOqg0Ffnl0Q== X-Received: by 2002:a62:b612:: with SMTP id j18mr89117pff.124.1554088334102; Sun, 31 Mar 2019 20:12:14 -0700 (PDT) Received: from cloudburst.imgcgcw.net ([147.50.13.10]) by smtp.gmail.com with ESMTPSA id c1sm11843954pfd.114.2019.03.31.20.12.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 31 Mar 2019 20:12:13 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 1 Apr 2019 10:11:49 +0700 Message-Id: <20190401031155.21293-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190401031155.21293-1-richard.henderson@linaro.org> References: <20190401031155.21293-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::541 Subject: [Qemu-devel] [PATCH for-4.1 2/8] target/riscv: Use --static-decode for decodetree 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: kbastian@mail.uni-paderborn.de, palmer@sifive.com, Alistair.Francis@wdc.com, qemu-riscv@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The generated functions are only used within translate.c and do not need to be global, or declared. Signed-off-by: Richard Henderson --- target/riscv/translate.c | 2 -- target/riscv/Makefile.objs | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) -- 2.17.1 Reviewed-by: Alistair Francis Reviewed-by: Palmer Dabbelt diff --git a/target/riscv/translate.c b/target/riscv/translate.c index dd763647ea..7ebd590486 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -538,7 +538,6 @@ static int ex_rvc_register(int reg) return 8 + reg; } -bool decode_insn32(DisasContext *ctx, uint32_t insn); /* Include the auto-generated decoder for 32 bit insn */ #include "decode_insn32.inc.c" @@ -667,7 +666,6 @@ static bool gen_shift(DisasContext *ctx, arg_r *a, #include "insn_trans/trans_rvd.inc.c" #include "insn_trans/trans_privileged.inc.c" -bool decode_insn16(DisasContext *ctx, uint16_t insn); /* auto-generated decoder*/ #include "decode_insn16.inc.c" #include "insn_trans/trans_rvc.inc.c" diff --git a/target/riscv/Makefile.objs b/target/riscv/Makefile.objs index 9c6c109327..c7a1b063ed 100644 --- a/target/riscv/Makefile.objs +++ b/target/riscv/Makefile.objs @@ -7,14 +7,14 @@ decode32-$(TARGET_RISCV64) += $(SRC_PATH)/target/riscv/insn32-64.decode target/riscv/decode_insn32.inc.c: $(decode32-y) $(DECODETREE) $(call quiet-command, \ - $(PYTHON) $(DECODETREE) -o $@ --decode decode_insn32 $(decode32-y), \ - "GEN", $(TARGET_DIR)$@) + $(PYTHON) $(DECODETREE) -o $@ --static-decode decode_insn32 \ + $(decode32-y), "GEN", $(TARGET_DIR)$@) target/riscv/decode_insn16.inc.c: \ $(SRC_PATH)/target/riscv/insn16.decode $(DECODETREE) $(call quiet-command, \ - $(PYTHON) $(DECODETREE) -o $@ --decode decode_insn16 --insnwidth 16 $<, \ - "GEN", $(TARGET_DIR)$@) + $(PYTHON) $(DECODETREE) -o $@ --static-decode decode_insn16 \ + --insnwidth 16 $<, "GEN", $(TARGET_DIR)$@) target/riscv/translate.o: target/riscv/decode_insn32.inc.c \ target/riscv/decode_insn16.inc.c