From a60f3921b19325bb071167c67bf198f5e948a179 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Thu, 7 Jan 2021 00:39:46 +0100 Subject: [PATCH] :art: Allow correct operation on arm+USE_DOUBLE --- src/vm/vm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/vm/vm.c b/src/vm/vm.c index 89c4e8b5..b8f7d341 100644 --- a/src/vm/vm.c +++ b/src/vm/vm.c @@ -265,9 +265,11 @@ _Pragma(STRINGIFY(COMPILER diagnostic push)) \ _Pragma(STRINGIFY(COMPILER diagnostic ignored UNINITIALIZED) #define PRAGMA_POP() _Pragma(STRINGIFY(COMPILER diagnostic pop)) \ -#define VAL (*(m_uint*)(byte + SZ_INT)) -#define FVAL (*(m_float*)(byte + SZ_INT)) -#define VAL2 (*(m_uint*)(byte + SZ_INT*2)) +#define VMSZ (SZ_INT > SZ_FLOAT ? SZ_INT : SZ_FLOAT) + +#define VAL (*(m_uint*)(byte + VMSZ)) +#define FVAL (*(m_float*)(byte + VMSZ)) +#define VAL2 (*(m_uint*)(byte + SZ_INT + SZ_INT)) #define BRANCH_DISPATCH(check) \ if(check) SET_BYTE(VAL);\ -- 2.43.0