From patchwork Fri May 27 18:18:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 576592 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:8607:0:0:0:0 with SMTP id bb7csp915804mab; Fri, 27 May 2022 12:21:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyg9WIXoMovVflZTRiACExvC1tnBhGJFHbPuW370WBT+AKIeULd3VANshgp1Y7MIRD1Q5oy X-Received: by 2002:a05:6214:20e6:b0:45d:403f:7a90 with SMTP id 6-20020a05621420e600b0045d403f7a90mr36072945qvk.1.1653679317332; Fri, 27 May 2022 12:21:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653679317; cv=none; d=google.com; s=arc-20160816; b=LX1thdeD1hfF8J2GIdegzrToteuzieQJ8GXx0RRPw8EijJm9DFI+LXCPiHdepsMFbf tgVst0A4mKVPJ9OHi3Z4T707CfSx6/z03c+k6A9A/zvgMWxdyelFDwmEUz0i9SNI6Ca7 QVuOtNgr4JTyLCmSGeX50S91Trb2AEhzXv0IAPBHRHTqS2nRtwbVO5aRR15cqal7NxS5 6UMQ4RUODr0oycDwgWGkNGqKAqwNHnQJdDqZZQlM+k11w+p/x8j6K/7Xzq5KL8S1onId dbL2J1I4DlVfQB1+MZPRtowxMnCngQJor4wFrIW0StR7R7mWAKijo1ZSQpwZaL77P4I+ spGQ== 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=/89+mpU4GVs0pAHMXaIe+xUvrTlp6qO+k1ForQR6iFY=; b=pH6GgjRQuoRluEVii5DTZw7tSypiVlsBh1RPeQuBEmCG8kMnrwsFNTM0ZzGfkJaPN8 4Z7IvyHijXgpGDo4c6JNrQlEo+W7Gnt3I8brmzf4ifJQxxG2zc7SslknmLGKe1aoiriw KvOs5+DIVGGtSHU3bGuM423Op8Y39GC1n7uwRYPSwNbvlqQcbent2KqjV5Kc5USn6RP0 /V/TlIUn4LL5OZKVh+J/Uz1QGliyXz3UfMC/kTHhy4zqJffOXo2YqnzgOpxzN5/vd1m7 8jDYb9gasXHGIJw4NSCl1OqhEOriy6y1Gu3wcv3S6eXSHdyv3FJB6Au7E2zrAIQcMdCe Qwdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="T/KzQvze"; 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 g11-20020ac87f4b000000b002f937a4c98csi3340793qtk.667.2022.05.27.12.21.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 May 2022 12:21:57 -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=pass header.i=@linaro.org header.s=google header.b="T/KzQvze"; 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]:43974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nufX2-0002lS-SN for patch@linaro.org; Fri, 27 May 2022 15:21:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuec2-0003Il-8d for qemu-devel@nongnu.org; Fri, 27 May 2022 14:23:04 -0400 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]:43768) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nuebx-0004Lx-Vn for qemu-devel@nongnu.org; Fri, 27 May 2022 14:23:01 -0400 Received: by mail-pj1-x1036.google.com with SMTP id l7-20020a17090aaa8700b001dd1a5b9965so5035415pjq.2 for ; Fri, 27 May 2022 11:22:56 -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 :mime-version:content-transfer-encoding; bh=/89+mpU4GVs0pAHMXaIe+xUvrTlp6qO+k1ForQR6iFY=; b=T/KzQvzeeiv5S+St32XWG440N5ZbSvA/fulvgdAu4n6VE019khhYrh4TOdl/Dmr1lM +7grzdEeZhk3btWcc9PNgekVBTK/DQWDXYXLLE6EdcZwKRDmvj7RyEe/4FpB9+XZ9v+D hgnKZlDsO/rlQdz/1q6V71HThphiGbAFxa7GEvOg3bTPiFh1Twn48BdvpEKpoxBSRaZ6 EvRF6nkVHU799dCMeL21q3wQNesStJZuMcX2rnqLBV3uayTfNj+FlRWNZKnfa1xfkg23 mrzfZrFoDw173n5g0P49iGr4XNjCl/l1KxTaFtAWvoS9nADEXrf4FUWTVJ6lvFu5gYgR 8CDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/89+mpU4GVs0pAHMXaIe+xUvrTlp6qO+k1ForQR6iFY=; b=wvVBh2XWrty+I1WdDU9VpFuhx4grS7u60Mz1cn58BDoTlqGdRvZ5rWHPfIytmQYrtZ IqJ25iRi/55mFXAV+OJM4ZZvwCPxsBFwKmi2V9EcHEooEEv4LTTpkUFFefycE6ajRSmm OOApoWQhEx5onnM9BZB0QVgbeX9FMOUjYLIuP3G7yLoOxzv/Eu2OAM+KNr9tQjyq1HL9 bCFsEyxZm7IC5bS189uRCOLTiDmPWnhaBbHLVBvKpdhUZs1AWHMjLPUR6UAsMB1K2CLh HHKFJH7THuLLKZClwzAHxxbL4/Vb4BkRSbN69W0bUSMIhppJPTlzzj6h54mEm4EWg3b6 YfZg== X-Gm-Message-State: AOAM532gz4Sgm3I1FxZO3e4hARpUt73NadjJZ0SkZAgQWo2ZsiQToh8K lfnykgQbvjEpBVzWlAazLfSEYUPLKcW+tg== X-Received: by 2002:a17:90b:4ac1:b0:1df:c71d:510c with SMTP id mh1-20020a17090b4ac100b001dfc71d510cmr9505777pjb.118.1653675775994; Fri, 27 May 2022 11:22:55 -0700 (PDT) Received: from stoup.. (174-21-71-225.tukw.qwest.net. [174.21.71.225]) by smtp.gmail.com with ESMTPSA id b15-20020a170903228f00b00163552a0953sm4033534plh.159.2022.05.27.11.22.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 May 2022 11:22:55 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 051/114] target/arm: Use TRANS_FEAT for do_predset Date: Fri, 27 May 2022 11:18:04 -0700 Message-Id: <20220527181907.189259-52-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220527181907.189259-1-richard.henderson@linaro.org> References: <20220527181907.189259-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1036.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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" Signed-off-by: Richard Henderson --- target/arm/translate-sve.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index c8eb2c684b..ce6e000f6f 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -1616,22 +1616,13 @@ static bool do_predset(DisasContext *s, int esz, int rd, int pat, bool setflag) return true; } -static bool trans_PTRUE(DisasContext *s, arg_PTRUE *a) -{ - return do_predset(s, a->esz, a->rd, a->pat, a->s); -} +TRANS_FEAT(PTRUE, aa64_sve, do_predset, a->esz, a->rd, a->pat, a->s) -static bool trans_SETFFR(DisasContext *s, arg_SETFFR *a) -{ - /* Note pat == 31 is #all, to set all elements. */ - return do_predset(s, 0, FFR_PRED_NUM, 31, false); -} +/* Note pat == 31 is #all, to set all elements. */ +TRANS_FEAT(SETFFR, aa64_sve, do_predset, 0, FFR_PRED_NUM, 31, false) -static bool trans_PFALSE(DisasContext *s, arg_PFALSE *a) -{ - /* Note pat == 32 is #unimp, to set no elements. */ - return do_predset(s, 0, a->rd, 32, false); -} +/* Note pat == 32 is #unimp, to set no elements. */ +TRANS_FEAT(PFALSE, aa64_sve, do_predset, 0, a->rd, 32, false) static bool trans_RDFFR_p(DisasContext *s, arg_RDFFR_p *a) {