Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NativeAOT] Fix shift math helpers to mask the shift operand #98481

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

filipnavara
Copy link
Member

Match the JIT code:

HCIMPL2_VV(UINT64, JIT_LLsh, UINT64 num, int shift)
{
FCALL_CONTRACT;
return num << (shift & 0x3F);
}
HCIMPLEND
/*********************************************************************/
HCIMPL2_VV(INT64, JIT_LRsh, INT64 num, int shift)
{
FCALL_CONTRACT;
return num >> (shift & 0x3F);
}
HCIMPLEND
/*********************************************************************/
HCIMPL2_VV(UINT64, JIT_LRsz, UINT64 num, int shift)
{
FCALL_CONTRACT;
return num >> (shift & 0x3F);
}

Fixes following Pri0 tests on arm32:

  • JIT/Regression/JitBlue/GitHub_15291
  • JIT/Regression/JitBlue/GitHub_15949

@ghost
Copy link

ghost commented Feb 15, 2024

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

Issue Details

Match the JIT code:

HCIMPL2_VV(UINT64, JIT_LLsh, UINT64 num, int shift)
{
FCALL_CONTRACT;
return num << (shift & 0x3F);
}
HCIMPLEND
/*********************************************************************/
HCIMPL2_VV(INT64, JIT_LRsh, INT64 num, int shift)
{
FCALL_CONTRACT;
return num >> (shift & 0x3F);
}
HCIMPLEND
/*********************************************************************/
HCIMPL2_VV(UINT64, JIT_LRsz, UINT64 num, int shift)
{
FCALL_CONTRACT;
return num >> (shift & 0x3F);
}

Fixes following Pri0 tests on arm32:

  • JIT/Regression/JitBlue/GitHub_15291
  • JIT/Regression/JitBlue/GitHub_15949
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 15, 2024
Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jkotas jkotas merged commit bd5f6eb into dotnet:main Feb 15, 2024
110 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 17, 2024
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