Add compiler memory barriers to NEON and NEON32 end helpers

This commit is contained in:
Andrea Mazzoleni 2026-08-25 09:58:53 +02:00
parent fd65dbd9ea
commit c192fe8982

View file

@ -520,6 +520,12 @@ static __always_inline void raid_neon_begin(void)
static __always_inline void raid_neon_end(void)
{
/*
* Compiler memory barrier to ensure memory operations are not
* reordered across the end of SIMD operations.
*/
asm volatile ("" : : : "memory");
/*
* Clobbers registers used in NEON asm operations.
*
@ -551,6 +557,12 @@ static __always_inline void raid_neon32_begin(void)
static __always_inline void raid_neon32_end(void)
{
/*
* Compiler memory barrier to ensure memory operations are not
* reordered across the end of SIMD operations.
*/
asm volatile ("" : : : "memory");
/*
* Clobbers registers used in AArch32 NEON asm operations.
*