From patchwork Tue Dec 13 21:25:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 633538 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp3346571pvb; Tue, 13 Dec 2022 13:36:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf5hr22MszKTWnv/sQZrkzz3pGEkhnx1kulA/sEpqZdXh5fGdeii5auZZzabLuuqrgYxl2A7 X-Received: by 2002:a0c:ed2d:0:b0:4c7:658a:a7c7 with SMTP id u13-20020a0ced2d000000b004c7658aa7c7mr32331430qvq.34.1670967395982; Tue, 13 Dec 2022 13:36:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670967395; cv=none; d=google.com; s=arc-20160816; b=uSHOcA7pgH/nxvyfzsTPWdlTrruOacKxjhVufLTc1eJB/xbIrDbZ/Aufsr1LfqoJ3q wMt6FCpMZAjailWzcY32FLbneR3WC+re7PCHCDYGtSDsB5PhkZ/eRAne2zBCV7+Ahrr4 RRJvTNImEWETlKkFAFR2G9k6rjwT/YtfGO4sqBh280H7Q+jrP2p6aoOXYmTWAk3rhOyx RKKNe9f6iyv2EZj6eFkEdiHIhsoqMbNYTz+KI0A16caGCYpsJDZFvtn+La1Fvlj8DZP8 hclP7hRvbybrLlZcS9zad2jVkLfG9SKuzoooGvhDdId1LeqDCakHJ+sp9yBypqrpUfe0 GH7A== 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=RqkUbgBv122Thnf546PHquT7r6o6Y94wYiKV+lBMbFo=; b=tY2Dcg0ImwJPpQkUU1gtPvlRbUQXrtwvBnL15SGVtmrMA8ec8BZxRXtoZOlLcxm4KM yO5txcaopzXenarMY45EH8CBxMX5WSGmG/fbrzayFD/6AptGlCOvpnn7yDtJPc022nhA atyusX25iTN16ZGJJWYihc1ZcqcxkZYSSGVIqCm2mTcR8a1gqVlbBw46rMimE3yWP6+3 W4VTQCVse9meUT7qsPczrQ66YAhUZLzKajlNudijrXt2RNBjpDe2jlB8xlp6HQJPypkN VF9l3fJaQlhtHNFvw3nQ6i1FysbpPUwBSaVeOQxGz77hv3iTotAYXwkTFmk+QRx5BFPW i95Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cT8jZ6EF; 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 q12-20020a056214194c00b004bbdce26669si7622328qvk.144.2022.12.13.13.36.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Dec 2022 13:36:35 -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=cT8jZ6EF; 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 1p5Cmf-0000b1-Ay; Tue, 13 Dec 2022 16:25:53 -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 1p5Cme-0000aq-BK for qemu-devel@nongnu.org; Tue, 13 Dec 2022 16:25:52 -0500 Received: from mail-oi1-x236.google.com ([2607:f8b0:4864:20::236]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5Cmc-0003D0-Qc for qemu-devel@nongnu.org; Tue, 13 Dec 2022 16:25:52 -0500 Received: by mail-oi1-x236.google.com with SMTP id l127so1027872oia.8 for ; Tue, 13 Dec 2022 13:25:50 -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=RqkUbgBv122Thnf546PHquT7r6o6Y94wYiKV+lBMbFo=; b=cT8jZ6EFQ9OPoDOINglVzMKkw4wuswZtoI/gnMYY5sAI03Vsahb0GVBaqfKRZJEFzi /5eDN/DdUgROXToXW16+qjF/U/XnznuWhPslNlpwiYqT9ikvKAjvLGIpOoufRP2p7m+m HB6fN0sHSwyORKljizgdyPEAAfe8fPl5nQa61BBcPBsRojM2+E/Y6/c0Grsx0Cng1bH2 E7mntDxzWlYiN8+RAwjH+7PJEECtT1TpMJjCbkYxK4/7sTfii/6Z67OtuqiAeeucdVHR owfD+el12GVYbN68RqnevrnvpMxJOxGiyEFGO6SAn5pt2f6kTaHXUYl7fMd60RvNhrp+ qS7Q== 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=RqkUbgBv122Thnf546PHquT7r6o6Y94wYiKV+lBMbFo=; b=I9kAVxnwo4+uyod2Gcf85WD3jC1Lkc3Kg4IaFvLH8TuMXIrBhTXS/T23fwpcdZKgWf b/r/qGf0YzlAWLjwcNjH8+USp0t7mCx+2cDlmTU2qMunfjBmAve22+KBNMknc90ONCzn 8RahkyLCPrsk9qIYXY/9SVFEjNsAPMpTHpEJY0V1HY4svX1Z7oZDU8no9YmH2DdQy1w3 kO1no4tIXJY7KSk5iW4O8Rd0ELaI9r9MyUT2PMo8CGcITAAYil7/BYjzhb1i98AJMIQb PoY4zmD99NnEe18AkWpzMf7eFIEHa30X1viUYh4HSWKhiCdFs9AVCHkutAmvDrLWnKuy Fzpg== X-Gm-Message-State: ANoB5pmPUf7Kr9KlvKqEqwxMIOro5SGHBag9N9LnrBIp3pGR4u0RmhpP wFty6I9bm0mQ3SFHYTbh9GIIKYwUUfjQCut+mtE= X-Received: by 2002:a05:6808:ecc:b0:35b:d885:97c with SMTP id q12-20020a0568080ecc00b0035bd885097cmr11607416oiv.53.1670966749421; Tue, 13 Dec 2022 13:25:49 -0800 (PST) Received: from stoup.. ([2806:102e:18:2efc:c63:85ed:4256:8ad0]) by smtp.gmail.com with ESMTPSA id a7-20020a056808098700b0035c073aa0d8sm5006831oic.18.2022.12.13.13.25.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Dec 2022 13:25:48 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland Subject: [PATCH v4 06/27] target/sparc: Avoid TCGV_{LOW,HIGH} Date: Tue, 13 Dec 2022 15:25:20 -0600 Message-Id: <20221213212541.1820840-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221213212541.1820840-1-richard.henderson@linaro.org> References: <20221213212541.1820840-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::236; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x236.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 Use the official extend/extract functions instead of routines that will shortly be internal to tcg. Cc: Mark Cave-Ayland Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- target/sparc/translate.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 34858eb95f..150aeecd14 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -163,13 +163,6 @@ static inline void gen_update_fprs_dirty(DisasContext *dc, int rd) /* floating point registers moves */ static TCGv_i32 gen_load_fpr_F(DisasContext *dc, unsigned int src) { -#if TCG_TARGET_REG_BITS == 32 - if (src & 1) { - return TCGV_LOW(cpu_fpr[src / 2]); - } else { - return TCGV_HIGH(cpu_fpr[src / 2]); - } -#else TCGv_i32 ret = get_temp_i32(dc); if (src & 1) { tcg_gen_extrl_i64_i32(ret, cpu_fpr[src / 2]); @@ -177,22 +170,16 @@ static TCGv_i32 gen_load_fpr_F(DisasContext *dc, unsigned int src) tcg_gen_extrh_i64_i32(ret, cpu_fpr[src / 2]); } return ret; -#endif } static void gen_store_fpr_F(DisasContext *dc, unsigned int dst, TCGv_i32 v) { -#if TCG_TARGET_REG_BITS == 32 - if (dst & 1) { - tcg_gen_mov_i32(TCGV_LOW(cpu_fpr[dst / 2]), v); - } else { - tcg_gen_mov_i32(TCGV_HIGH(cpu_fpr[dst / 2]), v); - } -#else - TCGv_i64 t = (TCGv_i64)v; + TCGv_i64 t = tcg_temp_new_i64(); + + tcg_gen_extu_i32_i64(t, v); tcg_gen_deposit_i64(cpu_fpr[dst / 2], cpu_fpr[dst / 2], t, (dst & 1 ? 0 : 32), 32); -#endif + tcg_temp_free_i64(t); gen_update_fprs_dirty(dc, dst); }