#if defined( B2_CPU_ARM )
static inline void b2Pause( void )
{
__asm__ __volatile__( "isb\n" );
}
#elif defined( B2_CPU_X86_X64 )
#include <immintrin.h>
static inline void b2Pause( void )
{
_mm_pause();
}
#else
static inline void b2Pause( void )
{
// no threading will likely be used in web assembly
}
#endif
yields error C2065: '__asm__': undeclared identifier when compiling on Visual Studio 2022 targeting ARM64 platform.
I tried to solve replacing the __asm__ __volatile__( "isb\n" ); call with __dmb(_ARM64_BARRIER_SY); and it compiled, however the CrossPlatformTest failed, which might be due to my change:
Starting Box2D unit tests
======================================
test passed: MathTest
subtest passed: AABBTest
test passed: CollisionTest
subtest passed: MultithreadingTest
step = 300, hash = 0x769fe476
condition false: sleepStep == 310
subtest failed: CrossPlatformTest
test failed: DeterminismTest
In solver.c, the following code
yields
error C2065: '__asm__': undeclared identifier
when compiling on Visual Studio 2022 targeting ARM64 platform.I tried to solve replacing the
__asm__ __volatile__( "isb\n" );
call with__dmb(_ARM64_BARRIER_SY);
and it compiled, however theCrossPlatformTest
failed, which might be due to my change: