Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Fix the condition for arm64
  • Loading branch information
kunalspathak committed Nov 12, 2021
commit 5effeea070504033eb853c0bf5bb3b9e8c8fafa5
7 changes: 3 additions & 4 deletions src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -368,13 +368,12 @@ private void CompileMethodInternal(IMethodNode methodCodeNodeNeedingCode, Method

if (codeSize < _code.Length)
{
if (_compilation.TypeSystemContext.Target.Architecture == TargetArchitecture.X64 ||
_compilation.TypeSystemContext.Target.Architecture == TargetArchitecture.X86)
if (_compilation.TypeSystemContext.Target.Architecture != TargetArchitecture.ARM64)
{
// For xarch, the generated code is sometimes smaller than the memory allocated.
// For xarch/arm32, the generated code is sometimes smaller than the memory allocated.
// In that case, trim the codeBlock to the actual value.
//
// For armarch, the allocation request of `hotCodeSize` also includes the roData size
// For arm64, the allocation request of `hotCodeSize` also includes the roData size
// while the `codeSize` returned just contains the size of the native code. As such,
// there is guarantee that for armarch, (codeSize == _code.Length) is always true.
//
Expand Down