From nobody Fri May 10 17:18:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1626342881; cv=none; d=zohomail.com; s=zohoarc; b=Od/XPe29kgJdE2PActbvKoLBUpJg2WR/8jHPd8/Cyvb7fdfCwbHlPm0/1ZdO5SIKrvNlFnckFfWZjy6VYut2C8Qtg8ZUyhbhSrL8B/5aVz0Ptw9qseL+oVzfQHX7jC8Wo7/Z9z+NmfEc/vMhWDcJoGCBZ7XPnfdsoYCrKE9xyMA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626342881; h=Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=wFJf/yglS6TdA51aTCmXDBY4DJy7bf3bOZXxC/X4XSA=; b=AxIIDSHEyfy4/2nubLLgr1FqL4j/OqUcdzhgFoRengjUv1SusF9W/bvACWW8VkVwq2WonVc3uO4cEA4cFlVZSUrBi5QVLzVc5tm/4szvuJUSp6FibXBqUtvCV2wIs5NZn3w4CwGfs6OoCBeGt07DPiefo3ycNq9F4+3cRmIjORo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1626342880982755.609886199429; Thu, 15 Jul 2021 02:54:40 -0700 (PDT) Received: from localhost ([::1]:50034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3y4l-000506-7i for importer@patchew.org; Thu, 15 Jul 2021 05:54:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33176) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3y3v-0003zS-Vt for qemu-devel@nongnu.org; Thu, 15 Jul 2021 05:53:47 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:42554) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m3y3t-0004n3-7d for qemu-devel@nongnu.org; Thu, 15 Jul 2021 05:53:47 -0400 Received: by mail-wm1-x331.google.com with SMTP id a23-20020a05600c2257b0290236ec98bebaso768935wmm.1 for ; Thu, 15 Jul 2021 02:53:44 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id b20sm5106241wmj.7.2021.07.15.02.53.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jul 2021 02:53:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=wFJf/yglS6TdA51aTCmXDBY4DJy7bf3bOZXxC/X4XSA=; b=Xi7jdqnfiGroyI4BSGwtYHdcOoG2gw82po7hnnsoTdT+YBACSZ7mBH4Z3QV0Yngx2i 0pRoqqFiQGHsoBarG/HbddhfEw6h8+R7JIsMtpi6++vEQGGWP3kBQrtqjLtydvVjDdxz dVFY6xteFk09UmfyV8RfMIyaPj8TvyQzwfPCqcQxNNm7LVKNvMiTKMV8AmeYhspR+UKG bn2jaZ1b4+QNbW6hXAeLEdehNjYpbogcd5oKdB8VblR4e4k/V/DvHbyMkiFpeBuaI312 IH9V2349/g8T+B6ZMlZ1sXbGfiLJ46ic2/ahEBGjiMVarDsVZ2CbNg9zZCn/GN0i2W0x VPXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=wFJf/yglS6TdA51aTCmXDBY4DJy7bf3bOZXxC/X4XSA=; b=bqwu3pOB+4qduItoqCeWGEPm1D62ZncRNar9EQXQQe023Vhp42kYhXXSHKJg6nll9c XW4gMxNxyMbGJMmj0rmU8aXn0IHLCitajMj3Y7pEoEUeOC22V2CHxri1fYbYgWWe/udr 0u1KGeotjFEyo+4/1j2Vlz2MaTizTcOHW3Vh49F2mj2ofRwnG+tZdVzmuAvU5/5jbytB rUnySwl61y88qxTb+vEEftlBDzqVo9Ngkm0zTXxtDGmlHVRhWMPXEg01ZU86ht4mr7jN ry8/PziYa1dk5O+fuHon6rDAfwyhsN6PD1uyke+/53Rqlo8T99AG5tu6P0FsbPDPVWOV vShQ== X-Gm-Message-State: AOAM532s+8xc/SWP4Swz14fJRI0riGwyukMKXKsDCvWduuSkbx8NGlOh 9ni4hJQS05v7llkXlOn4c2QMYmWDipdXrlyQ X-Google-Smtp-Source: ABdhPJzxrd4lem4/ouZzbhie8fxu9c6fF1mBOMbMhk0iCQgya52WGrrIu3nJrRw0j3ndfJbHNOkh8g== X-Received: by 2002:a1c:9807:: with SMTP id a7mr3505859wme.129.1626342823412; Thu, 15 Jul 2021 02:53:43 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH] target/arm: Remove duplicate 'plus1' function from Neon and SVE decode Date: Thu, 15 Jul 2021 10:53:41 +0100 Message-Id: <20210715095341.701-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x331.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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1626342883399100001 Content-Type: text/plain; charset="utf-8" The Neon and SVE decoders use private 'plus1' functions to implement "add one" for the !function decoder syntax. We have a generic "plus_1" function in translate.h, so use that instead. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/arm/neon-ls.decode | 4 ++-- target/arm/neon-shared.decode | 2 +- target/arm/sve.decode | 2 +- target/arm/translate-neon.c | 5 ----- target/arm/translate-sve.c | 5 ----- 5 files changed, 4 insertions(+), 14 deletions(-) diff --git a/target/arm/neon-ls.decode b/target/arm/neon-ls.decode index 0a2a0e15db5..c5f364cbc00 100644 --- a/target/arm/neon-ls.decode +++ b/target/arm/neon-ls.decode @@ -41,8 +41,8 @@ VLD_all_lanes 1111 0100 1 . 1 0 rn:4 .... 11 n:2 size:2 = t:1 a:1 rm:4 \ vd=3D%vd_dp =20 # Neon load/store single structure to one lane -%imm1_5_p1 5:1 !function=3Dplus1 -%imm1_6_p1 6:1 !function=3Dplus1 +%imm1_5_p1 5:1 !function=3Dplus_1 +%imm1_6_p1 6:1 !function=3Dplus_1 =20 VLDST_single 1111 0100 1 . l:1 0 rn:4 .... 00 n:2 reg_idx:3 align:1 rm:4= \ vd=3D%vd_dp size=3D0 stride=3D1 diff --git a/target/arm/neon-shared.decode b/target/arm/neon-shared.decode index df80e6ebf66..8e6bd0b61f0 100644 --- a/target/arm/neon-shared.decode +++ b/target/arm/neon-shared.decode @@ -38,7 +38,7 @@ # which is 0 for fp16 and 1 for fp32 into a MO_* constant. # (Note that this is the reverse of the sense of the 1-bit size # field in the 3same_fp Neon insns.) -%vcadd_size 20:1 !function=3Dplus1 +%vcadd_size 20:1 !function=3Dplus_1 =20 VCMLA 1111 110 rot:2 . 1 . .... .... 1000 . q:1 . 0 .... \ vm=3D%vm_dp vn=3D%vn_dp vd=3D%vd_dp size=3D%vcadd_size diff --git a/target/arm/sve.decode b/target/arm/sve.decode index a62c169f1a8..c60b9f0fec5 100644 --- a/target/arm/sve.decode +++ b/target/arm/sve.decode @@ -22,7 +22,7 @@ ########################################################################### # Named fields. These are primarily for disjoint fields. =20 -%imm4_16_p1 16:4 !function=3Dplus1 +%imm4_16_p1 16:4 !function=3Dplus_1 %imm6_22_5 22:1 5:5 %imm7_22_16 22:2 16:5 %imm8_16_10 16:5 10:3 diff --git a/target/arm/translate-neon.c b/target/arm/translate-neon.c index a45616cb631..c53ab20fa48 100644 --- a/target/arm/translate-neon.c +++ b/target/arm/translate-neon.c @@ -28,11 +28,6 @@ #include "translate.h" #include "translate-a32.h" =20 -static inline int plus1(DisasContext *s, int x) -{ - return x + 1; -} - static inline int neon_3same_fp_size(DisasContext *s, int x) { /* Convert 0=3D=3Dfp32, 1=3D=3Dfp16 into a MO_* value */ diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 35d838aa068..bc91a641711 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -70,11 +70,6 @@ static int tszimm_shl(DisasContext *s, int x) return x - (8 << tszimm_esz(s, x)); } =20 -static inline int plus1(DisasContext *s, int x) -{ - return x + 1; -} - /* The SH bit is in bit 8. Extract the low 8 and shift. */ static inline int expand_imm_sh8s(DisasContext *s, int x) { --=20 2.20.1