Skip to content
Merged
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
6 changes: 6 additions & 0 deletions src/coreclr/inc/safemath.h
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,9 @@ template<typename T> class ClrSafeInt
Which ought to inline nicely
*/
// Returns true if safe, false for overflow.
#if defined(_MSC_VER) && defined(HOST_ARM64) // Workaround for https://github.com/dotnet/runtime/issues/93442
#pragma optimize("", off)
#endif
static bool multiply(T lhs, T rhs, T &result)
{
if(Is64Bit())
Expand Down Expand Up @@ -675,6 +678,9 @@ template<typename T> class ClrSafeInt
}
}
}
#if defined(_MSC_VER) && defined(HOST_ARM64) // Workaround for https://github.com/dotnet/runtime/issues/93442
#pragma optimize("", on)
#endif

// Returns true if safe, false on overflow
static inline bool addition(T lhs, T rhs, T &result)
Expand Down