@@ -8356,7 +8356,7 @@ VOID MethodTableBuilder::PlaceInstanceFields(MethodTable ** pByValueClassCach
8356
8356
// this field type has GC pointers in it, which need to be pointer-size aligned
8357
8357
// so do this if it has not been done already
8358
8358
dwCumulativeInstanceFieldPos = (DWORD)ALIGN_UP(dwCumulativeInstanceFieldPos, TARGET_POINTER_SIZE);
8359
- largestAlignmentRequirement = max(largestAlignmentRequirement, TARGET_POINTER_SIZE);
8359
+ largestAlignmentRequirement = max(largestAlignmentRequirement, (unsigned int) TARGET_POINTER_SIZE);
8360
8360
containsGCPointers = true;
8361
8361
}
8362
8362
else
@@ -8385,7 +8385,7 @@ VOID MethodTableBuilder::PlaceInstanceFields(MethodTable ** pByValueClassCach
8385
8385
// non-value-type fields always require pointer alignment
8386
8386
// This does not account for types that are marked IsAlign8Candidate due to 8-byte fields
8387
8387
// but that is explicitly handled when we calculate the final alignment for the type.
8388
- largestAlignmentRequirement = max(largestAlignmentRequirement, TARGET_POINTER_SIZE);
8388
+ largestAlignmentRequirement = max(largestAlignmentRequirement, (unsigned int) TARGET_POINTER_SIZE);
8389
8389
8390
8390
if (!pFieldDescList[i].IsObjRef())
8391
8391
{
@@ -8427,7 +8427,7 @@ VOID MethodTableBuilder::PlaceInstanceFields(MethodTable ** pByValueClassCach
8427
8427
minAlign *= 2;
8428
8428
}
8429
8429
8430
- if (minAlign != min(dwNumInstanceFieldBytes, TARGET_POINTER_SIZE))
8430
+ if (minAlign != min(dwNumInstanceFieldBytes, (unsigned int) TARGET_POINTER_SIZE))
8431
8431
{
8432
8432
EnsureOptionalFieldsAreAllocated(GetHalfBakedClass(), m_pAllocMemTracker, GetLoaderAllocator()->GetLowFrequencyHeap());
8433
8433
GetHalfBakedClass()->GetOptionalFields()->m_requiredFieldAlignment = (BYTE)minAlign;
0 commit comments