Skip to content

Commit 7aff91c

Browse files
crossgen2 ARM support misc (#21109)
1 parent 8f0d191 commit 7aff91c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/Compiler/ReadyToRunMetadataFieldLayoutAlgorithm.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ private class ModuleFieldLayoutMap : LockFreeReaderHashtable<EcmaModule, ModuleF
104104
/// </summary>
105105
private const int DomainLocalModuleNormalDynamicEntryOffsetOfDataBlobArm64 = 8;
106106

107+
/// <summary>
108+
/// CoreCLR DomainLocalModule::NormalDynamicEntry::OffsetOfDataBlob for Arm
109+
/// </summary>
110+
private const int DomainLocalModuleNormalDynamicEntryOffsetOfDataBlobArm = 4;
111+
107112
protected override bool CompareKeyToValue(EcmaModule key, ModuleFieldLayout value)
108113
{
109114
return key == value.Module;
@@ -398,6 +403,10 @@ public FieldAndOffset[] GetOrAddDynamicLayout(DefType defType, ModuleFieldLayout
398403
nonGcOffset = DomainLocalModuleNormalDynamicEntryOffsetOfDataBlobArm64;
399404
break;
400405

406+
case TargetArchitecture.ARM:
407+
nonGcOffset = DomainLocalModuleNormalDynamicEntryOffsetOfDataBlobArm;
408+
break;
409+
401410
default:
402411
throw new NotImplementedException();
403412
}

src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/ObjectWriter/TargetExtensions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ public static Machine MachineFromTarget(this TargetDetails target)
4242
case Internal.TypeSystem.TargetArchitecture.ARM64:
4343
return Machine.Arm64;
4444

45+
case Internal.TypeSystem.TargetArchitecture.ARM:
46+
return Machine.ArmThumb2;
47+
4548
default:
4649
throw new NotImplementedException(target.Architecture.ToString());
4750
}

0 commit comments

Comments
 (0)