summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
-rw-r--r--build.cmd2
-rw-r--r--src/gc/env/gcenv.base.h12
3 files changed, 14 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bea179e91d..8d7b9cc799 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -403,10 +403,10 @@ if (WIN32)
add_compile_options($<$<OR:$<CONFIG:Release>,$<CONFIG:Relwithdebinfo>>:/GL>)
add_compile_options($<$<OR:$<OR:$<CONFIG:Release>,$<CONFIG:Relwithdebinfo>>,$<CONFIG:Checked>>:/O1>)
- if (IS_64BIT_BUILD EQUAL 1)
+ if (CLR_CMAKE_PLATFORM_ARCH_AMD64)
# The generator expression in the following command means that the /homeparams option is added only for debug builds
add_compile_options($<$<CONFIG:Debug>:/homeparams>) # Force parameters passed in registers to be written to the stack
- endif (IS_64BIT_BUILD EQUAL 1)
+ endif (CLR_CMAKE_PLATFORM_ARCH_AMD64)
# Linker flags
#
diff --git a/build.cmd b/build.cmd
index 5f892afe55..02069639fe 100644
--- a/build.cmd
+++ b/build.cmd
@@ -165,7 +165,7 @@ if /i "%__BuildArch%" == "arm64" (
REM TODO, remove once the toolset is open.
if /i "%__BuildArch%" == "arm64" set PATH=%PATH%;%__ToolsetDir%\cpp\bin
-if /i "%__BuildArch%" == "arm64" set LIB=%__ToolsetDir%\OS\lib
+if /i "%__BuildArch%" == "arm64" set LIB=%__ToolsetDir%\OS\lib;%__ToolsetDir%\cpp\lib
if /i "%__BuildArch%" == "arm64" set INCLUDE=%__ToolsetDir%\cpp\inc;%__ToolsetDir%\OS\inc\Windows;%__ToolsetDir%\OS\inc\Windows\crt;%__ToolsetDir%\cpp\inc\vc;%__ToolsetDir%\OS\inc\win8;
if /i "%__BuildArch%" == "arm64" goto GenVSSolution
diff --git a/src/gc/env/gcenv.base.h b/src/gc/env/gcenv.base.h
index 628a90cc88..b7dbd84c5c 100644
--- a/src/gc/env/gcenv.base.h
+++ b/src/gc/env/gcenv.base.h
@@ -128,7 +128,17 @@ typedef DWORD (WINAPI *PTHREAD_START_ROUTINE)(void* lpThreadParameter);
extern "C" void __emit(const unsigned __int32 opcode);
#pragma intrinsic(__emit)
#define MemoryBarrier() { __emit(0xF3BF); __emit(0x8F5F); }
-
+
+ #elif defined(_ARM64_)
+
+ extern "C" void __yield(void);
+ #pragma intrinsic(__yield)
+ __forceinline void YieldProcessor() { __yield();}
+
+ extern "C" void __dmb(const unsigned __int32 _Type);
+ #pragma intrinsic(__dmb)
+ #define MemoryBarrier() { __dmb(_ARM64_BARRIER_SY); }
+
#elif defined(_AMD64_)
extern "C" VOID