Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to build for Windows Desktop ARM and ARM64 #249

Closed
WenceyWang opened this issue Jul 16, 2020 · 2 comments · Fixed by #250
Closed

Fail to build for Windows Desktop ARM and ARM64 #249

WenceyWang opened this issue Jul 16, 2020 · 2 comments · Fixed by #250

Comments

@WenceyWang
Copy link
Contributor

Windows Desktop ARM and ARM64 failed to build for _mm_mfence() not aviliable.

_mm_mfence();
calls _mm_mfence(); which only work on x86 and
# if BX_PLATFORM_WINRT
only include MemoryBarrier() for WinRT.

We should let Windows build call MemoryBarrier() instead assume we have x86.

@bkaradzic
Copy link
Owner

Try:

	inline void memoryBarrier()
	{
#if BX_COMPILER_MSVC
#   if BX_CPU_ARM
		MemoryBarrier();
#   else
		_mm_mfence();
#   endif // BX_CPU_ARM
#else
		__sync_synchronize();
#endif // BX_COMPILER
	}

@WenceyWang
Copy link
Contributor Author

I think we should use (!BX_CPU_X86) for this scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants