Skip to content

Conversation

@filipnavara
Copy link
Member

@filipnavara filipnavara commented Feb 14, 2024

Match CoreCLR behavior.

Div:

ehKind = kOverflowException;

Mod:

else if (divisor == -1)
{
if (dividend == _I32_MIN)
{
ehKind = kOverflowException;
goto ThrowExcep;
}
return 0;
}

Contributes to #97729

@ghost
Copy link

ghost commented Feb 14, 2024

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

Match CoreCLR behavior.

Div:

ehKind = kOverflowException;

Mod:

else if (divisor == -1)
{
if (dividend == _I32_MIN)
{
ehKind = kOverflowException;
goto ThrowExcep;
}
return 0;
}

Author: filipnavara
Assignees: -
Labels:

area-NativeAOT-coreclr

Milestone: -

@filipnavara filipnavara added arch-arm32 community-contribution Indicates that the PR has been added by a community member labels Feb 14, 2024
@filipnavara filipnavara changed the title Throw correct overflow exception in IDiv helper Throw correct overflow exception in IDiv/IMod helper Feb 14, 2024
@jkotas jkotas merged commit b51e352 into dotnet:main Feb 14, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 16, 2024
@filipnavara filipnavara deleted the idiv_ovf_arm branch June 5, 2025 07:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-arm32 area-NativeAOT-coreclr community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants