On 2/8/25 18:53, Joelle van Dyne wrote:
According to the ARM manual, when SSE=1 the data item must be sign
extended.
Signed-off-by: Joelle van Dyne <j...@getutm.app>
---
target/arm/hvf/hvf.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c
index 0afd96018e..28886970c9 100644
--- a/target/arm/hvf/hvf.c
+++ b/target/arm/hvf/hvf.c
@@ -1876,6 +1876,11 @@ static void hvf_sync_vtimer(CPUState *cpu)
}
}
+static inline uint64_t sign_extend(uint64_t value, uint32_t bits)
+{
+ return (uint64_t)((int64_t)(value << (64 - bits)) >> (64 - bits));
+}
This is sextract64(value, 0, bits).
r~