From patchwork Tue Apr 26 16:30:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566040 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3765479map; Tue, 26 Apr 2022 09:53:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRjvrw++DPoRNpgO1soWLgv62vCAgFUl3wheNj25fA7Jcopo+pCvNJNuiHfeTQYPHeTWGU X-Received: by 2002:a05:6902:8b:b0:644:fa97:b5d with SMTP id h11-20020a056902008b00b00644fa970b5dmr22151060ybs.223.1650991993272; Tue, 26 Apr 2022 09:53:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650991993; cv=none; d=google.com; s=arc-20160816; b=pUzv2sEa530FJMybaBe2nT5fARue7YxuVl8yqRqzr5Le7R9ZXu8q5Cpd9CUCMeHFmb ZmZLnriw62/NHy/OlVavMN4vekHN/m6Mr9QKrnqcGprwKI94mB56CC0whGxA1l2X2ITt O0fUsd94Tu7wN7WGzQ6YnCdBonGTqZ7a4+GSYkrZGjH3tbZvrP9wfqu6GHXpe6Y3bo7g SrY0HGvX9XEQd7bkFnBc3JWUD6IGEBdEKt44mVbs7MmHX9dHCKgOZ3j+f9W0n9KvwrR/ iaxa2sTnuWZeSHuzlnwA0UipmkrhE4aTpZei9VeSqZSFX6vYDJr66cqyPzcfAKVe3fA/ HVeg== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Wz/sQ3opM+63UBKCObMqywBPZke4KVXsahzdcx00DUk=; b=pTUstQegmo6S5Vuiu1R31B9w/lr8b9PxhEazxwnfGlAWdsZDDvuhhJFYUvlSpTxo/t GH8Hs2BqQHj/kyZF5UillKeHouFlbObSVX5FT6Cjp5id9iagw9WbTwIevUrakXpCoWBh tvZS0+bwLUUljVvDrfmP3BSzVlyBgXSqm2By1K1dQ+jz2lW4zBwuun01ZQeKDX3VVsiC EgGLuBI0VcGh5K3zxg2H7VRwF6DCzSTY6fjfJeBb+TbQiE9KbiUCWkk9YjSXXi/ZOW/K ykOChfy2JVD+JblYJtqbzx2W6YfStwf/Lxe/x836WA4ecZQj9GTQgEJtke5nlaKxh8Wk 4VTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y9lEghH8; 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 62-20020a251641000000b00633994044cfsi14010575ybw.313.2022.04.26.09.53.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:53:13 -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=Y9lEghH8; 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]:32922 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOR6-00057F-NE for patch@linaro.org; Tue, 26 Apr 2022 12:53:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45708) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5t-00035a-6Z for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:21 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]:43007) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5m-0003sx-RF for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:15 -0400 Received: by mail-pf1-x42c.google.com with SMTP id j17so18443072pfi.9 for ; Tue, 26 Apr 2022 09:31:09 -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=Wz/sQ3opM+63UBKCObMqywBPZke4KVXsahzdcx00DUk=; b=Y9lEghH8yifuMykg/i4TZSaD8tQWOqq6PSAVXLaLfaqfjKmhaQMlTdmzTbxv5nwEao nl3s40rkL2hZFJSPu+ji5EtzMb7cUfxkvTAXRm8io02wnNOdGYn/XBQG0ja22Wr5oJQu blqprpnz3g8A4aImSWl+3QyAg2ic/yErkmZUK8PmoOpwXk0kVc8E2Qg8kwr3ZEbtmtoN 2EbScE0ZttHOPaDS8/ztLumLkjLa+8ET5dF56v6QGPm+fPSrky+NsRH1TwHNjL4pU/Mm YygR1MeiA8gDhcerzbNE+Oa9NkpizT89Zxw3ZxASMUD9UAc040HtI4Z5ILIDINvrI13p 5PQg== 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=Wz/sQ3opM+63UBKCObMqywBPZke4KVXsahzdcx00DUk=; b=R2FIl95QYxfViFJ/+OKHWgU1aUfkW/zZhL0HVeARUsH09hrvPGo4c6jNcZpGwPR81N faqFNLEtD6reVYImVGFTRImluBL3tOjkcNTrWkXAOm5vI2b5O3jpoj8umvmFXj9pjaNk 3UkMRZTb8tmLnCyGaro0HMr6GcL8kRXWDCuWyxNFpAlUAhFL/7GVr4ITVaI/lZyJ4ToV 5Cy8sh6bQ51kO6U8DN5cacekLA6sJtkaz8gC9FyBqW1Re51Df04efRw6e8ZfNQ605hvM iNX68YOTBL1UFTddZUE6F4PEKg8QSZbsubQovSHgHdus3E4j6cwbc9gH2jQOgQjDZ+NX F1hA== X-Gm-Message-State: AOAM530xqvSs6IZwKqCm3kRsuF03+oibFOHU83sRW++g3tiCF4pLapYa cYJ8sPW5VTbISb7qc6zPFDwmMLn1T0kE9g== X-Received: by 2002:a63:cf0c:0:b0:380:fb66:fa2a with SMTP id j12-20020a63cf0c000000b00380fb66fa2amr20486873pgg.273.1650990668680; Tue, 26 Apr 2022 09:31:08 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 25/47] target/arm: Use tcg_constant for vector shift expanders Date: Tue, 26 Apr 2022 09:30:21 -0700 Message-Id: <20220426163043.100432-26-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 2e4165be3d..9539d2e8ca 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -2996,9 +2996,8 @@ void gen_gvec_sqrdmlsh_qc(unsigned vece, uint32_t rd_ofs, uint32_t rn_ofs, } \ static void gen_##NAME##0_vec(unsigned vece, TCGv_vec d, TCGv_vec a) \ { \ - TCGv_vec zero = tcg_const_zeros_vec_matching(d); \ + TCGv_vec zero = tcg_constant_vec_matching(d, vece, 0); \ tcg_gen_cmp_vec(COND, vece, d, a, zero); \ - tcg_temp_free_vec(zero); \ } \ void gen_gvec_##NAME##0(unsigned vece, uint32_t d, uint32_t m, \ uint32_t opr_sz, uint32_t max_sz) \ @@ -3988,8 +3987,8 @@ void gen_ushl_i32(TCGv_i32 dst, TCGv_i32 src, TCGv_i32 shift) TCGv_i32 rval = tcg_temp_new_i32(); TCGv_i32 lsh = tcg_temp_new_i32(); TCGv_i32 rsh = tcg_temp_new_i32(); - TCGv_i32 zero = tcg_const_i32(0); - TCGv_i32 max = tcg_const_i32(32); + TCGv_i32 zero = tcg_constant_i32(0); + TCGv_i32 max = tcg_constant_i32(32); /* * Rely on the TCG guarantee that out of range shifts produce @@ -4007,8 +4006,6 @@ void gen_ushl_i32(TCGv_i32 dst, TCGv_i32 src, TCGv_i32 shift) tcg_temp_free_i32(rval); tcg_temp_free_i32(lsh); tcg_temp_free_i32(rsh); - tcg_temp_free_i32(zero); - tcg_temp_free_i32(max); } void gen_ushl_i64(TCGv_i64 dst, TCGv_i64 src, TCGv_i64 shift) @@ -4017,8 +4014,8 @@ void gen_ushl_i64(TCGv_i64 dst, TCGv_i64 src, TCGv_i64 shift) TCGv_i64 rval = tcg_temp_new_i64(); TCGv_i64 lsh = tcg_temp_new_i64(); TCGv_i64 rsh = tcg_temp_new_i64(); - TCGv_i64 zero = tcg_const_i64(0); - TCGv_i64 max = tcg_const_i64(64); + TCGv_i64 zero = tcg_constant_i64(0); + TCGv_i64 max = tcg_constant_i64(64); /* * Rely on the TCG guarantee that out of range shifts produce @@ -4036,8 +4033,6 @@ void gen_ushl_i64(TCGv_i64 dst, TCGv_i64 src, TCGv_i64 shift) tcg_temp_free_i64(rval); tcg_temp_free_i64(lsh); tcg_temp_free_i64(rsh); - tcg_temp_free_i64(zero); - tcg_temp_free_i64(max); } static void gen_ushl_vec(unsigned vece, TCGv_vec dst, @@ -4132,8 +4127,8 @@ void gen_sshl_i32(TCGv_i32 dst, TCGv_i32 src, TCGv_i32 shift) TCGv_i32 rval = tcg_temp_new_i32(); TCGv_i32 lsh = tcg_temp_new_i32(); TCGv_i32 rsh = tcg_temp_new_i32(); - TCGv_i32 zero = tcg_const_i32(0); - TCGv_i32 max = tcg_const_i32(31); + TCGv_i32 zero = tcg_constant_i32(0); + TCGv_i32 max = tcg_constant_i32(31); /* * Rely on the TCG guarantee that out of range shifts produce @@ -4152,8 +4147,6 @@ void gen_sshl_i32(TCGv_i32 dst, TCGv_i32 src, TCGv_i32 shift) tcg_temp_free_i32(rval); tcg_temp_free_i32(lsh); tcg_temp_free_i32(rsh); - tcg_temp_free_i32(zero); - tcg_temp_free_i32(max); } void gen_sshl_i64(TCGv_i64 dst, TCGv_i64 src, TCGv_i64 shift) @@ -4162,8 +4155,8 @@ void gen_sshl_i64(TCGv_i64 dst, TCGv_i64 src, TCGv_i64 shift) TCGv_i64 rval = tcg_temp_new_i64(); TCGv_i64 lsh = tcg_temp_new_i64(); TCGv_i64 rsh = tcg_temp_new_i64(); - TCGv_i64 zero = tcg_const_i64(0); - TCGv_i64 max = tcg_const_i64(63); + TCGv_i64 zero = tcg_constant_i64(0); + TCGv_i64 max = tcg_constant_i64(63); /* * Rely on the TCG guarantee that out of range shifts produce @@ -4182,8 +4175,6 @@ void gen_sshl_i64(TCGv_i64 dst, TCGv_i64 src, TCGv_i64 shift) tcg_temp_free_i64(rval); tcg_temp_free_i64(lsh); tcg_temp_free_i64(rsh); - tcg_temp_free_i64(zero); - tcg_temp_free_i64(max); } static void gen_sshl_vec(unsigned vece, TCGv_vec dst,