From patchwork Mon Feb 27 05:41:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 656911 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2229805wrb; Mon, 27 Feb 2023 00:18:33 -0800 (PST) X-Google-Smtp-Source: AK7set9IMLexYnfsaIWfDdwJZYPFExA0XwAWUOBJXzG7rnirbtCd2O5VMgt+LtCC7PtOiL3Y41wk X-Received: by 2002:ac8:5fd0:0:b0:3bf:c29b:678b with SMTP id k16-20020ac85fd0000000b003bfc29b678bmr15748445qta.50.1677485913502; Mon, 27 Feb 2023 00:18:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677485913; cv=none; d=google.com; s=arc-20160816; b=CCc5j3iDWPmQmcLo4Qi4ZcxV5/06xaZFTbiyOez5x8NJeOxupagcMfi3a4wW090/yM OERH7s9T5xL81dOJP4zJdDPIIyGfzhzs+v1tnUY/jAfnnzIQXtf9uFMg5N2Ao916FYQq 4ILo0nrGdloNfL4Apv378eJsuHOJWDep4urz0IUA8XZ3PXBgnrXeti+3y7bq8AZrKoeU TdUZQ5tQx9/gWf+0QmslfhYpCR1tKwoRA5YZBpZHhwvq2KLgeqFyu3p3c5HDRZx+kgzC iR7z18cv8mx2sC1qdHGcL1w3K75fTrj+WIKx0lZgH4g5h4dhQHmZyk5vtJmyLJFt414e O8XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ayfqorD9uX7/Vi+5yV/fsV6QKxxs5QiH623wECf/tb4=; b=Qq/rz9DUCrWx5mmzCEcj0/Wm/8dE7ulBJU6HhA7b8VRu7o92VNPmT9e15D5Gaa/kqo VyO9DeTf/VzFR2i9q/JcA3WnybUTUSpV9Xpn/IzAwy+2sC/x4DjOFPX9avNcPkPha/i9 WYLWehG5uBRPrMEi3TZPl5nC/TePPhlX/ywTQpqWcmbTVfViDpFckJSKBHPtKLPkz/g1 nUh20aYs4QxD6L5iMCbuihiEnzn+g3QYHtatb7ty2/l+0q3F1EReQUlY/R7KDFtVLrnC Dp6uBlNDFV0FQiXvMohnUvtLUzHVK0bf1XkVJxmx7iOwo0nGiLevvadZfuiGFyOT/mK2 JMDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dVxpBUlM; 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=pass (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 n8-20020a05622a11c800b003b9bfdf0cc9si6319321qtk.389.2023.02.27.00.18.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 00:18:33 -0800 (PST) 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=pass header.i=@linaro.org header.s=google header.b=dVxpBUlM; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWIf-0004w5-T0; Mon, 27 Feb 2023 00:43:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWWIM-0004LZ-Gv for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:43:30 -0500 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWIK-000504-Ih for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:43:30 -0500 Received: by mail-pg1-x535.google.com with SMTP id p6so2883157pga.0 for ; Sun, 26 Feb 2023 21:43:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ayfqorD9uX7/Vi+5yV/fsV6QKxxs5QiH623wECf/tb4=; b=dVxpBUlM768pnD18AqVBmiwPTby3CHGQ7bD6WZ9QbnuRlNs1V+WfpQHcEYNtGBBAoM XoF6lRZ0qQgrjyowHaAM5oO1OEb4/4UA5Fnf4EkEoJ0LwIDSa0kzz5nHGQ9VRrCxgByd gtgcAABUlf+XZvvSzyrOa2xX3Og6evcgTx50F+eqHL97b6jtG70d/lj76wXepkO19FWP P49nKe2+9tFNJffo56BEn4krwxlyMh+cI5WLJaoBCUTNpx+IO5Uk0gPGH0M1Ntl/lxgm gTi/yObaJG5w5oMErv431mh1/8jIZ51xNYGDLnESLdv0PzBRgMWzyUD2LWoLGQPD9zQQ SOMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ayfqorD9uX7/Vi+5yV/fsV6QKxxs5QiH623wECf/tb4=; b=oP0fL24p8AcKigCbdnuHEkCL21wnT+TIQy/KZ+wkHG6XKO7y6wC2CSLErgd3atYYgr N28MLItM9jZHpp9/KQ9WsRuyXonb9ZENyKpYc4iXM+1lEP2TigJKb64xaH248saaGKGs 5vasKfYOq4ixhetgSpYCLDV+lJpiCeOdQwU9+A+Wqs5jaOhaMtSpjlF/LCMeYhr/Nd2H XB37jXtVE9/waaecvtDcvlGXr5kP4qnO2x1IbpsCGllEnC1OH3wjkojsVYc23XX0SgcU TFIvRazySsrKkp37IVhORCxq4qOXBfoVuL5ld2O2plzs1IkK8lC+pVTSS6ghJuPqydJO 3gHg== X-Gm-Message-State: AO0yUKU/+1pD9ISWip3L+gA32NYZ9UtNiTCkC6vdUGUrqVjmkpRx59Rj 8bOmPeMF3DD4MRv0iYBNmJLoqlZ95fJiYe+XAME= X-Received: by 2002:a62:17ce:0:b0:5a8:abd2:2beb with SMTP id 197-20020a6217ce000000b005a8abd22bebmr19633529pfx.30.1677476607602; Sun, 26 Feb 2023 21:43:27 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id d10-20020aa7868a000000b005cdc64a287dsm3317137pfo.115.2023.02.26.21.43.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:43:27 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com Subject: [PATCH 16/70] target/hexagon/idef-parser: Use gen_tmp for LPCFG Date: Sun, 26 Feb 2023 19:41:39 -1000 Message-Id: <20230227054233.390271-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227054233.390271-1-richard.henderson@linaro.org> References: <20230227054233.390271-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::535; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x535.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The GET_USR_FIELD macro initializes the output, so the initial assignment of zero is discarded. This is the only use of get_tmp_value outside of parser-helper.c, so make it static. Signed-off-by: Richard Henderson Reviewed-by: Taylor Simpson --- target/hexagon/idef-parser/parser-helpers.h | 6 ------ target/hexagon/idef-parser/parser-helpers.c | 2 +- target/hexagon/idef-parser/idef-parser.y | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/target/hexagon/idef-parser/parser-helpers.h b/target/hexagon/idef-parser/parser-helpers.h index 4c89498f5b..1239d23a6a 100644 --- a/target/hexagon/idef-parser/parser-helpers.h +++ b/target/hexagon/idef-parser/parser-helpers.h @@ -154,12 +154,6 @@ HexValue gen_tmp(Context *c, unsigned bit_width, HexSignedness signedness); -HexValue gen_tmp_value(Context *c, - YYLTYPE *locp, - const char *value, - unsigned bit_width, - HexSignedness signedness); - HexValue gen_imm_value(Context *c __attribute__((unused)), YYLTYPE *locp, int value, diff --git a/target/hexagon/idef-parser/parser-helpers.c b/target/hexagon/idef-parser/parser-helpers.c index 6fb5f31cf7..be979dac86 100644 --- a/target/hexagon/idef-parser/parser-helpers.c +++ b/target/hexagon/idef-parser/parser-helpers.c @@ -305,7 +305,7 @@ HexValue gen_tmp(Context *c, return rvalue; } -HexValue gen_tmp_value(Context *c, +static HexValue gen_tmp_value(Context *c, YYLTYPE *locp, const char *value, unsigned bit_width, diff --git a/target/hexagon/idef-parser/idef-parser.y b/target/hexagon/idef-parser/idef-parser.y index fae291e5f8..c784726d41 100644 --- a/target/hexagon/idef-parser/idef-parser.y +++ b/target/hexagon/idef-parser/idef-parser.y @@ -783,7 +783,7 @@ rvalue : FAIL } | LPCFG { - $$ = gen_tmp_value(c, &@1, "0", 32, UNSIGNED); + $$ = gen_tmp(c, &@1, 32, UNSIGNED); OUT(c, &@1, "GET_USR_FIELD(USR_LPCFG, ", &$$, ");\n"); } | EXTRACT '(' rvalue ',' rvalue ')'