From patchwork Fri Oct 21 07:15:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 617139 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp820664pvb; Fri, 21 Oct 2022 01:32:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM76WpMEWmS9asaCnlt7Qiftd52qjVoY95Js59JMUKtFDCGDiszFBHNQgIkvdkcL1CHzpWO7 X-Received: by 2002:ac8:5702:0:b0:39c:f612:29b8 with SMTP id 2-20020ac85702000000b0039cf61229b8mr14819113qtw.68.1666341140516; Fri, 21 Oct 2022 01:32:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666341140; cv=none; d=google.com; s=arc-20160816; b=QAkvzszvUKxTSiY+O+GWuwDrvqX29KRXODlTcnSdFdIyMY5qegfgYEVTJeRMpWMnap idMZ+tJDeQdGQbD98wcnwJpdBHK1ozsoAB9nJnFDPgCxl+UxxjcO38AWtc94AYYpx8OD fnUPcSrfAm5BP98qxjeFZknO5ldVtvTjmI/PSiHl+RNO2AIZJ4XE+C6k5WWQz6kl+E+u kw1RCL+mxPqLjAMgFJOowpqhyreruTlC1d+ZTjZbxBJsN/AWf3RAjnbpy396Ud7yzufP nWkWBtFnZKPj2PGjaauoJGDHtJundYoxldZ5ighu/UlB03UitKBnUtzTdKOstX+7PcPj fWqA== 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=ffAk/uKFmYMud8oNMjB2hkT94GX/9Rmm5gafjNWj2X0=; b=02gLVkPpbpBVAXYyLKDAJJym33kS7RnOa/8F/KZBDndB+Fz4zuRtyyL1J690cl6g0d kWOSnplKm/6nk/GxAzKdCjGLAGls32HbSyuMVMvsQn7inbzS+R5kjJH7eDJ6KH6jrM2p XdkfdQkGV8KdMJbYtrkMOLywVY6pVjoWbjgQghHMAWsq2L7mED4yJF8do0T3PcyTZ/Yw +bM3rwscgv704+421z9f8ubUY8Y/LkcR2tSe8WgBZNg6aSeCA7ZdiMw4ZOeh/lvFS/Au I9WNbbCHjJmjDmYdY5kbuBYaW3QHGb3LeVOu87JWWWSO0a3Ir1pBfBUW3k2VlSgc6IfG 0ASQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wNFTdlBq; 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 j3-20020ac86643000000b0038fbcf8b10fsi11257181qtp.745.2022.10.21.01.32.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 21 Oct 2022 01:32:20 -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=wNFTdlBq; 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=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olnRr-0001V7-Rw for patch@linaro.org; Fri, 21 Oct 2022 04:32:17 -0400 Received: from [::1] (helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olmH4-000371-GI for patch@linaro.org; Fri, 21 Oct 2022 03:16:58 -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 1olmGz-000367-16 for qemu-devel@nongnu.org; Fri, 21 Oct 2022 03:16:53 -0400 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1olmGx-0005fo-Ba for qemu-devel@nongnu.org; Fri, 21 Oct 2022 03:16:52 -0400 Received: by mail-pj1-x102b.google.com with SMTP id t10-20020a17090a4e4a00b0020af4bcae10so2013371pjl.3 for ; Fri, 21 Oct 2022 00:16:50 -0700 (PDT) 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=ffAk/uKFmYMud8oNMjB2hkT94GX/9Rmm5gafjNWj2X0=; b=wNFTdlBq9+piNNR1XJEMvpJZ+1rT/udqse533tPPSRGx4/cHnV377I7kas5GLAPLBt ox21l0RDoe/w5weqfreggNJUACq5idqdh8pTDwi+6wxEMXkBEj0oeD54kOoJPCkn1dap 75Hy8yBhLVh4/Ipozmwpx+kgaLI+LFyJ38m0ZcFNkcFC726W2meb5yjusoZlyvk7z6bs e6UySvMM9rC0cgDRthQxhqFMiqPh4pgF1bmUKwu2TkVSvJ7g++bc60hl2y7vJxnZs6tK OndTZ8FCoTGcSBR+DUhNTG6FyDRhJANDGE5In5diEKbhMFoQxDVkt0JvmfhNiegiAyCf vDKQ== 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=ffAk/uKFmYMud8oNMjB2hkT94GX/9Rmm5gafjNWj2X0=; b=Wd3gzutEr19aLaq4aDgcwxCKCcEZ1t6wRL7XhxP7Q3s4SukWmeXoS8yE06xN+SoWW9 lvRxhD25C1FrH13aXLj1caQy5uUCPho5PMAkW43ikdhG9CtzaGxz79NX5ZCXjGGM0ukI KguRdlgP+c153UIDsFYP8AsGzW3VgjOLXKj932hEpb/fO37PyOPc71+lNaqaqYxQUkJV 79GZqGVOf3k+9NOhSsg9gfHBdaEeppdpfzo7q+ExEGxbAkGIRcuseNjRlG+pdlvxUhdR ziaYMbO5Uk2F9k8hkXARyq9Ulc3BK5Jv7xFYaqprYGEEkkhMd2Sb72jsnYQ+5XlDrNds bbfA== X-Gm-Message-State: ACrzQf14Q0WCXNVyqZbW20Drv9mIwXpF3Q7g+a4QE/4t0cER59bs69gk OXTy7n4Vv6cgGCXMF8LSpRUK4bJs3gYXAJbQ X-Received: by 2002:a17:90b:3ec3:b0:20d:9da6:56c1 with SMTP id rm3-20020a17090b3ec300b0020d9da656c1mr21119024pjb.156.1666336610104; Fri, 21 Oct 2022 00:16:50 -0700 (PDT) Received: from localhost.localdomain ([149.135.10.35]) by smtp.gmail.com with ESMTPSA id q9-20020a638c49000000b0041cd5ddde6fsm13003327pgn.76.2022.10.21.00.16.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 00:16:49 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland Subject: [PATCH v2 09/36] target/sparc: Avoid TCGV_{LOW,HIGH} Date: Fri, 21 Oct 2022 17:15:22 +1000 Message-Id: <20221021071549.2398137-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221021071549.2398137-1-richard.henderson@linaro.org> References: <20221021071549.2398137-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102b.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" 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 --- 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 2cbbe2396a..7e9631f004 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); }