From 4f33afe0eec3c7ff27ccfbc9d5c73c6536932d39 Mon Sep 17 00:00:00 2001 From: TuxSH Date: Sun, 1 Mar 2020 15:16:12 +0000 Subject: [PATCH] vapours: fix MASKL, MASK2L to match Armv8 ARM (inclusive bit range) --- libraries/libvapours/include/vapours/types.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/libvapours/include/vapours/types.hpp b/libraries/libvapours/include/vapours/types.hpp index 0d4b4b6f0..d77ea21fe 100644 --- a/libraries/libvapours/include/vapours/types.hpp +++ b/libraries/libvapours/include/vapours/types.hpp @@ -69,12 +69,12 @@ typedef u32 Result; ///< Function error code result type. /// Creates a bitmask for bit range extraction. #ifndef MASK2 -#define MASK2(a,b) (MASK(a) & ~MASK(b)) +#define MASK2(a,b) (MASK((a) + 1) & ~MASK(b)) #endif /// Creates a bitmask for bit range extraction (long). #ifndef MASK2L -#define MASK2L(a,b) (MASKL(a) & ~MASKL(b)) +#define MASK2L(a,b) (MASKL((a) + 1) & ~MASKL(b)) #endif /// Marks a function as not returning, for the purposes of compiler optimization.