From nobody Tue Nov 26 14:42:46 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1706853518; cv=none; d=zohomail.com; s=zohoarc; b=ed1XgBmBEP4GBkOawbOyMyaCFa0si11A91/zYnQYRzLN0FBFtkcGElqTAVZwzJydvzpPqLfCNjmxY2V1oz0yCR5QRcV9MPxqIe5avhlNrOg7GFBTGg8sMaXdsmYNl5Xfmb33FRe3vRgcgINW0UbrLE+z9m+n9fA73sHlkvEOODo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706853518; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=1eKYzACMAdv41jwhWgL5ua1c7uVrjKcVx/en63NM27s=; b=NGU5aE6+i0lBnjttgUm/5q/nTuCAEdkIfjnqzV5STj61wk7uIVIUL84tb/cNOQpDr/gntvYRSsjhmOk6lumWJCvIDtbVpHLAO4TYknHuDcqoZMD3Y5NPt4FeC8NTBFQtAHAwGoZoFqcMwPLht8TOfeNlJaQrdvQ4rcY0PRsWJNg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1706853518908815.0106086722772; Thu, 1 Feb 2024 21:58:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rVmWS-0006OR-S0; Fri, 02 Feb 2024 00:55:32 -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 1rVmWQ-0006Cm-DO for qemu-devel@nongnu.org; Fri, 02 Feb 2024 00:55:30 -0500 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rVmWO-00032B-Ld for qemu-devel@nongnu.org; Fri, 02 Feb 2024 00:55:30 -0500 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1d7232dcb3eso13086465ad.2 for ; Thu, 01 Feb 2024 21:55:28 -0800 (PST) Received: from stoup.. ([103.210.27.218]) by smtp.gmail.com with ESMTPSA id je5-20020a170903264500b001d8a80cbb15sm752059plb.238.2024.02.01.21.55.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 21:55:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706853327; x=1707458127; 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=1eKYzACMAdv41jwhWgL5ua1c7uVrjKcVx/en63NM27s=; b=Un+2cmmKr7DLm119jEA9RAd0FY1OU15gB3k0E05KG2j/Sqadpv7IkNcSgsS0ZTnPg4 SIZ63wulz09xFNC6BQ02Ppuw8v6bJr2AOU95FNJ+ly10ongHb//NpHlB0dHRV+tkRCQp Sadc3uT2tPtt2G2T0zywcO0Edb5jsiDv43LD2xO3MvjrNHbAOJEVIL0mCi+o3E68BJhq EnvrESgmdv5t7nhhojA+VLQ5q6D1snBRmt/ePmTWICbo7rDTwUWnxy5ERUzVIqG4aBsX PGc0uS1QADwKDamxHr7ZV2lgNYZ5PpcATi08djbvzSq5SeQYtN78ZG8uKl9NQNgp3fZU IEGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706853327; x=1707458127; 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=1eKYzACMAdv41jwhWgL5ua1c7uVrjKcVx/en63NM27s=; b=UjRga4C14WczxeyAusZ9hpDsDR0EKUym9rKwnMlv6KDGUOsTK6prPbW9UW9t9Dr1ip tCdDiNq6L1bPhU5DWKOl5ajUQTZPhITZxra8xFvsNjao0BOsV3h3lg5X5NoxIFVIcWZS CbuOL1Ddhy/pJ4v9gb+PYEuovNnov0AttdLEslgN9mrKpCu7miFo6OrNz7HMb9YwKDGA xG+5WEXtCMKNAM3cTHy2CAK2+picd5YAyjejlH+H2X3ltebMNDUGLdLbcQRYbMEE0z4g qGObSR0ugXz4r98FfoGlmQz1rsHoAUm255p0YFcfXxQCZMiRN9uA+aA/pceC/DGA0ZdO Ny0w== X-Gm-Message-State: AOJu0YxWzJYnTYpsDW5lcwGFk4W1DfezD599iGwFnPeaoaYoYmyW4MFd BA2u42wk8ktjIXBUvLi2lvZultMyeLojulbTIq05rNZ7EHmuvRpOnGpJg9OassXkU9eDcQ+TRRc C78w= X-Google-Smtp-Source: AGHT+IGzNatTW+QEMboGjPdHjMPcN8h17fQi260tb1Yo3HaVNnO6m4pOXP9cbhcfWm8YjbHZuJhMVw== X-Received: by 2002:a17:902:ef92:b0:1d9:2cda:afe5 with SMTP id iz18-20020a170902ef9200b001d92cdaafe5mr1164021plb.31.1706853327222; Thu, 01 Feb 2024 21:55:27 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland Subject: [PULL 48/57] target/sparc: Use i128 for Fdmulq Date: Fri, 2 Feb 2024 15:50:27 +1000 Message-Id: <20240202055036.684176-50-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1706853519750100007 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Message-Id: <20231103173841.33651-14-richard.henderson@linaro.org> --- target/sparc/helper.h | 2 +- target/sparc/fop_helper.c | 8 ++++---- target/sparc/translate.c | 15 ++++----------- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/target/sparc/helper.h b/target/sparc/helper.h index 20f67f89b0..f7aeb31169 100644 --- a/target/sparc/helper.h +++ b/target/sparc/helper.h @@ -84,7 +84,7 @@ DEF_HELPER_FLAGS_3(fmuls, TCG_CALL_NO_RWG, f32, env, f32,= f32) DEF_HELPER_FLAGS_3(fdivs, TCG_CALL_NO_RWG, f32, env, f32, f32) =20 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_3(fdmulq, TCG_CALL_NO_RWG, i128, env, f64, f64) =20 DEF_HELPER_FLAGS_2(fitod, TCG_CALL_NO_RWG_SE, f64, env, s32) DEF_HELPER_FLAGS_2(fitoq, TCG_CALL_NO_RWG, i128, env, s32) diff --git a/target/sparc/fop_helper.c b/target/sparc/fop_helper.c index 9a0110e201..cd9b212597 100644 --- a/target/sparc/fop_helper.c +++ b/target/sparc/fop_helper.c @@ -129,11 +129,11 @@ float64 helper_fsmuld(CPUSPARCState *env, float32 src= 1, float32 src2) &env->fp_status); } =20 -void helper_fdmulq(CPUSPARCState *env, float64 src1, float64 src2) +Int128 helper_fdmulq(CPUSPARCState *env, float64 src1, float64 src2) { - QT0 =3D float128_mul(float64_to_float128(src1, &env->fp_status), - float64_to_float128(src2, &env->fp_status), - &env->fp_status); + return f128_ret(float128_mul(float64_to_float128(src1, &env->fp_status= ), + float64_to_float128(src2, &env->fp_status= ), + &env->fp_status)); } =20 /* Integer to float conversion. */ diff --git a/target/sparc/translate.c b/target/sparc/translate.c index d478a2fcd0..d12de5ae5c 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -276,14 +276,6 @@ static void gen_store_fpr_Q(DisasContext *dc, unsigned= int dst, TCGv_i128 v) gen_update_fprs_dirty(dc, dst); } =20 -static void gen_op_store_QT0_fpr(unsigned int dst) -{ - tcg_gen_ld_i64(cpu_fpr[dst / 2], tcg_env, offsetof(CPUSPARCState, qt0)= + - offsetof(CPU_QuadU, ll.upper)); - tcg_gen_ld_i64(cpu_fpr[dst/2 + 1], tcg_env, offsetof(CPUSPARCState, qt= 0) + - offsetof(CPU_QuadU, ll.lower)); -} - /* moves */ #ifdef CONFIG_USER_ONLY #define supervisor(dc) 0 @@ -4992,6 +4984,7 @@ TRANS(FDIVq, ALL, do_env_qqq, a, gen_helper_fdivq) static bool trans_FdMULq(DisasContext *dc, arg_r_r_r *a) { TCGv_i64 src1, src2; + TCGv_i128 dst; =20 if (gen_trap_ifnofpu(dc)) { return true; @@ -5003,10 +4996,10 @@ static bool trans_FdMULq(DisasContext *dc, arg_r_r_= r *a) gen_op_clear_ieee_excp_and_FTT(); src1 =3D gen_load_fpr_D(dc, a->rs1); src2 =3D gen_load_fpr_D(dc, a->rs2); - gen_helper_fdmulq(tcg_env, src1, src2); + dst =3D tcg_temp_new_i128(); + gen_helper_fdmulq(dst, tcg_env, src1, src2); gen_helper_check_ieee_exceptions(cpu_fsr, tcg_env); - gen_op_store_QT0_fpr(QFPREG(a->rd)); - gen_update_fprs_dirty(dc, QFPREG(a->rd)); + gen_store_fpr_Q(dc, a->rd, dst); return advance_pc(dc); } =20 --=20 2.34.1