From nobody Tue Feb 10 13:34:10 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1588962573; cv=none; d=zohomail.com; s=zohoarc; b=LyULzwU9orqvIQG59yj+8EwBl4UNSESCxCfs6uwzSMhleA595VON1t23oQivnOkupKqV1a4bZtTh5vpvHIXlQLfWEvwDI2wPOCDMpqmWUVlAS2BqfCbZF03sXDcwXq35amF7yQlHhdQgi+Zr+rj/qHS/9y2ZoTB0SDZL4Zv3GrE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588962573; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xmadSpOQwsQc/jlcXZb4SKOmMYrqNW8ASv1JO/0wGNg=; b=YUHu82RYyEcptCed//czdEDn630FIFxQrLFRQHZP3qNPDPE8GkNr3GkwmbietYJSwNzFyWDjDjQS1qRWIs9lNOCACm8P6yivaPr3EXia2CStvFus8FHg234YsEsqqyBVvyfP40f1mKUB3yqom9ABozjtXKTWk7bQFmk2n0es5do= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588962573528775.0571474998048; Fri, 8 May 2020 11:29:33 -0700 (PDT) Received: from localhost ([::1]:52514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jX7ka-0003R7-1X for importer@patchew.org; Fri, 08 May 2020 14:29:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jX7hf-0006py-Fb for qemu-devel@nongnu.org; Fri, 08 May 2020 14:26:31 -0400 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]:54673) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jX7hd-0006Jt-O9 for qemu-devel@nongnu.org; Fri, 08 May 2020 14:26:31 -0400 Received: by mail-pj1-x1042.google.com with SMTP id y6so4678005pjc.4 for ; Fri, 08 May 2020 11:26:29 -0700 (PDT) Received: from localhost.localdomain (174-21-149-226.tukw.qwest.net. [174.21.149.226]) by smtp.gmail.com with ESMTPSA id u9sm2421775pfn.197.2020.05.08.11.26.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 11:26:26 -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=xmadSpOQwsQc/jlcXZb4SKOmMYrqNW8ASv1JO/0wGNg=; b=tYuUW3noapmBsjf9Wk0HHaIHWWfTxMAUtFJqikZiu/8nqfOashyFzq8tJjElf55zsX MDMgsCLzgQlKST4xgfBdEX5HyY8udTR0likL1fcEOIBtomUnnU20gQLCCJ8gdCSrmhb1 WAH+G7jx0LwhqESjmjk5dUNYloME/m2UzAvjWCRjO7ZdgRFQWquJtG0VJnWsAfqEruW/ O/kstVkIPLFyLtlUfyUgZ4gC1kGtTO+OXPobnz3je9vUYs4MKCRyzQkmN2rtaGryLTho ed9Wceknh0aUIqi3TbRUg63sHqp7ykyzFlRMixacomoCDmCfjHs6Zz6J/klgux02mvPx wMTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xmadSpOQwsQc/jlcXZb4SKOmMYrqNW8ASv1JO/0wGNg=; b=YzdzjhtY1mLYIq/s6Bp6CfT9NUrgGwpGlzDrxkZiaLajj6WRFu+GPuqnifPbGKnMlk mmGrf2ZN6JmLJCom0VJhbxtLrvQ3uQfoCNhuRtI9PqSplDyO7f/UDQVm1K4xIU2UxGio QTuuBENwgeoLY/cwFyp9zvf9LdsuUI4caxg0eIh1EO4JqiAvnaX1+4Cbs4T4W6+7hmz3 e7PJ7rG2GQebLwoj1dHiTogddZYuFMZA4IpLuOdXbnLffCtlXn4vXbm0LfA0thbvnjtH uZ93deg1CXTQMQnoW6zgJBLaLZI4xrPQ29a005JXET2eXnpr/m6HM5KLCmaZUfX8224q Bcfg== X-Gm-Message-State: AGi0Pub+cvHcUR8rT8rHjtVumo80LKUL7RPMjDxzT9dWSLvCqDMdDMNT Bw6ZDQF5GiSmsdG66gLOM7fdtH1V9YA= X-Google-Smtp-Source: APiQypK6gkCs8Hv4mGSTfTwKO8mUhygDuKI8EOwOu30jIeaQmuThjm1YVLe3jBrD4BuX693AyRzdBw== X-Received: by 2002:a17:902:8b84:: with SMTP id ay4mr3692583plb.167.1588962387626; Fri, 08 May 2020 11:26:27 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 07/19] tcg: Use tcg_constant_{i32, i64, vec} with tcg gvec expanders Date: Fri, 8 May 2020 11:26:04 -0700 Message-Id: <20200508182616.18318-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200508182616.18318-1-richard.henderson@linaro.org> References: <20200508182616.18318-1-richard.henderson@linaro.org> 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=2607:f8b0:4864:20::1042; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1042.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: , Cc: alex.bennee@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson --- tcg/tcg-op-gvec.c | 125 +++++++++++++++++++--------------------------- 1 file changed, 50 insertions(+), 75 deletions(-) diff --git a/tcg/tcg-op-gvec.c b/tcg/tcg-op-gvec.c index 3707c0effb..8ecaf4d67e 100644 --- a/tcg/tcg-op-gvec.c +++ b/tcg/tcg-op-gvec.c @@ -96,7 +96,7 @@ void tcg_gen_gvec_2_ool(uint32_t dofs, uint32_t aofs, gen_helper_gvec_2 *fn) { TCGv_ptr a0, a1; - TCGv_i32 desc =3D tcg_const_i32(simd_desc(oprsz, maxsz, data)); + TCGv_i32 desc =3D tcg_constant_i32(simd_desc(oprsz, maxsz, data)); =20 a0 =3D tcg_temp_new_ptr(); a1 =3D tcg_temp_new_ptr(); @@ -108,7 +108,6 @@ void tcg_gen_gvec_2_ool(uint32_t dofs, uint32_t aofs, =20 tcg_temp_free_ptr(a0); tcg_temp_free_ptr(a1); - tcg_temp_free_i32(desc); } =20 /* Generate a call to a gvec-style helper with two vector operands @@ -118,7 +117,7 @@ void tcg_gen_gvec_2i_ool(uint32_t dofs, uint32_t aofs, = TCGv_i64 c, gen_helper_gvec_2i *fn) { TCGv_ptr a0, a1; - TCGv_i32 desc =3D tcg_const_i32(simd_desc(oprsz, maxsz, data)); + TCGv_i32 desc =3D tcg_constant_i32(simd_desc(oprsz, maxsz, data)); =20 a0 =3D tcg_temp_new_ptr(); a1 =3D tcg_temp_new_ptr(); @@ -130,7 +129,6 @@ void tcg_gen_gvec_2i_ool(uint32_t dofs, uint32_t aofs, = TCGv_i64 c, =20 tcg_temp_free_ptr(a0); tcg_temp_free_ptr(a1); - tcg_temp_free_i32(desc); } =20 /* Generate a call to a gvec-style helper with three vector operands. */ @@ -139,7 +137,7 @@ void tcg_gen_gvec_3_ool(uint32_t dofs, uint32_t aofs, u= int32_t bofs, gen_helper_gvec_3 *fn) { TCGv_ptr a0, a1, a2; - TCGv_i32 desc =3D tcg_const_i32(simd_desc(oprsz, maxsz, data)); + TCGv_i32 desc =3D tcg_constant_i32(simd_desc(oprsz, maxsz, data)); =20 a0 =3D tcg_temp_new_ptr(); a1 =3D tcg_temp_new_ptr(); @@ -154,7 +152,6 @@ void tcg_gen_gvec_3_ool(uint32_t dofs, uint32_t aofs, u= int32_t bofs, tcg_temp_free_ptr(a0); tcg_temp_free_ptr(a1); tcg_temp_free_ptr(a2); - tcg_temp_free_i32(desc); } =20 /* Generate a call to a gvec-style helper with four vector operands. */ @@ -163,7 +160,7 @@ void tcg_gen_gvec_4_ool(uint32_t dofs, uint32_t aofs, u= int32_t bofs, int32_t data, gen_helper_gvec_4 *fn) { TCGv_ptr a0, a1, a2, a3; - TCGv_i32 desc =3D tcg_const_i32(simd_desc(oprsz, maxsz, data)); + TCGv_i32 desc =3D tcg_constant_i32(simd_desc(oprsz, maxsz, data)); =20 a0 =3D tcg_temp_new_ptr(); a1 =3D tcg_temp_new_ptr(); @@ -181,7 +178,6 @@ void tcg_gen_gvec_4_ool(uint32_t dofs, uint32_t aofs, u= int32_t bofs, tcg_temp_free_ptr(a1); tcg_temp_free_ptr(a2); tcg_temp_free_ptr(a3); - tcg_temp_free_i32(desc); } =20 /* Generate a call to a gvec-style helper with five vector operands. */ @@ -190,7 +186,7 @@ void tcg_gen_gvec_5_ool(uint32_t dofs, uint32_t aofs, u= int32_t bofs, uint32_t maxsz, int32_t data, gen_helper_gvec_5 *f= n) { TCGv_ptr a0, a1, a2, a3, a4; - TCGv_i32 desc =3D tcg_const_i32(simd_desc(oprsz, maxsz, data)); + TCGv_i32 desc =3D tcg_constant_i32(simd_desc(oprsz, maxsz, data)); =20 a0 =3D tcg_temp_new_ptr(); a1 =3D tcg_temp_new_ptr(); @@ -211,7 +207,6 @@ void tcg_gen_gvec_5_ool(uint32_t dofs, uint32_t aofs, u= int32_t bofs, tcg_temp_free_ptr(a2); tcg_temp_free_ptr(a3); tcg_temp_free_ptr(a4); - tcg_temp_free_i32(desc); } =20 /* Generate a call to a gvec-style helper with three vector operands @@ -221,7 +216,7 @@ void tcg_gen_gvec_2_ptr(uint32_t dofs, uint32_t aofs, int32_t data, gen_helper_gvec_2_ptr *fn) { TCGv_ptr a0, a1; - TCGv_i32 desc =3D tcg_const_i32(simd_desc(oprsz, maxsz, data)); + TCGv_i32 desc =3D tcg_constant_i32(simd_desc(oprsz, maxsz, data)); =20 a0 =3D tcg_temp_new_ptr(); a1 =3D tcg_temp_new_ptr(); @@ -233,7 +228,6 @@ void tcg_gen_gvec_2_ptr(uint32_t dofs, uint32_t aofs, =20 tcg_temp_free_ptr(a0); tcg_temp_free_ptr(a1); - tcg_temp_free_i32(desc); } =20 /* Generate a call to a gvec-style helper with three vector operands @@ -243,7 +237,7 @@ void tcg_gen_gvec_3_ptr(uint32_t dofs, uint32_t aofs, u= int32_t bofs, int32_t data, gen_helper_gvec_3_ptr *fn) { TCGv_ptr a0, a1, a2; - TCGv_i32 desc =3D tcg_const_i32(simd_desc(oprsz, maxsz, data)); + TCGv_i32 desc =3D tcg_constant_i32(simd_desc(oprsz, maxsz, data)); =20 a0 =3D tcg_temp_new_ptr(); a1 =3D tcg_temp_new_ptr(); @@ -258,7 +252,6 @@ void tcg_gen_gvec_3_ptr(uint32_t dofs, uint32_t aofs, u= int32_t bofs, tcg_temp_free_ptr(a0); tcg_temp_free_ptr(a1); tcg_temp_free_ptr(a2); - tcg_temp_free_i32(desc); } =20 /* Generate a call to a gvec-style helper with four vector operands @@ -269,7 +262,7 @@ void tcg_gen_gvec_4_ptr(uint32_t dofs, uint32_t aofs, u= int32_t bofs, gen_helper_gvec_4_ptr *fn) { TCGv_ptr a0, a1, a2, a3; - TCGv_i32 desc =3D tcg_const_i32(simd_desc(oprsz, maxsz, data)); + TCGv_i32 desc =3D tcg_constant_i32(simd_desc(oprsz, maxsz, data)); =20 a0 =3D tcg_temp_new_ptr(); a1 =3D tcg_temp_new_ptr(); @@ -287,7 +280,6 @@ void tcg_gen_gvec_4_ptr(uint32_t dofs, uint32_t aofs, u= int32_t bofs, tcg_temp_free_ptr(a1); tcg_temp_free_ptr(a2); tcg_temp_free_ptr(a3); - tcg_temp_free_i32(desc); } =20 /* Generate a call to a gvec-style helper with five vector operands @@ -298,7 +290,7 @@ void tcg_gen_gvec_5_ptr(uint32_t dofs, uint32_t aofs, u= int32_t bofs, gen_helper_gvec_5_ptr *fn) { TCGv_ptr a0, a1, a2, a3, a4; - TCGv_i32 desc =3D tcg_const_i32(simd_desc(oprsz, maxsz, data)); + TCGv_i32 desc =3D tcg_constant_i32(simd_desc(oprsz, maxsz, data)); =20 a0 =3D tcg_temp_new_ptr(); a1 =3D tcg_temp_new_ptr(); @@ -319,7 +311,6 @@ void tcg_gen_gvec_5_ptr(uint32_t dofs, uint32_t aofs, u= int32_t bofs, tcg_temp_free_ptr(a2); tcg_temp_free_ptr(a3); tcg_temp_free_ptr(a4); - tcg_temp_free_i32(desc); } =20 /* Return true if we want to implement something of OPRSZ bytes @@ -609,16 +600,13 @@ static void do_dup(unsigned vece, uint32_t dofs, uint= 32_t oprsz, /* Otherwise implement out of line. */ t_ptr =3D tcg_temp_new_ptr(); tcg_gen_addi_ptr(t_ptr, cpu_env, dofs); - t_desc =3D tcg_const_i32(simd_desc(oprsz, maxsz, 0)); + t_desc =3D tcg_constant_i32(simd_desc(oprsz, maxsz, 0)); =20 if (vece =3D=3D MO_64) { - if (in_64) { - gen_helper_gvec_dup64(t_ptr, t_desc, in_64); - } else { - t_64 =3D tcg_const_i64(in_c); - gen_helper_gvec_dup64(t_ptr, t_desc, t_64); - tcg_temp_free_i64(t_64); + if (!in_64) { + in_64 =3D tcg_constant_i64(in_c); } + gen_helper_gvec_dup64(t_ptr, t_desc, in_64); } else { typedef void dup_fn(TCGv_ptr, TCGv_i32, TCGv_i32); static dup_fn * const fns[3] =3D { @@ -646,7 +634,6 @@ static void do_dup(unsigned vece, uint32_t dofs, uint32= _t oprsz, } =20 tcg_temp_free_ptr(t_ptr); - tcg_temp_free_i32(t_desc); return; =20 done: @@ -1196,10 +1183,8 @@ void tcg_gen_gvec_2i(uint32_t dofs, uint32_t aofs, u= int32_t oprsz, if (g->fno) { tcg_gen_gvec_2_ool(dofs, aofs, oprsz, maxsz, c, g->fno); } else { - TCGv_i64 tcg_c =3D tcg_const_i64(c); - tcg_gen_gvec_2i_ool(dofs, aofs, tcg_c, oprsz, - maxsz, c, g->fnoi); - tcg_temp_free_i64(tcg_c); + tcg_gen_gvec_2i_ool(dofs, aofs, tcg_constant_i64(c), + oprsz, maxsz, 0, g->fnoi); } oprsz =3D maxsz; } @@ -1647,16 +1632,14 @@ static void gen_addv_mask(TCGv_i64 d, TCGv_i64 a, T= CGv_i64 b, TCGv_i64 m) =20 void tcg_gen_vec_add8_i64(TCGv_i64 d, TCGv_i64 a, TCGv_i64 b) { - TCGv_i64 m =3D tcg_const_i64(dup_const(MO_8, 0x80)); + TCGv_i64 m =3D tcg_constant_i64(dup_const(MO_8, 0x80)); gen_addv_mask(d, a, b, m); - tcg_temp_free_i64(m); } =20 void tcg_gen_vec_add16_i64(TCGv_i64 d, TCGv_i64 a, TCGv_i64 b) { - TCGv_i64 m =3D tcg_const_i64(dup_const(MO_16, 0x8000)); + TCGv_i64 m =3D tcg_constant_i64(dup_const(MO_16, 0x8000)); gen_addv_mask(d, a, b, m); - tcg_temp_free_i64(m); } =20 void tcg_gen_vec_add32_i64(TCGv_i64 d, TCGv_i64 a, TCGv_i64 b) @@ -1740,9 +1723,8 @@ void tcg_gen_gvec_adds(unsigned vece, uint32_t dofs, = uint32_t aofs, void tcg_gen_gvec_addi(unsigned vece, uint32_t dofs, uint32_t aofs, int64_t c, uint32_t oprsz, uint32_t maxsz) { - TCGv_i64 tmp =3D tcg_const_i64(c); + TCGv_i64 tmp =3D tcg_constant_i64(c); tcg_gen_gvec_adds(vece, dofs, aofs, tmp, oprsz, maxsz); - tcg_temp_free_i64(tmp); } =20 static const TCGOpcode vecop_list_sub[] =3D { INDEX_op_sub_vec, 0 }; @@ -1800,16 +1782,14 @@ static void gen_subv_mask(TCGv_i64 d, TCGv_i64 a, T= CGv_i64 b, TCGv_i64 m) =20 void tcg_gen_vec_sub8_i64(TCGv_i64 d, TCGv_i64 a, TCGv_i64 b) { - TCGv_i64 m =3D tcg_const_i64(dup_const(MO_8, 0x80)); + TCGv_i64 m =3D tcg_constant_i64(dup_const(MO_8, 0x80)); gen_subv_mask(d, a, b, m); - tcg_temp_free_i64(m); } =20 void tcg_gen_vec_sub16_i64(TCGv_i64 d, TCGv_i64 a, TCGv_i64 b) { - TCGv_i64 m =3D tcg_const_i64(dup_const(MO_16, 0x8000)); + TCGv_i64 m =3D tcg_constant_i64(dup_const(MO_16, 0x8000)); gen_subv_mask(d, a, b, m); - tcg_temp_free_i64(m); } =20 void tcg_gen_vec_sub32_i64(TCGv_i64 d, TCGv_i64 a, TCGv_i64 b) @@ -1920,9 +1900,8 @@ void tcg_gen_gvec_muls(unsigned vece, uint32_t dofs, = uint32_t aofs, void tcg_gen_gvec_muli(unsigned vece, uint32_t dofs, uint32_t aofs, int64_t c, uint32_t oprsz, uint32_t maxsz) { - TCGv_i64 tmp =3D tcg_const_i64(c); + TCGv_i64 tmp =3D tcg_constant_i64(c); tcg_gen_gvec_muls(vece, dofs, aofs, tmp, oprsz, maxsz); - tcg_temp_free_i64(tmp); } =20 void tcg_gen_gvec_ssadd(unsigned vece, uint32_t dofs, uint32_t aofs, @@ -1979,18 +1958,16 @@ void tcg_gen_gvec_sssub(unsigned vece, uint32_t dof= s, uint32_t aofs, =20 static void tcg_gen_usadd_i32(TCGv_i32 d, TCGv_i32 a, TCGv_i32 b) { - TCGv_i32 max =3D tcg_const_i32(-1); + TCGv_i32 max =3D tcg_constant_i32(-1); tcg_gen_add_i32(d, a, b); tcg_gen_movcond_i32(TCG_COND_LTU, d, d, a, max, d); - tcg_temp_free_i32(max); } =20 static void tcg_gen_usadd_i64(TCGv_i64 d, TCGv_i64 a, TCGv_i64 b) { - TCGv_i64 max =3D tcg_const_i64(-1); + TCGv_i64 max =3D tcg_constant_i64(-1); tcg_gen_add_i64(d, a, b); tcg_gen_movcond_i64(TCG_COND_LTU, d, d, a, max, d); - tcg_temp_free_i64(max); } =20 void tcg_gen_gvec_usadd(unsigned vece, uint32_t dofs, uint32_t aofs, @@ -2023,18 +2000,16 @@ void tcg_gen_gvec_usadd(unsigned vece, uint32_t dof= s, uint32_t aofs, =20 static void tcg_gen_ussub_i32(TCGv_i32 d, TCGv_i32 a, TCGv_i32 b) { - TCGv_i32 min =3D tcg_const_i32(0); + TCGv_i32 min =3D tcg_constant_i32(0); tcg_gen_sub_i32(d, a, b); tcg_gen_movcond_i32(TCG_COND_LTU, d, a, b, min, d); - tcg_temp_free_i32(min); } =20 static void tcg_gen_ussub_i64(TCGv_i64 d, TCGv_i64 a, TCGv_i64 b) { - TCGv_i64 min =3D tcg_const_i64(0); + TCGv_i64 min =3D tcg_constant_i64(0); tcg_gen_sub_i64(d, a, b); tcg_gen_movcond_i64(TCG_COND_LTU, d, a, b, min, d); - tcg_temp_free_i64(min); } =20 void tcg_gen_gvec_ussub(unsigned vece, uint32_t dofs, uint32_t aofs, @@ -2195,16 +2170,14 @@ static void gen_negv_mask(TCGv_i64 d, TCGv_i64 b, T= CGv_i64 m) =20 void tcg_gen_vec_neg8_i64(TCGv_i64 d, TCGv_i64 b) { - TCGv_i64 m =3D tcg_const_i64(dup_const(MO_8, 0x80)); + TCGv_i64 m =3D tcg_constant_i64(dup_const(MO_8, 0x80)); gen_negv_mask(d, b, m); - tcg_temp_free_i64(m); } =20 void tcg_gen_vec_neg16_i64(TCGv_i64 d, TCGv_i64 b) { - TCGv_i64 m =3D tcg_const_i64(dup_const(MO_16, 0x8000)); + TCGv_i64 m =3D tcg_constant_i64(dup_const(MO_16, 0x8000)); gen_negv_mask(d, b, m); - tcg_temp_free_i64(m); } =20 void tcg_gen_vec_neg32_i64(TCGv_i64 d, TCGv_i64 b) @@ -2472,9 +2445,8 @@ void tcg_gen_gvec_ands(unsigned vece, uint32_t dofs, = uint32_t aofs, void tcg_gen_gvec_andi(unsigned vece, uint32_t dofs, uint32_t aofs, int64_t c, uint32_t oprsz, uint32_t maxsz) { - TCGv_i64 tmp =3D tcg_const_i64(dup_const(vece, c)); + TCGv_i64 tmp =3D tcg_constant_i64(dup_const(vece, c)); tcg_gen_gvec_2s(dofs, aofs, oprsz, maxsz, tmp, &gop_ands); - tcg_temp_free_i64(tmp); } =20 static const GVecGen2s gop_xors =3D { @@ -2497,9 +2469,8 @@ void tcg_gen_gvec_xors(unsigned vece, uint32_t dofs, = uint32_t aofs, void tcg_gen_gvec_xori(unsigned vece, uint32_t dofs, uint32_t aofs, int64_t c, uint32_t oprsz, uint32_t maxsz) { - TCGv_i64 tmp =3D tcg_const_i64(dup_const(vece, c)); + TCGv_i64 tmp =3D tcg_constant_i64(dup_const(vece, c)); tcg_gen_gvec_2s(dofs, aofs, oprsz, maxsz, tmp, &gop_xors); - tcg_temp_free_i64(tmp); } =20 static const GVecGen2s gop_ors =3D { @@ -2522,9 +2493,8 @@ void tcg_gen_gvec_ors(unsigned vece, uint32_t dofs, u= int32_t aofs, void tcg_gen_gvec_ori(unsigned vece, uint32_t dofs, uint32_t aofs, int64_t c, uint32_t oprsz, uint32_t maxsz) { - TCGv_i64 tmp =3D tcg_const_i64(dup_const(vece, c)); + TCGv_i64 tmp =3D tcg_constant_i64(dup_const(vece, c)); tcg_gen_gvec_2s(dofs, aofs, oprsz, maxsz, tmp, &gop_ors); - tcg_temp_free_i64(tmp); } =20 void tcg_gen_vec_shl8i_i64(TCGv_i64 d, TCGv_i64 a, int64_t c) @@ -3011,10 +2981,11 @@ void tcg_gen_gvec_rotls(unsigned vece, uint32_t dof= s, uint32_t aofs, static void tcg_gen_shlv_mod_vec(unsigned vece, TCGv_vec d, TCGv_vec a, TCGv_vec b) { - TCGv_vec t =3D tcg_temp_new_vec_matching(d); + TCGType type =3D tcgv_vec_temp(d)->type; + TCGv_vec t =3D tcg_temp_new_vec(type); + TCGv_vec m =3D tcg_constant_vec(type, vece, (8 << vece) - 1); =20 - tcg_gen_dupi_vec(vece, t, (8 << vece) - 1); - tcg_gen_and_vec(vece, t, t, b); + tcg_gen_and_vec(vece, t, b, m); tcg_gen_shlv_vec(vece, d, a, t); tcg_temp_free_vec(t); } @@ -3074,10 +3045,11 @@ void tcg_gen_gvec_shlv(unsigned vece, uint32_t dofs= , uint32_t aofs, static void tcg_gen_shrv_mod_vec(unsigned vece, TCGv_vec d, TCGv_vec a, TCGv_vec b) { - TCGv_vec t =3D tcg_temp_new_vec_matching(d); + TCGType type =3D tcgv_vec_temp(d)->type; + TCGv_vec t =3D tcg_temp_new_vec(type); + TCGv_vec m =3D tcg_constant_vec(type, vece, (8 << vece) - 1); =20 - tcg_gen_dupi_vec(vece, t, (8 << vece) - 1); - tcg_gen_and_vec(vece, t, t, b); + tcg_gen_and_vec(vece, t, b, m); tcg_gen_shrv_vec(vece, d, a, t); tcg_temp_free_vec(t); } @@ -3137,10 +3109,11 @@ void tcg_gen_gvec_shrv(unsigned vece, uint32_t dofs= , uint32_t aofs, static void tcg_gen_sarv_mod_vec(unsigned vece, TCGv_vec d, TCGv_vec a, TCGv_vec b) { - TCGv_vec t =3D tcg_temp_new_vec_matching(d); + TCGType type =3D tcgv_vec_temp(d)->type; + TCGv_vec t =3D tcg_temp_new_vec(type); + TCGv_vec m =3D tcg_constant_vec(type, vece, (8 << vece) - 1); =20 - tcg_gen_dupi_vec(vece, t, (8 << vece) - 1); - tcg_gen_and_vec(vece, t, t, b); + tcg_gen_and_vec(vece, t, b, m); tcg_gen_sarv_vec(vece, d, a, t); tcg_temp_free_vec(t); } @@ -3200,10 +3173,11 @@ void tcg_gen_gvec_sarv(unsigned vece, uint32_t dofs= , uint32_t aofs, static void tcg_gen_rotlv_mod_vec(unsigned vece, TCGv_vec d, TCGv_vec a, TCGv_vec b) { - TCGv_vec t =3D tcg_temp_new_vec_matching(d); + TCGType type =3D tcgv_vec_temp(d)->type; + TCGv_vec t =3D tcg_temp_new_vec(type); + TCGv_vec m =3D tcg_constant_vec(type, vece, (8 << vece) - 1); =20 - tcg_gen_dupi_vec(vece, t, (8 << vece) - 1); - tcg_gen_and_vec(vece, t, t, b); + tcg_gen_and_vec(vece, t, b, m); tcg_gen_rotlv_vec(vece, d, a, t); tcg_temp_free_vec(t); } @@ -3259,10 +3233,11 @@ void tcg_gen_gvec_rotlv(unsigned vece, uint32_t dof= s, uint32_t aofs, static void tcg_gen_rotrv_mod_vec(unsigned vece, TCGv_vec d, TCGv_vec a, TCGv_vec b) { - TCGv_vec t =3D tcg_temp_new_vec_matching(d); + TCGType type =3D tcgv_vec_temp(d)->type; + TCGv_vec t =3D tcg_temp_new_vec(type); + TCGv_vec m =3D tcg_constant_vec(type, vece, (8 << vece) - 1); =20 - tcg_gen_dupi_vec(vece, t, (8 << vece) - 1); - tcg_gen_and_vec(vece, t, t, b); + tcg_gen_and_vec(vece, t, b, m); tcg_gen_rotrv_vec(vece, d, a, t); tcg_temp_free_vec(t); } --=20 2.20.1