From: Jérémie Astor Date: Wed, 6 Jan 2021 23:39:46 +0000 (+0100) Subject: :art: Allow correct operation on arm+USE_DOUBLE X-Git-Tag: nightly~1048 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=a60f3921b19325bb071167c67bf198f5e948a179;p=gwion.git :art: Allow correct operation on arm+USE_DOUBLE --- 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);\