From patchwork Mon Feb 27 05:42:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 656902 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2228297wrb; Mon, 27 Feb 2023 00:13:32 -0800 (PST) X-Google-Smtp-Source: AK7set9ojhqrEtyYuhBNXaXZEItYBZsmcomHF8Bq6ao1VBipQOW7i3L/3SE4ebML7r9Ruj8gorIB X-Received: by 2002:ac8:5f07:0:b0:3b9:a5d8:2c50 with SMTP id x7-20020ac85f07000000b003b9a5d82c50mr30927160qta.38.1677485612796; Mon, 27 Feb 2023 00:13:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677485612; cv=none; d=google.com; s=arc-20160816; b=A6XPKj7gzvU/Ox2v/EI+9pLwNREPeFLqh22sOqy5ZVoTdJlG8DPrHy4OFR8l942X69 yLUC0Liak6+yxqOQVcKIUQvBEhgVjQ9B+bURbsCR7Hw1LZo6yQiIB8f6hxbBhoVev2rO NVjNa6C+NI/PUY63QUpoyFGk0Thko3lg5lLgJDdjlgnEiGEUKBULzJtD5//+RJp5Decx CqFi0HogA1EgKY/Z+Xy0MWQNPFCRkrONIMTjhNlraEiAd02yUf7Nb0qKEEv3gtH/9hS1 yKu1UC6TcQIZj3B7ySGHc3i4dXkaqCdm++1YtQrU8TZNnTRnP1fGDYV9MhmhWq16uohQ /J0g== 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=I0nuMJ82HVYxh2319z4AOHVFLixzgJR82pq22O8Q0Zc=; b=nL2+OKeQt7JVIHkIqn5spau8ISycByf4mMj4lBC36taiDD6Gk5pg1/CaT5ELXetgpb +8VdmzHtEBET8/9FF3ZGy4pkBrBe+JQHjJosTJVkZ4E5F0k9WgbqlMuErw5aCX0RAnhc YWBbWWPbcYu8jpr/5EKlk1dipd3x4EivOWeYKQMAiXENFHrfnVeX+hnyo8Z2S5Rp2FhY P5d+IsGNSWCzJOs2H06vrrpfXAmf41w5lZbjsMLsWQi5naVUg5dZUtTyHbbo+wnT7/z+ iQH7sfqrmpRxGomY30Fm5OwwljUrcB2NfG0NWVnfFhUK9OJKOrecv4dKtL9Ire/lcbmq xNbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uE51e6SG; 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 l2-20020ac84582000000b003bcd3532491si5349759qtn.304.2023.02.27.00.13.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 00:13:32 -0800 (PST) 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=uE51e6SG; 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 1pWWOJ-0000Bc-34; Mon, 27 Feb 2023 00:49:39 -0500 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 1pWWNH-0004FP-G3 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:48:39 -0500 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWNF-0007J6-Rl for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:48:35 -0500 Received: by mail-pj1-x102c.google.com with SMTP id oj5so928716pjb.5 for ; Sun, 26 Feb 2023 21:48:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=I0nuMJ82HVYxh2319z4AOHVFLixzgJR82pq22O8Q0Zc=; b=uE51e6SGXuXMjJMflHsSd5YBOdMR66VosqpLIe1cDZA2aXi3VGa4s8rUsKYyaAQUrl +fWCrOP3fVdtEFUfHs3nnwVnVXA3QWJxhlFIe+HCReQHlbNxgEQQUsVl5eG4/0Fyrde0 bboOilhvKgdmlm/K/SPgkDiOtNlrGzKCGJHKThjtGGMhNHr809MHkqH4rEqFF8yQzkAR XwAOMu+bWgGFWBof58EmDypCgKQj4NLJ5Z2WFuNpwy2J9vPDx7ADobSR7Mpewc2YFP05 Zn9xvTTP6013FenPZz78uBpG/SsmlUvMyoS3P3QzjS1joEk6Eckc4/t+lHcWpmhHAF2A iz/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=I0nuMJ82HVYxh2319z4AOHVFLixzgJR82pq22O8Q0Zc=; b=dqmfGLRW+ssd5p05z69ULhYEzSb+ZcFsfEJzhgh54wamjYE6XsBR2wBjC+gaciVrdE ITpCdFLgxMvGJMB3ltLfI8ysSdfZFtXaM+L4enHzkVsHV+Ws30dHrv3QHQ4bDma4+FKO R/+KwDUuxqnbf9fXcrkPsOlBagSE24PonKPcl5pdwMJBZ2vxhlL28e6kdoau8PsowiG0 Q481RqHrBffDWIIPZ/E8pulrAay9NFdDjfn0RuGNRWXNBDdbXfFkIqHIbQVuduQPq0ox 9oU7MN5AeNNNa/GHsn7uIGS0Z9oWFScn6PpmnyplF8Ivm/BIcfY8SjCvbrSR9UwzcAwq G4tA== X-Gm-Message-State: AO0yUKVGjjc4sbjrabNBmgH/F6xybh0O9QtYaDyuTs49bRDWR/AKfaAV 8uBdqAstxwBlyxmkjpY6DKuyUxYmHmXXr7dBE+4= X-Received: by 2002:a17:902:e80d:b0:19a:b4a9:9df7 with SMTP id u13-20020a170902e80d00b0019ab4a99df7mr29397733plg.53.1677476911916; Sun, 26 Feb 2023 21:48:31 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id im16-20020a170902bb1000b0019a983f0119sm3553986plb.307.2023.02.26.21.48.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:48:31 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com Subject: [PATCH 63/70] target/xtensa: Tidy translate_clamps Date: Sun, 26 Feb 2023 19:42:26 -1000 Message-Id: <20230227054233.390271-64-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227054233.390271-1-richard.henderson@linaro.org> References: <20230227054233.390271-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102c.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=unavailable 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 All writes to arg[0].out; use tcg_constant_i32. Signed-off-by: Richard Henderson Reviewed-by: Max Filippov Reviewed-by: Philippe Mathieu-Daudé --- target/xtensa/translate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index e3fcd50691..d727f9ffd8 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -1514,11 +1514,11 @@ static void translate_callxw(DisasContext *dc, const OpcodeArg arg[], static void translate_clamps(DisasContext *dc, const OpcodeArg arg[], const uint32_t par[]) { - TCGv_i32 tmp1 = tcg_const_i32(-1u << arg[2].imm); - TCGv_i32 tmp2 = tcg_const_i32((1 << arg[2].imm) - 1); + TCGv_i32 tmp1 = tcg_constant_i32(-1u << arg[2].imm); + TCGv_i32 tmp2 = tcg_constant_i32((1 << arg[2].imm) - 1); - tcg_gen_smax_i32(tmp1, tmp1, arg[1].in); - tcg_gen_smin_i32(arg[0].out, tmp1, tmp2); + tcg_gen_smax_i32(arg[0].out, tmp1, arg[1].in); + tcg_gen_smin_i32(arg[0].out, arg[0].out, tmp2); } static void translate_clrb_expstate(DisasContext *dc, const OpcodeArg arg[],