diff --git a/src/coreclr/runtime/amd64/AllocFast.S b/src/coreclr/runtime/amd64/AllocFast.S index d5b366b876dad6..c1cdf4cb73a1e5 100644 --- a/src/coreclr/runtime/amd64/AllocFast.S +++ b/src/coreclr/runtime/amd64/AllocFast.S @@ -233,8 +233,11 @@ LEAF_END RhpNewArrayFast, _TEXT LEAF_ENTRY RhpNewPtrArrayFast, _TEXT // Delegate overflow handling to the generic helper conservatively + // The constant 0x8000000 is (0x40000000 / sizeof(void*)) + // Some assemblers don't like an expression here, so the + // constant expression is reduced to it's simple form. - cmp rsi, (0x40000000 / 8) // sizeof(void*) + cmp rsi, 0x8000000 // (0x40000000 / 8) jae C_FUNC(RhpNewArrayFast) // In this case we know the element size is sizeof(void *), or 8 for x64