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

Initial support for Hot Reload on ARM #51902

Merged
merged 2 commits into from
Apr 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/coreclr/clrdefinitions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ if(CLR_CMAKE_HOST_WIN32)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif(CLR_CMAKE_HOST_WIN32)

# Only enable edit and continue on x86 and x64, exclude arm & arm64
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:CROSSGEN_COMPONENT>>>:EnC_SUPPORTED>)
if(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:CROSSGEN_COMPONENT>>>:EnC_SUPPORTED>)
if(CLR_CMAKE_TARGET_WIN32)
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:CROSSGEN_COMPONENT>>>:FEATURE_ENC_SUPPORTED>)
endif(CLR_CMAKE_TARGET_WIN32)
Expand Down
4 changes: 4 additions & 0 deletions src/coreclr/vm/encee.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,9 @@ HRESULT EditAndContinueModule::ResumeInUpdatedFunction(
SIZE_T newILOffset,
CONTEXT *pOrigContext)
{
#if defined(TARGET_ARM64) || defined(TARGET_ARM)
return E_NOTIMPL;
#else
LOG((LF_ENC, LL_INFO100, "EnCModule::ResumeInUpdatedFunction for %s at IL offset 0x%x, ",
pMD->m_pszDebugMethodName, newILOffset));

Expand Down Expand Up @@ -694,6 +697,7 @@ HRESULT EditAndContinueModule::ResumeInUpdatedFunction(
// Win32 handlers on the stack so cannot ever return from this function.
EEPOLICY_HANDLE_FATAL_ERROR(CORDBG_E_ENC_INTERNAL_ERROR);
return hr;
#endif // #if define(TARGET_ARM64) || defined(TARGET_ARM)
}

//---------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,9 @@ public static void ApplyUpdateInvalidParameters()
Assert.Throws<ArgumentException>(() =>
AssemblyExtensions.ApplyUpdate(new NonRuntimeAssembly(), new ReadOnlySpan<byte>(metadataDelta), new ReadOnlySpan<byte>(ilDelta), ReadOnlySpan<byte>.Empty));

if (PlatformDetection.IsNotMonoRuntime && PlatformDetection.IsArmOrArm64Process)
{
// Not implemented on .NET Core arm and arm64
Assert.Throws<NotImplementedException>(() =>
AssemblyExtensions.ApplyUpdate(typeof(AssemblyExtensions).Assembly, new ReadOnlySpan<byte>(metadataDelta), new ReadOnlySpan<byte>(ilDelta), ReadOnlySpan<byte>.Empty));
}
else
{
// Tests that this assembly isn't not editable
Assert.Throws<InvalidOperationException>(() =>
AssemblyExtensions.ApplyUpdate(typeof(AssemblyExtensions).Assembly, new ReadOnlySpan<byte>(metadataDelta), new ReadOnlySpan<byte>(ilDelta), ReadOnlySpan<byte>.Empty));
}
// Tests that this assembly isn't not editable
Assert.Throws<InvalidOperationException>(() =>
AssemblyExtensions.ApplyUpdate(typeof(AssemblyExtensions).Assembly, new ReadOnlySpan<byte>(metadataDelta), new ReadOnlySpan<byte>(ilDelta), ReadOnlySpan<byte>.Empty));
}
}
}