From nobody Thu Nov 28 11:49:16 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=1692822448; cv=none; d=zohomail.com; s=zohoarc; b=i8kHxLk5JVY2yRrlIGK9ZNf3bv2VaA9cH+ISLDUOjbfR4mvT/tcd8EyqMRd9er5rwbZZphfYjQVjerCXNNVM3X8SIqiOCgE3T2z3BWm7i+JCyYyBiA0HYcBZ8rTDgaQNJGl1LuiKJjyvQ0MlyVlB6CnH25w1PulpKE+V1Qale+c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1692822448; 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=BXTuJLuVUV/PuBzgJU7K0Vdmip6KJacvGUEEE2MhUro=; b=JNmw7Y8y25JpkRhriIWqyi2mUq1fKVO+J0jWNA+S/Zv3Xodm0WYooudl4LksN73RjDIfpaMccvJzXv+bb+jgvZBgtv9t6emIjjOUSx8AE+9DMXmYCMjiWqBYlr2UgxzyNnGYLvi7dX9kGRdZ3h657dMMKl6o1DQRzHyDSKYQwqk= 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 1692822448677353.69142377156265; Wed, 23 Aug 2023 13:27:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qYuOm-0000YX-4o; Wed, 23 Aug 2023 16:24:16 -0400 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 1qYuOb-0008RZ-F0 for qemu-devel@nongnu.org; Wed, 23 Aug 2023 16:24:05 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qYuOW-0005V8-Sj for qemu-devel@nongnu.org; Wed, 23 Aug 2023 16:24:05 -0400 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1bbff6b2679so40186855ad.1 for ; Wed, 23 Aug 2023 13:23:50 -0700 (PDT) Received: from stoup.. ([2602:47:d483:7301:72f0:1ea7:85d2:141e]) by smtp.gmail.com with ESMTPSA id iz22-20020a170902ef9600b001b9da42cd7dsm11418641plb.279.2023.08.23.13.23.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Aug 2023 13:23:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692822228; x=1693427028; 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=BXTuJLuVUV/PuBzgJU7K0Vdmip6KJacvGUEEE2MhUro=; b=t5DJgLl8yJjggY+2mtQX92tU1/SePkCJmuL5+9XwbDx5Ju52FGIu//KitavaL0jVHo 8nvaTNRqHMh8C2ZQBE0HoD6EAGnfBAdlSJQzwyTW55udFI7/wTuiVwoyLR2gf8BxwHV3 8CMz4IaKq/CBYWMa1RZeRZ17mux03Ukjs+xGnOe6UnrYlzRQSxFRTD/xCMDQhhHs4+xF yrAIcaomxjvBapoVzA74JMEbspJLFXafixUd4a1ayZgbSa5ZL21ypE80GeP4itad+e9k cKl+SQOqx8PyzZ5ZHPPSHnn9RX5vwuETJXrsiKUU2EuBzs9MVEMdWW4XC+odlMfulLyc wunQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692822228; x=1693427028; 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=BXTuJLuVUV/PuBzgJU7K0Vdmip6KJacvGUEEE2MhUro=; b=MnoOgU+0S3tS2jlOnzsid8akRtLfgLYTPrgMOfly/7yymfGcD7lmrgA0g35QN4l18x Mc4to/8DtbiXYrJ4oANUvniXsJrStzzDs4eIkjbp2uBpjVChrjf9nE6dyksLz+RoWzYM H2mx/vWJcx1CpSQY+Zk/wghCL6K9oPxb3/MDzoW1Kcjqhfzi6gXQAk3WzaPoIUOVL4hd 9iT9nrqMBWlptHirpbXC8j7qAId2k7pPFDJ/ITj+YDSdRJVGVS1+QRtusI9ArwfKrN2Z SBAQM60FJBUa3StHGLOikxwa6JPymWnT4BBT117Mi2ELupXf6tvmk0dGNFYUmaRIc3qG pf1Q== X-Gm-Message-State: AOJu0Yzirg6xaa/sEeX8wLQj0wN/w7hfug/qc2BHPQvLUHgq7jkKHoMS S/TqlFlu/XbQ+4Nwz/T7yEwzFO5RBd8857JEZrk= X-Google-Smtp-Source: AGHT+IEcM2/LWVfVapPH4mW/xgV7W5slZqzPAIT3ER4nIxqfZI53vo+KYy4N+7RBxTHjQLjhiPaIPw== X-Received: by 2002:a17:902:e752:b0:1bb:32de:95c5 with SMTP id p18-20020a170902e75200b001bb32de95c5mr12792910plf.65.1692822228166; Wed, 23 Aug 2023 13:23:48 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Nicholas Piggin , Daniel Henrique Barboza Subject: [PULL 22/48] target/ppc: Use tcg_gen_negsetcond_* Date: Wed, 23 Aug 2023 13:23:00 -0700 Message-Id: <20230823202326.1353645-23-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230823202326.1353645-1-richard.henderson@linaro.org> References: <20230823202326.1353645-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::635; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x635.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.29 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1692822450754100013 Content-Type: text/plain; charset="utf-8" Tested-by: Nicholas Piggin Reviewed-by: Nicholas Piggin Reviewed-by: Daniel Henrique Barboza Signed-off-by: Richard Henderson --- target/ppc/translate/fixedpoint-impl.c.inc | 6 ++++-- target/ppc/translate/vmx-impl.c.inc | 8 +++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/target/ppc/translate/fixedpoint-impl.c.inc b/target/ppc/transl= ate/fixedpoint-impl.c.inc index f47f1a50e8..4ce02fd3a4 100644 --- a/target/ppc/translate/fixedpoint-impl.c.inc +++ b/target/ppc/translate/fixedpoint-impl.c.inc @@ -342,12 +342,14 @@ static bool do_set_bool_cond(DisasContext *ctx, arg_X= _bi *a, bool neg, bool rev) uint32_t mask =3D 0x08 >> (a->bi & 0x03); TCGCond cond =3D rev ? TCG_COND_EQ : TCG_COND_NE; TCGv temp =3D tcg_temp_new(); + TCGv zero =3D tcg_constant_tl(0); =20 tcg_gen_extu_i32_tl(temp, cpu_crf[a->bi >> 2]); tcg_gen_andi_tl(temp, temp, mask); - tcg_gen_setcondi_tl(cond, cpu_gpr[a->rt], temp, 0); if (neg) { - tcg_gen_neg_tl(cpu_gpr[a->rt], cpu_gpr[a->rt]); + tcg_gen_negsetcond_tl(cond, cpu_gpr[a->rt], temp, zero); + } else { + tcg_gen_setcond_tl(cond, cpu_gpr[a->rt], temp, zero); } return true; } diff --git a/target/ppc/translate/vmx-impl.c.inc b/target/ppc/translate/vmx= -impl.c.inc index c8712dd7d8..6d7669aabd 100644 --- a/target/ppc/translate/vmx-impl.c.inc +++ b/target/ppc/translate/vmx-impl.c.inc @@ -1341,8 +1341,7 @@ static bool trans_VCMPEQUQ(DisasContext *ctx, arg_VC = *a) tcg_gen_xor_i64(t1, t0, t1); =20 tcg_gen_or_i64(t1, t1, t2); - tcg_gen_setcondi_i64(TCG_COND_EQ, t1, t1, 0); - tcg_gen_neg_i64(t1, t1); + tcg_gen_negsetcond_i64(TCG_COND_EQ, t1, t1, tcg_constant_i64(0)); =20 set_avr64(a->vrt, t1, true); set_avr64(a->vrt, t1, false); @@ -1365,15 +1364,14 @@ static bool do_vcmpgtq(DisasContext *ctx, arg_VC *a= , bool sign) =20 get_avr64(t0, a->vra, false); get_avr64(t1, a->vrb, false); - tcg_gen_setcond_i64(TCG_COND_GTU, t2, t0, t1); + tcg_gen_negsetcond_i64(TCG_COND_GTU, t2, t0, t1); =20 get_avr64(t0, a->vra, true); get_avr64(t1, a->vrb, true); tcg_gen_movcond_i64(TCG_COND_EQ, t2, t0, t1, t2, tcg_constant_i64(0)); - tcg_gen_setcond_i64(sign ? TCG_COND_GT : TCG_COND_GTU, t1, t0, t1); + tcg_gen_negsetcond_i64(sign ? TCG_COND_GT : TCG_COND_GTU, t1, t0, t1); =20 tcg_gen_or_i64(t1, t1, t2); - tcg_gen_neg_i64(t1, t1); =20 set_avr64(a->vrt, t1, true); set_avr64(a->vrt, t1, false); --=20 2.34.1