From nobody Sat May 18 21:00:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1603369574; cv=none; d=zohomail.com; s=zohoarc; b=N7uJ5PVfqiCP4NQ1rDe5lagybDojt6wBW3gk9AjJDmSpjnae7SwAQWkTWfjRXSVhqRRrsaPCnK6O37XDbYmj7SYnKNGx4yi1em2Bh0eo+AXa3BZdV/UNLM3Lk77B8KL0wetreL5ZqZv7KKeuqHL+ABPFqho1/VfRORS1A++gi7Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603369574; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=qLPB1dB+Oklmp5dhgjQooB7fphLzdqsSaIVwxQvRp+M=; b=OVASTJ7c+nzesSXxUfl799ZP44AVKkw+IBWFpal8VXzc18xtpELGVGVor+geFwkdocRhH7brlzAjSJv8BdZ2z2Y4u85caEq4uWo4tpe0CMVVZ0iQwArBbbEYj24zsG9oYzsce5Ij8xMNT4E7SK1B15M8TgUuSZ8gA7gXmZEj/AU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1603369574237253.94051364286838; Thu, 22 Oct 2020 05:26:14 -0700 (PDT) Received: from localhost ([::1]:60294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVZfZ-0001ay-52 for importer@patchew.org; Thu, 22 Oct 2020 08:26:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41754) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVZOh-00026a-Ok for qemu-devel@nongnu.org; Thu, 22 Oct 2020 08:08:48 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:39176) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kVZOV-0000Zm-Co for qemu-devel@nongnu.org; Thu, 22 Oct 2020 08:08:47 -0400 Received: by mail-wm1-x343.google.com with SMTP id d3so1887105wma.4 for ; Thu, 22 Oct 2020 05:08:34 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id x81sm3406210wmb.11.2020.10.22.05.08.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 05:08:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=qLPB1dB+Oklmp5dhgjQooB7fphLzdqsSaIVwxQvRp+M=; b=KbNEXuCOgFL3tTz71uZbBvC1OR2lqbN0QcpMKadeHeRWZIWq/JTCwpuOA9I5m1IwSS mblPC6h1rGx/DJBqcK/ZW0FWa5mqdVF1+jRJoQxPyZWvBW04supVKea5SI40qBFbUMgv urdd7dfr0cU/ertF2YEhbVRj4aMqBVJnDZKMvNHoNDmmK1aQeD2sFMbSYyg65c6t/1P0 gN7HFtWWRD6ITmO4MdiOdVAfYUkmALCBu1aR5LkEaPZk9oWzb8r0ZkLXT06RAPILEqm3 rSp43X7yO7Sj0SxTY1iKfG4PddIB1NscMAzkRsnSUWmkjCcq/VOsx/lrP5j0yk9ZE/Sd T8OQ== 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:mime-version :content-transfer-encoding; bh=qLPB1dB+Oklmp5dhgjQooB7fphLzdqsSaIVwxQvRp+M=; b=qzuUTPFvjgGrn70EZvcOQNCUsV/YYIGcCfQbe/6qwcXsSS7r4iJzWi/jRZhZXi/krj AV1Xy7swISpAHpBvdLxfmuysxeuOceLzHpAAL5HSngY6G3SE00f1c4eoTnh80+ayEx9H xaX3+BQrHGjmrwqLli/+ZsNsYIw9p1MCNt4Y+bnE1nOROT/jZtMFaEy9J0G0kwNnKDEl /c2n+eEpHhxRTrYR7XZZl01xMltBFUTAmEsV+rwxlmB26lPCVsfYS3z8KjD5zmuKcUHq pJRn9eglbEkJnoZYa4KAWjZdk7kT4QfvSI4pRxPYGpMBKQnbvnFLt8DKvfIWAcjKaYI2 fdxg== X-Gm-Message-State: AOAM531Hp0/BeKPVK+SL5xLM7gtz2NZ4DED50iM70Ta7n1VhlICklxN/ HkJoPenYzeb1+xHFl4D1q1PuVbv2/GXlYA== X-Google-Smtp-Source: ABdhPJyWAOBkCwluaG2Ot0edeqAf0H0GjO3K8ziM7CC4S2epV3Yd692Ehtl6jl1SMHFevFoKVHWyWw== X-Received: by 2002:a1c:1946:: with SMTP id 67mr2215910wmz.15.1603368513039; Thu, 22 Oct 2020 05:08:33 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH] migration: Drop unused VMSTATE_FLOAT64 support Date: Thu, 22 Oct 2020 13:08:30 +0100 Message-Id: <20201022120830.5938-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 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=2a00:1450:4864:20::343; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x343.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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=unavailable 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: "Dr. David Alan Gilbert" , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Commit ef96e3ae9698d6 in January 2019 removed the last user of the VMSTATE_FLOAT64* macros. These were used by targets which defined their floating point register file as an array of 'float64'. We used to try to maintain a stricter distinction between 'float64' (a type for holding an integer representing an IEEE float) and 'uint64_t', including having a debug option for 'float64' being a struct and supposedly mandatory macros for converting between float64 and uint64_t. We no longer think that's a usefully strong distinction to draw and we allow ourselves to freely assume that float64 really is just a 64-bit integer type, so for new targets we would simply recommend use of the uint64_t type for a floating point register file. The float64 type remains as a useful way of documenting in the type signature of helper functions and the like that they expect to receive an IEEE float from the TCG generated code rather than an arbitrary integer. Since the VMSTATE_FLOAT64* macros have no remaining users and we don't recommend new code uses them, delete them. Signed-off-by: Peter Maydell Reviewed-by: Dr. David Alan Gilbert --- include/migration/vmstate.h | 13 ------------- migration/vmstate-types.c | 26 -------------------------- 2 files changed, 39 deletions(-) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index f68ed7db13c..4d71dc8fbaa 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -219,7 +219,6 @@ extern const VMStateInfo vmstate_info_uint64; #define VMS_NULLPTR_MARKER (0x30U) /* '0' */ extern const VMStateInfo vmstate_info_nullptr; =20 -extern const VMStateInfo vmstate_info_float64; extern const VMStateInfo vmstate_info_cpudouble; =20 extern const VMStateInfo vmstate_info_timer; @@ -997,12 +996,6 @@ extern const VMStateInfo vmstate_info_qlist; VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_uint64, uint64_t) =20 =20 -#define VMSTATE_FLOAT64_V(_f, _s, _v) \ - VMSTATE_SINGLE(_f, _s, _v, vmstate_info_float64, float64) - -#define VMSTATE_FLOAT64(_f, _s) \ - VMSTATE_FLOAT64_V(_f, _s, 0) - #define VMSTATE_TIMER_PTR_TEST(_f, _s, _test) \ VMSTATE_POINTER_TEST(_f, _s, _test, vmstate_info_timer, QEMUTimer *) =20 @@ -1114,12 +1107,6 @@ extern const VMStateInfo vmstate_info_qlist; #define VMSTATE_INT64_ARRAY(_f, _s, _n) \ VMSTATE_INT64_ARRAY_V(_f, _s, _n, 0) =20 -#define VMSTATE_FLOAT64_ARRAY_V(_f, _s, _n, _v) \ - VMSTATE_ARRAY(_f, _s, _n, _v, vmstate_info_float64, float64) - -#define VMSTATE_FLOAT64_ARRAY(_f, _s, _n) \ - VMSTATE_FLOAT64_ARRAY_V(_f, _s, _n, 0) - #define VMSTATE_CPUDOUBLE_ARRAY_V(_f, _s, _n, _v) \ VMSTATE_ARRAY(_f, _s, _n, _v, vmstate_info_cpudouble, CPU_DoubleU) =20 diff --git a/migration/vmstate-types.c b/migration/vmstate-types.c index 35e784c9d93..e22d41d73d6 100644 --- a/migration/vmstate-types.c +++ b/migration/vmstate-types.c @@ -420,32 +420,6 @@ const VMStateInfo vmstate_info_uint16_equal =3D { .put =3D put_uint16, }; =20 -/* floating point */ - -static int get_float64(QEMUFile *f, void *pv, size_t size, - const VMStateField *field) -{ - float64 *v =3D pv; - - *v =3D make_float64(qemu_get_be64(f)); - return 0; -} - -static int put_float64(QEMUFile *f, void *pv, size_t size, - const VMStateField *field, QJSON *vmdesc) -{ - uint64_t *v =3D pv; - - qemu_put_be64(f, float64_val(*v)); - return 0; -} - -const VMStateInfo vmstate_info_float64 =3D { - .name =3D "float64", - .get =3D get_float64, - .put =3D put_float64, -}; - /* CPU_DoubleU type */ =20 static int get_cpudouble(QEMUFile *f, void *pv, size_t size, --=20 2.20.1