From 3034f5d2c49d80c9a054a6520225a9c27da37d7e Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Mon, 3 Mar 2025 06:59:09 +0100 Subject: [PATCH] declare lo and hi in div64_32() as volatile Fixes #2219 --- src/m_fixed.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/m_fixed.h b/src/m_fixed.h index bb6f2481..7859e3e2 100644 --- a/src/m_fixed.h +++ b/src/m_fixed.h @@ -38,8 +38,8 @@ { return a / b; } - int32_t lo = a; - int32_t hi = a >> 32; + volatile int32_t lo = a; + volatile int32_t hi = a >> 32; asm("idivl %[divisor]" : "+a" (lo), "+d" (hi) : [divisor] "r" (b)); return lo; }