From patchwork Fri Feb 2 05:50:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 769185 Delivered-To: patch@linaro.org Received: by 2002:adf:9bca:0:b0:33a:e5bd:fedd with SMTP id e10csp755404wrc; Thu, 1 Feb 2024 21:59:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IFUmkSzR7y/8te9uvTUv35Bfuf88cVbDpsu53ZULlPOEsBndbOTm7mQ7gnjobrYb/AI42xh X-Received: by 2002:a05:622a:134a:b0:42c:514:7f11 with SMTP id w10-20020a05622a134a00b0042c05147f11mr442947qtk.3.1706853543990; Thu, 01 Feb 2024 21:59:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706853543; cv=none; d=google.com; s=arc-20160816; b=YUIKZbc7VWlqIXQOran4arJg1HfxNlOk5KQ3Pa2ieIrV5ET+SHgQ1QpbgaxOV1v3qb WqmWDZWwriIo1LQZhZtl4McfrJGR5EeAxffJjr61PINzJ2UhTrS/ZhKBM+JG0uH80cUz Lh7uDAMcElGpPckt3GLZQcH08i2Cp54r48XpGRM5zP/SbJ/dGSAahkUn4ksTGzt3rxO4 ISgl+6jQYZiZ4tIDuv5VBxqr3YEKFE93FPIjvLQztN8q+RRchK1xDzv+kNEgIzePYVGY DbiXF6g2gizQ5Vn2oE7ktE57I8/xyoYWeekoww3iRhOg1/W6y75k7mu0EZm8PJ0IFqNE kwyA== 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=Qq++rIr45iSkpBC0Q6O8O5vjzYxl8Bl9TQVIq1ySmoA=; fh=wukLTE2RiGKWyobAdw1zhzTU1g+6lQFOgotwVxxvxEM=; b=s7WIxrxFF5ve/WTOkNbo31Uaue+HC/QRXjyVz22MDvyGhsiAr/R8dtEP53ClB3jlaz KGKh1a3eLJ9twA8HB3dcDHen/O7TsLkEED33Ig4QJYJO5w2rje477iYT0Y/9fht3JF7L 9Dq1quBZdc/GQ6tHEJT+Srysg/59aQUvkH6McyoJw4pKH614bn3z7pzNAdRyDJoyXvde TJyUYY85/UlFtpeFUeLKyXoDgeo1WvfmRxgWUF1Q1Oef/hFHselxV3jqJDbF/UOWjdVG h7t+wm8GM+11+ZJcU5AP9MtBm+N1+KUrPTTomlYiPeZlbw1t7j8cwWmkE4/g7k9XRhxJ 5fkg==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CYN4p7rX; 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 X-Forwarded-Encrypted: i=0; AJvYcCWz4PBa6D9iSWrYT2jG7tGIM++j6lI7w86N/Rr8Zb4SURDK9l9qjYVTPqB5GnUtlsUlQFTB0ftKS/SSofC4X9GK Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o8-20020a05622a008800b0042bf2f63729si1206689qtw.415.2024.02.01.21.59.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 01 Feb 2024 21:59:03 -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=CYN4p7rX; 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 1rVmWV-0006dx-0a; Fri, 02 Feb 2024 00:55:35 -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 1rVmWS-0006LU-6t for qemu-devel@nongnu.org; Fri, 02 Feb 2024 00:55:32 -0500 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rVmWK-00030v-Dj for qemu-devel@nongnu.org; Fri, 02 Feb 2024 00:55:31 -0500 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1d91397bd22so14198135ad.0 for ; Thu, 01 Feb 2024 21:55:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706853323; x=1707458123; darn=nongnu.org; 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=Qq++rIr45iSkpBC0Q6O8O5vjzYxl8Bl9TQVIq1ySmoA=; b=CYN4p7rX+4PZaLtVcys8sEdVrWfCVIGP/+X1dISu3th52EUxiY95po8sLltaTRlBKq 7a6YE6L/eYbU7f6V0fkTgZdYg8oZgIP1+/HRhi8OXON4Gd4gi7Srex0/ItEt873fUJw4 svRJocT7bXnUUTiyhrH6C42estTfjBr79vl4OEKofwCkMGyaswgOOvr41QT+Qbu/Vsfb Wju5YrZWygscsDV0Gua+Qs/ySMeFQmANwegUQqPOLMh7KogaQz/QhWtsH+bLyQtggnEQ x2Ll+3u85vRUKpFy81XiG3DO8qAaWrUXPS7aM5oF0yNKRmM7RSwNt9eTBEJUYfY16HlE /rRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706853323; x=1707458123; 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=Qq++rIr45iSkpBC0Q6O8O5vjzYxl8Bl9TQVIq1ySmoA=; b=FXFeHl/ZpRTvYvI8yMMjdfsTfUyRi72h5MKJlvt+5szVKxzQFTn0BgT1SLtjrfiGGB 5exbCd7sZ27pFNtiTpszQlmUrhouy0zzgcK4oRT3tycmve8XfyMVCwVxG3A57DoNRigh uz5df/+Kryi2UTB0l68BPzR9tHftLyjPN9Ywj0Vl5oa6cWO0KFGGlbP6d6Anu3LyaIIn e/PrroPdKDDaBqaNcFXvDu3T4SAzCCSioEAHnlRynAIi7fHIwYPl8/tqe2FE8nYGIHDu uZBvESll3hTZqbD+g96JvD90lWRhbkMD8OTh2oNT+tf8IC2PERGDhCz6HvQKrgxsRCiI pcjw== X-Gm-Message-State: AOJu0Yy2wySlrnhhqBNDyDtyPRSw44VuyaHOErssSkqFVJvXdDNcxOd6 4n6x9Ld1KzNzyUH7tyykeiq7HBvg+VlbH5ckjU2H/79qlsx/jt56wskDJVv2E63PJpdjgKFpM2O iclk= X-Received: by 2002:a17:903:2303:b0:1d9:6cb5:a818 with SMTP id d3-20020a170903230300b001d96cb5a818mr1648261plh.30.1706853323203; Thu, 01 Feb 2024 21:55:23 -0800 (PST) Received: from stoup.. ([103.210.27.218]) by smtp.gmail.com with ESMTPSA id je5-20020a170903264500b001d8a80cbb15sm752059plb.238.2024.02.01.21.55.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 21:55:22 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland Subject: [PULL 46/57] target/sparc: Use i128 for FsTOq, FiTOq Date: Fri, 2 Feb 2024 15:50:25 +1000 Message-Id: <20240202055036.684176-48-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240202055036.684176-1-richard.henderson@linaro.org> References: <20240202055036.684176-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x632.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, T_SCC_BODY_TEXT_LINE=-0.01 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 Signed-off-by: Richard Henderson Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Message-Id: <20231103173841.33651-12-richard.henderson@linaro.org> --- target/sparc/helper.h | 4 ++-- target/sparc/fop_helper.c | 8 ++++---- target/sparc/translate.c | 9 +++++---- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/target/sparc/helper.h b/target/sparc/helper.h index 7caae9a441..5e93342583 100644 --- a/target/sparc/helper.h +++ b/target/sparc/helper.h @@ -87,7 +87,7 @@ DEF_HELPER_FLAGS_3(fsmuld, TCG_CALL_NO_RWG, f64, env, f32, f32) DEF_HELPER_FLAGS_3(fdmulq, TCG_CALL_NO_RWG, void, env, f64, f64) DEF_HELPER_FLAGS_2(fitod, TCG_CALL_NO_RWG_SE, f64, env, s32) -DEF_HELPER_FLAGS_2(fitoq, TCG_CALL_NO_RWG, void, env, s32) +DEF_HELPER_FLAGS_2(fitoq, TCG_CALL_NO_RWG, i128, env, s32) DEF_HELPER_FLAGS_2(fitos, TCG_CALL_NO_RWG, f32, env, s32) @@ -99,7 +99,7 @@ DEF_HELPER_FLAGS_2(fxtoq, TCG_CALL_NO_RWG, void, env, s64) DEF_HELPER_FLAGS_2(fdtos, TCG_CALL_NO_RWG, f32, env, f64) DEF_HELPER_FLAGS_2(fstod, TCG_CALL_NO_RWG, f64, env, f32) DEF_HELPER_FLAGS_2(fqtos, TCG_CALL_NO_RWG, f32, env, i128) -DEF_HELPER_FLAGS_2(fstoq, TCG_CALL_NO_RWG, void, env, f32) +DEF_HELPER_FLAGS_2(fstoq, TCG_CALL_NO_RWG, i128, env, f32) DEF_HELPER_FLAGS_2(fqtod, TCG_CALL_NO_RWG, f64, env, i128) DEF_HELPER_FLAGS_2(fdtoq, TCG_CALL_NO_RWG, void, env, f64) DEF_HELPER_FLAGS_2(fstoi, TCG_CALL_NO_RWG, s32, env, f32) diff --git a/target/sparc/fop_helper.c b/target/sparc/fop_helper.c index faf75e651f..c7dc835d28 100644 --- a/target/sparc/fop_helper.c +++ b/target/sparc/fop_helper.c @@ -147,9 +147,9 @@ float64 helper_fitod(CPUSPARCState *env, int32_t src) return int32_to_float64(src, &env->fp_status); } -void helper_fitoq(CPUSPARCState *env, int32_t src) +Int128 helper_fitoq(CPUSPARCState *env, int32_t src) { - QT0 = int32_to_float128(src, &env->fp_status); + return f128_ret(int32_to_float128(src, &env->fp_status)); } #ifdef TARGET_SPARC64 @@ -185,9 +185,9 @@ float32 helper_fqtos(CPUSPARCState *env, Int128 src) return float128_to_float32(f128_in(src), &env->fp_status); } -void helper_fstoq(CPUSPARCState *env, float32 src) +Int128 helper_fstoq(CPUSPARCState *env, float32 src) { - QT0 = float32_to_float128(src, &env->fp_status); + return f128_ret(float32_to_float128(src, &env->fp_status)); } float64 helper_fqtod(CPUSPARCState *env, Int128 src) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 6c003eed7c..6522a9b0c8 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -4726,9 +4726,10 @@ TRANS(FqTOd, ALL, do_env_dq, a, gen_helper_fqtod) TRANS(FqTOx, 64, do_env_dq, a, gen_helper_fqtox) static bool do_env_qf(DisasContext *dc, arg_r_r *a, - void (*func)(TCGv_env, TCGv_i32)) + void (*func)(TCGv_i128, TCGv_env, TCGv_i32)) { TCGv_i32 src; + TCGv_i128 dst; if (gen_trap_ifnofpu(dc)) { return true; @@ -4739,9 +4740,9 @@ static bool do_env_qf(DisasContext *dc, arg_r_r *a, gen_op_clear_ieee_excp_and_FTT(); src = gen_load_fpr_F(dc, a->rs); - func(tcg_env, src); - gen_op_store_QT0_fpr(QFPREG(a->rd)); - gen_update_fprs_dirty(dc, QFPREG(a->rd)); + dst = tcg_temp_new_i128(); + func(dst, tcg_env, src); + gen_store_fpr_Q(dc, a->rd, dst); return advance_pc(dc); }