aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Dennis-Jordan <phil@philjordan.eu>2024-12-09 21:36:26 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-03-06 15:46:18 +0100
commit40b839cb840ce032c8f048325b486d3284f1b68f (patch)
tree2baedc25e4ddc31003221c081347544605f78521
parent415aae543edad19eda8f66955dde386c7fd7c680 (diff)
downloadqemu-40b839cb840ce032c8f048325b486d3284f1b68f.zip
qemu-40b839cb840ce032c8f048325b486d3284f1b68f.tar.gz
qemu-40b839cb840ce032c8f048325b486d3284f1b68f.tar.bz2
target/i386/hvf: Variable type fixup in decoder
decode_bytes reads 1, 2, 4, or 8 bytes at a time. The destination variable should therefore be a uint64_t, not a target_ulong. Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu> Fixes: ff2de1668c9 ("i386: hvf: remove addr_t") Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20241209203629.74436-9-phil@philjordan.eu> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
-rw-r--r--target/i386/hvf/x86_decode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/i386/hvf/x86_decode.c b/target/i386/hvf/x86_decode.c
index d6d5894..5fea2dd 100644
--- a/target/i386/hvf/x86_decode.c
+++ b/target/i386/hvf/x86_decode.c
@@ -61,8 +61,8 @@ uint64_t sign(uint64_t val, int size)
static inline uint64_t decode_bytes(CPUX86State *env, struct x86_decode *decode,
int size)
{
- target_ulong val = 0;
-
+ uint64_t val = 0;
+
switch (size) {
case 1:
case 2: