From patchwork Wed Aug 23 20:22:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 716097 Delivered-To: patch@linaro.org Received: by 2002:adf:f747:0:b0:317:ecd7:513f with SMTP id z7csp1001904wrp; Wed, 23 Aug 2023 13:24:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHyCLD2lsyo7bEJDCIMCAkDbDLNVMr4llHt6mN5SPSqHTGbyLM2xSuyADYs98/hDNfFKB8m X-Received: by 2002:ac8:7f47:0:b0:410:9b3c:e828 with SMTP id g7-20020ac87f47000000b004109b3ce828mr10561646qtk.37.1692822280882; Wed, 23 Aug 2023 13:24:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692822280; cv=none; d=google.com; s=arc-20160816; b=ejEtZ0IqrkPP2OY3XHSoHoLErkSglACMjaCEj6s0HI/M9jiblTFCw7elRPUY1SbHEX t4oJwdIZ/6GgUJYpFtggRHJGC1pzg1MMsaPxSgDOxEHorCCyJdHOZYpmYU99wk5oZN+A XRIc4ixLTaLRo/o+QmEDvou9fdqDp3U2g/Nkk0VN5X6pXdr11sBD1DL1SvsgMmKO3hhn uy80a1UM4fWHlsuLp4x+z07K9IlAB1CoNCCVVra2R+j5/TeBcVfMaY/gB2JsynmEfmex T8smsAVX3hRMcf89vIVrFgby002OcaRrXwwy2ayhg02XNF7hevi/5ijflabl8zASHG5c ouzQ== 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=Xi3TssmA/HigYWFgy245JlLJX03+VaDfRVBuqb9pW5c=; fh=iKWO5kImkBaf5P/04M2d2o+fJodoyCg8YLKe8/cbiwg=; b=wfSewRJ5EKcaewplec5N6B3xNBPGAgDSYE49RXIz7/Syjw0BmnNQdX8EYJk25iOTRt pGikoi0AONaFchtiF4QNQoxe6WtwBDcPHmqsi2TAepwMLGlyY8bw5ysokIyoqIRQUVoC CsEfsxOXKq4ejgBmzM33xDXcMA/fL+q6WLMoWfs2Y5geotnctT7mmgjrJOFdBGQ/ko++ BBvpgtrMFV/aJ252UhdBDjR+VcZvcY0jgkWsapvtR01RmSAdiCftMyT6cO5w29zDoKjM GKXjGfTla9ytAt7ZqisToRc6f8M+Mj36IQjv6iMaxqy12rKd2L8ccFrBneMC0KydRJOh j2+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jeHYdHVx; 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 a15-20020ac85b8f000000b0040fd3f0a144si2831147qta.629.2023.08.23.13.24.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Aug 2023 13:24:40 -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=jeHYdHVx; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qYuOX-0008Le-02; Wed, 23 Aug 2023 16:24:01 -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 1qYuOU-0008KD-L8 for qemu-devel@nongnu.org; Wed, 23 Aug 2023 16:23:58 -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 1qYuOK-0005Ub-Dc for qemu-devel@nongnu.org; Wed, 23 Aug 2023 16:23:50 -0400 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1bdc19b782aso41151525ad.0 for ; Wed, 23 Aug 2023 13:23:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692822224; x=1693427024; 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=Xi3TssmA/HigYWFgy245JlLJX03+VaDfRVBuqb9pW5c=; b=jeHYdHVx7G26OSHg2qLUjGik1KPZAAF0dENH7IaHuBbqUuOpCZcs9uZwz0ctXpGCdj dbuXF8oqBFbMvteERt21z9uYyrOmHC+bYN46OqYvnPibJPR5SOeK/AlEZKTaAr5wgnr5 nB1ZG8AcKzsK+TgoQ8Sqca/WCZU3iPDFabUkYW8UJju9bvYcAXuXDFuUfPs66sDSo+cY wNw1yVJrrnC2XUYl1Cw5M9evAWIFzjTvwxnL5GaKQXp04WTc3D0k31hs337tI2POd5a7 l5hb1JiXTDd5HktZxoqJ08LdXusCk1DvZBiEujCPuwYoVDu0dyI9zBnE5ZxzIgbFdxMV bOVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692822224; x=1693427024; 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=Xi3TssmA/HigYWFgy245JlLJX03+VaDfRVBuqb9pW5c=; b=OfivFUQhJlEyi703Z1O9jA8o+GN854GR2zXyYkriR6cuayPkAGHvr6UURbJw2eivsf sLdUH2UtomHt5bFSGRaV8HMObXL3Ns4zQ8rqxnsKrsULjkO+PV1I31JMgZ5NaTLhW0Hz nNPvhO569jDyMvMp8IxHgaxwajYDcOIQnn/kKyM+HXX6yC9m6hXkkq1EBMAHF5HMgWSK 50+jqcgHw+K6Zf0TzYXsFq9RHU/CrTA0oBweqRWhruKuY276EvYjrY3nUTDtfGSqSlfz ZDbSeC7nlfWkVrwfC+hWAT7ubAwsIL+XxDpiNc0h3vAcb6UxuW9zGFGVs4bBRhWngaPF OWeQ== X-Gm-Message-State: AOJu0YzhGMOFFhKbebjqQxrwRsxXeFTyQo2PkCaJ9oa+EBEAp5dM/MSD 8fg2Lv1ezJo8wc4UAx6oZt/uqjo874QkcNdq+i0= X-Received: by 2002:a17:902:dac9:b0:1c0:b8fd:9c7 with SMTP id q9-20020a170902dac900b001c0b8fd09c7mr1817008plx.43.1692822224674; Wed, 23 Aug 2023 13:23:44 -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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Aug 2023 13:23:44 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 18/48] target/alpha: Use tcg_gen_movcond_i64 in gen_fold_mzero Date: Wed, 23 Aug 2023 13:22:56 -0700 Message-Id: <20230823202326.1353645-19-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The setcond + neg + and sequence is a complex method of performing a conditional move. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/alpha/translate.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 846f3d8091..0839182a1f 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -517,10 +517,9 @@ static void gen_fold_mzero(TCGCond cond, TCGv dest, TCGv src) case TCG_COND_GE: case TCG_COND_LT: - /* For >= or <, map -0.0 to +0.0 via comparison and mask. */ - tcg_gen_setcondi_i64(TCG_COND_NE, dest, src, mzero); - tcg_gen_neg_i64(dest, dest); - tcg_gen_and_i64(dest, dest, src); + /* For >= or <, map -0.0 to +0.0. */ + tcg_gen_movcond_i64(TCG_COND_NE, dest, src, tcg_constant_i64(mzero), + src, tcg_constant_i64(0)); break; default: