From patchwork Mon Feb 15 09:42:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 382903 Delivered-To: patch@linaro.org Received: by 2002:a02:c80e:0:0:0:0:0 with SMTP id p14csp939854jao; Mon, 15 Feb 2021 01:54:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJzoPjjdUuN8JaMZMZ1we+PxDfHuzt9UqKLci7HYyOp7bo+zBsDR2okP6Y4gnmt00/fikVH2 X-Received: by 2002:a25:bd85:: with SMTP id f5mr7547268ybh.183.1613382890735; Mon, 15 Feb 2021 01:54:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613382890; cv=none; d=google.com; s=arc-20160816; b=Ok3Xa86Di5iQNWXcYYTjyJ2QLQeWWfSUTTqHV3vwfon9IrtTGmf32/8+HoEYLmVdQI FKsAVr0pgqSwsnoK73YO5jrBfh/RVADIL5A5t4h/rQCQ1mXibA5W9Q34DKk4ERARBHok gCP33rp1BdU4uJhJ3SYADIBJj0cJi1FHOLk8hXmrf1NQjn+oeUmAjRQdHR/8LMw2hL+k WU7dPxKzcLzyT7ESLZNMK1v9h5Q/2jcT+ntTuBjVVx+3XLAh9DTqZvxEEUSC//iWsPMJ 8+Vu4iNWs+WBko08XMtsad/KlpYFhhY7ZVboKICnqbDdIe1jReO5ugPgrJt4+fmEYChy THtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=JH8erxJMdoMlYd+wD89DC22DAoNH9ScuyZZfWqH7tAw=; b=lQC61IOetAj7OF3r256kbcMRrJ8xhZXrdsfYq5Z8bsZeN9A2rzhwa9QhdsLXwzq4rX Nw5KtBwW8ONDAUlEBv4AQArCTxvze0GeJBVkfoVKMI4AuIhiCXjWrEVrgB+n36j0PJ0M Betm5YnltCXgGafmm9r5tG5QJRW7FiZg9dC/xTMUzH1Wp57ffx2YseIrdsSqF1vbh7+p FK/sCie5yNMBD7vQ/LGXOe0tiwPsF5Hb/WxEvqnPI+1WWikMoglihdMVPuiWj5vbE1tt LnI8NPLSQ3dZM9HEl04d3HH/RP6orAueVpL4oaZrzMhoNU4SfvLegtyj2rvCnG2MLQ7p pHkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=nLOJR2kX; 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=fail (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 o187si17134646ybg.224.2021.02.15.01.54.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Feb 2021 01:54:50 -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=fail header.i=@linaro.org header.s=google header.b=nLOJR2kX; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:52284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lBaag-0004Ub-7l for patch@linaro.org; Mon, 15 Feb 2021 04:54:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35432) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBaPE-00009L-79 for qemu-devel@nongnu.org; Mon, 15 Feb 2021 04:43:00 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:55209) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lBaPC-0004Pu-EQ for qemu-devel@nongnu.org; Mon, 15 Feb 2021 04:42:59 -0500 Received: by mail-wm1-x336.google.com with SMTP id w4so5598718wmi.4 for ; Mon, 15 Feb 2021 01:42:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JH8erxJMdoMlYd+wD89DC22DAoNH9ScuyZZfWqH7tAw=; b=nLOJR2kXQ51RRSEogMjsKBo716a3D5Bl17u13zCevWiH4otwIM+GLrVDfe6rcK8A5v pNtJhCa6MX2YdyHuBcYz8QwX5mr9jXVG4YSPHBlnMr0ECKIe1e77N0tHgfbh+sWCcOzM ujn61WNyLm9YUXcKmWYNdHT/7RbWqajXoXYCwgOZKeLSM3pc5f/EZsAsuAD1O5R4vacj MPwjNoihXl7ulEm3Y/KtDrPWIuSrE7uDDMLmHv/ZKes0QdnhDEy1uB/CwEeO544KGCdw IxmSAbHbwrbwRXKRC7tpMXkTCuY8CwN2zt4M2yaVdfYla/jyQqUPCDnfxDuqZRTC0dZ7 NZwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JH8erxJMdoMlYd+wD89DC22DAoNH9ScuyZZfWqH7tAw=; b=OQiLQoK0mrd0XFTg07Of18rp2RP91KsIxHsUHqPvAQImblQI8BEVqqnoO2VVqxMRyX c5QmBVc0mtBhEJldLa/Idn/+cfl153gRAlput7BP/y7FyZ+frtH4Kv9XFyYJP2AAes7Z DNSR4a4x+CG4+NpHS4gcgZipYR+BO2PuLIh3KUT3LMs5TdjJ3Uh0zmSrd9fasHkS9zkG nkFSgyTTI1cCdfDBpGADk4Ml1kcB+hfFCS576WRqkgsdeQX6HXCV6kVUUg0A9mzOcKc8 7XU7FlxiCK7gtsLLJBQZqElOXE9WDmzUwzqsRRJ01IVikLO1iSniIiFA35L76aUAXL3v XheA== X-Gm-Message-State: AOAM532/ODi5FHWFdLlfKQAvr3uWY5y6fmzlYErfkjLd7SduJreIqYNR IVvvgQWZnwdHMXIX+2xHWYAenJiccZ0ZuINx X-Received: by 2002:a1c:7f93:: with SMTP id a141mr13742312wmd.105.1613382177130; Mon, 15 Feb 2021 01:42:57 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id p12sm22169327wmq.1.2021.02.15.01.42.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Feb 2021 01:42:52 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 015CD1FF9A; Mon, 15 Feb 2021 09:42:46 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 11/15] target/m68k: Drop use of gdb_get_float64() and ldfq_p() Date: Mon, 15 Feb 2021 09:42:40 +0000 Message-Id: <20210215094244.12716-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210215094244.12716-1-alex.bennee@linaro.org> References: <20210215094244.12716-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x336.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, Laurent Vivier Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell We used to make a distinction between 'float64'/'float32' types and the 'uint64_t'/'uint32_t' types, requiring special conversion operations to go between them. We've now dropped this distinction as unnecessary, and the 'float*' types remain primarily for documentation purposes when used in places like the function prototypes of TCG helper functions. This means that there's no need for a special gdb_get_float64() function to write a float64 value to the GDB protocol buffer; we can just use gdb_get_reg64(). Similarly, for reading a value out of the GDB buffer into a float64 we can use ldq_p() and need not use ldfq_p(). Signed-off-by: Peter Maydell Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Acked-by: Laurent Vivier Message-Id: <20210208113428.7181-3-peter.maydell@linaro.org> Message-Id: <20210211122750.22645-12-alex.bennee@linaro.org> -- 2.20.1 diff --git a/target/m68k/helper.c b/target/m68k/helper.c index 4185ca94ce..137a3e1a3d 100644 --- a/target/m68k/helper.c +++ b/target/m68k/helper.c @@ -72,8 +72,7 @@ static int cf_fpu_gdb_get_reg(CPUM68KState *env, GByteArray *mem_buf, int n) { if (n < 8) { float_status s; - return gdb_get_float64(mem_buf, - floatx80_to_float64(env->fregs[n].d, &s)); + return gdb_get_reg64(mem_buf, floatx80_to_float64(env->fregs[n].d, &s)); } switch (n) { case 8: /* fpcontrol */ @@ -90,7 +89,7 @@ static int cf_fpu_gdb_set_reg(CPUM68KState *env, uint8_t *mem_buf, int n) { if (n < 8) { float_status s; - env->fregs[n].d = float64_to_floatx80(ldfq_p(mem_buf), &s); + env->fregs[n].d = float64_to_floatx80(ldq_p(mem_buf), &s); return 8; } switch (n) {