qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
To: qemu-devel@nongnu.org, yubihong@huawei.com, peterx@redhat.com,
	peter.maydell@linaro.org
Cc: quintela@redhat.com
Subject: [PULL 01/16] migration: Drop unused VMSTATE_FLOAT64 support
Date: Mon, 26 Oct 2020 16:19:37 +0000	[thread overview]
Message-ID: <20201026161952.149188-2-dgilbert@redhat.com> (raw)
In-Reply-To: <20201026161952.149188-1-dgilbert@redhat.com>

From: Peter Maydell <peter.maydell@linaro.org>

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 <peter.maydell@linaro.org>
Message-Id: <20201022120830.5938-1-peter.maydell@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 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 f68ed7db13..4d71dc8fba 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;
 
-extern const VMStateInfo vmstate_info_float64;
 extern const VMStateInfo vmstate_info_cpudouble;
 
 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)
 
 
-#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 *)
 
@@ -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)
 
-#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)
 
diff --git a/migration/vmstate-types.c b/migration/vmstate-types.c
index 35e784c9d9..e22d41d73d 100644
--- a/migration/vmstate-types.c
+++ b/migration/vmstate-types.c
@@ -420,32 +420,6 @@ const VMStateInfo vmstate_info_uint16_equal = {
     .put  = put_uint16,
 };
 
-/* floating point */
-
-static int get_float64(QEMUFile *f, void *pv, size_t size,
-                       const VMStateField *field)
-{
-    float64 *v = pv;
-
-    *v = 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 = pv;
-
-    qemu_put_be64(f, float64_val(*v));
-    return 0;
-}
-
-const VMStateInfo vmstate_info_float64 = {
-    .name = "float64",
-    .get  = get_float64,
-    .put  = put_float64,
-};
-
 /* CPU_DoubleU type */
 
 static int get_cpudouble(QEMUFile *f, void *pv, size_t size,
-- 
2.28.0



  reply	other threads:[~2020-10-26 16:21 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26 16:19 [PULL 00/16] migration queue Dr. David Alan Gilbert (git)
2020-10-26 16:19 ` Dr. David Alan Gilbert (git) [this message]
2020-10-26 16:19 ` [PULL 02/16] migration: Do not use C99 // comments Dr. David Alan Gilbert (git)
2020-10-26 16:19 ` [PULL 03/16] migration: Don't use '#' flag of printf format Dr. David Alan Gilbert (git)
2020-10-26 16:19 ` [PULL 04/16] migration: Add spaces around operator Dr. David Alan Gilbert (git)
2020-10-26 16:19 ` [PULL 05/16] migration: Open brace '{' following struct go on the same line Dr. David Alan Gilbert (git)
2020-10-26 16:19 ` [PULL 06/16] migration: Add braces {} for if statement Dr. David Alan Gilbert (git)
2020-10-26 16:19 ` [PULL 07/16] migration: Do not initialise statics and globals to 0 or NULL Dr. David Alan Gilbert (git)
2020-10-26 16:19 ` [PULL 08/16] migration: Open brace '{' following function declarations go on the next line Dr. David Alan Gilbert (git)
2020-10-26 16:19 ` [PULL 09/16] migration: Delete redundant spaces Dr. David Alan Gilbert (git)
2020-10-26 16:19 ` [PULL 10/16] migration: using trace_ to replace DPRINTF Dr. David Alan Gilbert (git)
2020-10-26 16:19 ` [PULL 11/16] migration: Pass incoming state into qemu_ufd_copy_ioctl() Dr. David Alan Gilbert (git)
2020-10-26 16:19 ` [PULL 12/16] migration: Introduce migrate_send_rp_message_req_pages() Dr. David Alan Gilbert (git)
2020-10-26 16:19 ` [PULL 13/16] migration: Maintain postcopy faulted addresses Dr. David Alan Gilbert (git)
2020-10-26 16:19 ` [PULL 14/16] migration: Sync requested pages after postcopy recovery Dr. David Alan Gilbert (git)
2020-10-26 16:19 ` [PULL 15/16] migration/postcopy: Release fd before going into 'postcopy-pause' Dr. David Alan Gilbert (git)
2020-10-26 16:19 ` [PULL 16/16] migration-test: Only hide error if !QTEST_LOG Dr. David Alan Gilbert (git)
2020-10-26 16:39 ` [PULL 00/16] migration queue no-reply
2020-10-26 16:52   ` Dr. David Alan Gilbert
2020-10-27 11:28 ` Peter Maydell
2020-10-31 16:12 ` Christian Schoenebeck
2020-10-31 17:26   ` Peter Maydell
2020-10-31 17:46     ` Peter Xu
2020-10-31 19:10       ` Christian Schoenebeck
2020-11-01 10:17         ` Christian Schoenebeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201026161952.149188-2-dgilbert@redhat.com \
    --to=dgilbert@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=yubihong@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).