From patchwork Sun May 26 01:09:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 165191 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp5443926ili; Sat, 25 May 2019 18:51:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqxmz19xRojxwH+yEnVHWjVFJc34NVFrOZTQ5GNShVftWp+9XJwYFPf9oHT1Vy3avGK4qUh9 X-Received: by 2002:a1f:a097:: with SMTP id j145mr13320352vke.18.1558835487948; Sat, 25 May 2019 18:51:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558835487; cv=none; d=google.com; s=arc-20160816; b=lJQ4QEKUVxXKDim6t/dEP/+Arb4dLYHX3C3N1JZk6fa327r92KY3hnsj66YrRk7JRb OmlblDUTQWX1vj42zIM+rfrYBr9A8z+x6rOc0gKzIc8etH3QAA3v8Xca+Qg8a5eR/UcZ PByQlKWRJpRJku4UxznswPaWRpvGKOb4G6u/vACxqtIcV9SvKSd1HHXTLs3qMsQVo1rB mfV32gKjoLhPZMbpErbE8uwGIWV5Emv6rzyW/p1TQ8ZyYJRYG3RgegxRRAiYvRc1hrAx cfir6lBlQF/vdfiV06xi9ncMi8waFab7r7dD5s+F8UD5VDfWhfXyMJG/Xf3cOAugksc4 0JjA== 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:to:from :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date; bh=OmquU5pLX4FdtJeBi0sZUSl7FBDLh8w+FhsdYMBvZRk=; b=0Cf+SmjKkY8VoBBN3e/m/VgfwM4OImm5nVPTsVSYajwswJGX8tLU/34r0gPzaqAdZO lxBBFQhmPlvB1O7mFd1Aen2tKyBm+/MedJYcO9y+iMA7GsIZOxwylqByEtF0L608DHeY RBOnShyVMnaDtQvhnXFm5947cwM+aOhQXzbt3tv4DpRUvZIL4skg98H4stY3N9pLQcbo 4D0Bqw+rDl2xKPb9ntddVjU22aIHhoaBuGGkXnt66fkHivcbE6TEHdNw9q+veJzmlbhv uEAXkkgB4f8lWmXwj9n2ZSdn/u7FT9PkX3pbIOIpFkSJ7bulpKdVTouPw+9w0ZdKgZDX Vs9g== ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l20si2338665vsj.187.2019.05.25.18.51.27 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 25 May 2019 18:51: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; 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" Received: from localhost ([127.0.0.1]:49497 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUiJr-0006iB-Gy for patch@linaro.org; Sat, 25 May 2019 21:51:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUhxP-0003HK-PV for qemu-devel@nongnu.org; Sat, 25 May 2019 21:28:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hUhfs-0005o7-HA for qemu-devel@nongnu.org; Sat, 25 May 2019 21:10:09 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:39486) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hUhfs-0005nj-Ab for qemu-devel@nongnu.org; Sat, 25 May 2019 21:10:08 -0400 Received: by mail-pg1-f196.google.com with SMTP id w22so7086073pgi.6 for ; Sat, 25 May 2019 18:10:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:cc:from:to; bh=OmquU5pLX4FdtJeBi0sZUSl7FBDLh8w+FhsdYMBvZRk=; b=LtoZgn4O9WBk7B/uvmTB+HfsxMb30Mz+qE78HE1gvNeuBfhLBPZnCKyIZMSGdLUA/5 BNlEkYt7wZEvHs3TQ1y9dn2rb2VKySqRNtdMHOO/84TXV8Enr546rKRFFbsXWxKtsSn8 LGxPJNnnOCPqcFDBLHOh05s99Z/h9EXWjnHywCDNGhkAhni25wxy43zjznqXQ9wTCPsM BYMD4pN0eVWK3AkRUTd5XwgpjIhjqtJuhcUiNzJgbRTCbhztRQuyCFK8lWAqD5rGI0qF ZGKz+FyZ2f2nkyaO2A4FAOJnNV5ITiBhhVYFkaHpnuyEtwIUrbWFcxNDxfzjJxbTHHBy en8w== X-Gm-Message-State: APjAAAWaiXSdQYZ1bgfwWWgauwSewquCi/YS9etdZorfIHoqAKoJTnm1 dOYfJAbFoA8xWjcK4nFnt0e3Ng== X-Received: by 2002:a17:90a:de0e:: with SMTP id m14mr20184255pjv.36.1558833007034; Sat, 25 May 2019 18:10:07 -0700 (PDT) Received: from localhost ([12.206.222.5]) by smtp.gmail.com with ESMTPSA id n2sm6014719pgp.27.2019.05.25.18.10.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 May 2019 18:10:06 -0700 (PDT) Date: Sat, 25 May 2019 18:09:24 -0700 Message-Id: <20190526010948.3923-6-palmer@sifive.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190526010948.3923-1-palmer@sifive.com> References: <20190526010948.3923-1-palmer@sifive.com> MIME-Version: 1.0 From: Palmer Dabbelt To: Peter Maydell X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.215.196 Subject: [Qemu-devel] [PULL 05/29] 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: Richard Henderson , Palmer Dabbelt , qemu-riscv@nongnu.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson The generated functions are only used within translate.c and do not need to be global, or declared. Signed-off-by: Richard Henderson Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt --- target/riscv/Makefile.objs | 8 ++++---- target/riscv/translate.c | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) -- 2.21.0 diff --git a/target/riscv/Makefile.objs b/target/riscv/Makefile.objs index 9c6c1093271e..c7a1b063edc2 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 diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 928374242e83..b09158117f32 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -558,7 +558,6 @@ static int ex_rvc_register(DisasContext *ctx, 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" @@ -701,8 +700,6 @@ static bool gen_shift(DisasContext *ctx, arg_r *a, # endif #endif -bool decode_insn16(DisasContext *ctx, uint16_t insn); -/* auto-generated decoder*/ #include "decode_insn16.inc.c" #include "insn_trans/trans_rvc.inc.c"