summary refs log tree commit diff stats
path: root/include/hw/registerfields.h
diff options
context:
space:
mode:
authorJoe Komlodi <joe.komlodi@xilinx.com>2021-07-20 11:31:43 -0700
committerAlistair Francis <alistair.francis@wdc.com>2021-09-01 11:59:12 +1000
commit2a4b4089305daf98a42f165111474ae3e92d5f1f (patch)
tree1a0352025de3ba1dbdebe84fe58b4398d8094ead /include/hw/registerfields.h
parent4d63ef20cf970901be1d6dd98743a4851e48f938 (diff)
downloadfocaccia-qemu-2a4b4089305daf98a42f165111474ae3e92d5f1f.tar.gz
focaccia-qemu-2a4b4089305daf98a42f165111474ae3e92d5f1f.zip
hw/registerfields: Use 64-bit bitfield for FIELD_DP64
If we have a field that's wider than 32-bits, we need a data type wide enough to
be able to create the bitfield used to deposit the value.

Signed-off-by: Joe Komlodi <joe.komlodi@xilinx.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 1626805903-162860-3-git-send-email-joe.komlodi@xilinx.com
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'include/hw/registerfields.h')
-rw-r--r--include/hw/registerfields.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/hw/registerfields.h b/include/hw/registerfields.h
index 9a03ac55e4..f2a3c9c41f 100644
--- a/include/hw/registerfields.h
+++ b/include/hw/registerfields.h
@@ -95,7 +95,7 @@
     _d; })
 #define FIELD_DP64(storage, reg, field, val) ({                           \
     struct {                                                              \
-        unsigned int v:R_ ## reg ## _ ## field ## _LENGTH;                \
+        uint64_t v:R_ ## reg ## _ ## field ## _LENGTH;                \
     } _v = { .v = val };                                                  \
     uint64_t _d;                                                          \
     _d = deposit64((storage), R_ ## reg ## _ ## field ## _SHIFT,          \