From patchwork Fri Aug 18 22:13:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 714692 Delivered-To: patch@linaro.org Received: by 2002:a5d:484e:0:b0:317:ecd7:513f with SMTP id n14csp748838wrs; Fri, 18 Aug 2023 15:14:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHDBJl7PmI/O4hMj7fO/YdTTd6jkMfeoIukbAjAI7hfhg7KZq7KahZBudkftVd5Q59UXBVd X-Received: by 2002:a05:6358:52d4:b0:139:cdc2:e618 with SMTP id z20-20020a05635852d400b00139cdc2e618mr735744rwz.8.1692396891503; Fri, 18 Aug 2023 15:14:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692396891; cv=none; d=google.com; s=arc-20160816; b=FQppxGqd5ktc9KeMgJ2n7PC0vZ0/x/Rk5Wnr1y7bzW35IMtVd+ULNgUjJBMHEJW4Pc NhSKFnplz4d19esoMHQ8mIwUplCxT+j+fZyEbZcNTpgsP4gzE4HcDqvkawQpt3CkmFXW 8Hz71xKeyGJ/niL2pA4QtyBBnWY0Xzu/ScMRhk+WUyu1uKAlyBY37ngBDE9ESRY+uKVi ErEK+ZK8jEsHrMZEk3c/K+3rG7m1DrsBS+TZHMwSxz1TJZyRADg6rOQKbINErjQMzutJ gV1H0UkoMGQqe47diMQm1aVlNV97JXpeKWd5jR1vz+5gFiSJBLZoRBBk/VVE3tA+ewZ3 Iiqg== 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=ZdxuTRBDhpwGKPjeRXtNosvkcoAFdoxFlT2T0qO2JcVXwWmtL1tIicsni64Z/Qu31b rrKV5zjxKgYu86MQle1/8Yi4K6owmQevI72gIH0PaYLo6wBu3yrxtMlTm2LdTnjOEBvv pV7fmxJ4YiCw0cEujW0rhyHzr/ux5ELEPS/6MmiTd0YUgWr1qsXJxXrqGpS1nxvx6oeA ZGocuwrNeiJoes/RZvkmGSff1CV2MHWkLSY3orZsykA35F+XC+xx26JPJUlCOzyo28et nFrEBZPBxUuKWwc1oc2q3nirqTmcnhFTsk9qGw99P/qSFDnTzXORUGGbNMraZWpEL0VJ CYEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ivhx1GFv; 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 b15-20020a0cc98f000000b0063d07415e07si1905379qvk.163.2023.08.18.15.14.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Aug 2023 15:14:51 -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=Ivhx1GFv; 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 1qX7ir-0004uM-3G; Fri, 18 Aug 2023 18:13:37 -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 1qX7ip-0004tc-Ms for qemu-devel@nongnu.org; Fri, 18 Aug 2023 18:13:35 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qX7in-0004M2-9c for qemu-devel@nongnu.org; Fri, 18 Aug 2023 18:13:35 -0400 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-688731c6331so1167409b3a.3 for ; Fri, 18 Aug 2023 15:13:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692396811; x=1693001611; 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=Ivhx1GFvVSjPSN3G1H3VwSGD3BccDRAQ/iLX4Y2i6VKcCoCUjNNp1IApifQbwqHctS OFoeAU/eS8/2jpQwczp9hVGU9OER7/9bVCSCkVzdntmHvUBU5i3Ra+swFXK/CiB0d8pi JVxGBhATxDFWJkJ5G93qz/FIqYQwWWKErz4ebs5J17zkLrkZ2D6OBb5bUKs/nhC7Kbi1 Z9gIaK/dLeQWDOT5sCcATtUzEWI6r1WNUzxHqZRY/0h3bLyJtwHA50u92Tr2gIVMPHn/ /qbaf2Mw3yq9SNkZSKnJ2XwY9Gbk0lgAmL5bDFm3DRq/rVFQSOxdfzdqy0Ct8Gwr0W4S 3Jyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692396811; x=1693001611; 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=Y8QI33OwA2bp/FXuIrM5EmZ96CscYCwevb9E7nYqGBbZv5YmcONjYbu3zv4+DtKfgH 9tXE2OTqg5GEKxOJKkfBFy3UX+bHzWnlZYQrkoDnFiLSBb64n1ncn6S1L0iH9bIdCWLs hAMABdJileURoR8B46FHZ/2e83MFuF6BGh2PLlWiVHWPtIsjGgnp99AFq0bMOhtVZYMV xBfW1mh1BuLRm5o1GX+UT1Z8EnvrQy90pFrFF/DtiBKoO5oVzxhG8J+JfVClT58zWfgl j+fm8ZwlL+3stm3q6lUh7rh1XcsCOQOkUhNx2az8M1C3/s5w5xPDR+j2Gt7XlsokQw7T UB7A== X-Gm-Message-State: AOJu0YzlSD3Nyen/llLIMjPRgHEKlIBh2TX5M6FsnnXqx933RzukrUVu w+4JFoMM6vzFvEyk4SEeXTrEpyqa+SaMwwJLU50= X-Received: by 2002:a05:6a21:279c:b0:104:ad71:f080 with SMTP id rn28-20020a056a21279c00b00104ad71f080mr421710pzb.34.1692396811586; Fri, 18 Aug 2023 15:13:31 -0700 (PDT) Received: from stoup.. ([2602:47:d483:7301:cf24:6daf:2b9e:7972]) by smtp.gmail.com with ESMTPSA id y7-20020a17090322c700b001bdb85291casm2231417plg.208.2023.08.18.15.13.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Aug 2023 15:13:31 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PATCH v2 03/23] target/alpha: Use tcg_gen_movcond_i64 in gen_fold_mzero Date: Fri, 18 Aug 2023 15:13:07 -0700 Message-Id: <20230818221327.150194-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230818221327.150194-1-richard.henderson@linaro.org> References: <20230818221327.150194-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x432.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: