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

[RISC-V] Fix gc-related bugs in risc-v emitter #98226

Merged

Conversation

Bajtazar
Copy link
Contributor

@Bajtazar Bajtazar commented Feb 9, 2024

This PR fixes a bug related to the gc info update which caused a lot of tests to fail with crossgen2. Also a little code refactor

Part of #84834
cc @wscho77 @HJLeee @clamp03 @JongHeonChoi @t-mustafin @gbalykov @viewizard @ashaurtaev @brucehoult @sirntar @yurai007 @tomeksowi

@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Feb 9, 2024
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 9, 2024
@ghost
Copy link

ghost commented Feb 9, 2024

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

Issue Details

This PR fixes a bug related to the gc info update which caused a lot of tests to fail with crossgen2. Also a little code refactor

Part of #84834
cc @wscho77 @HJLeee @clamp03 @JongHeonChoi @t-mustafin @gbalykov @viewizard @ashaurtaev @brucehoult @sirntar @yurai007 @tomeksowi

Author: Bajtazar
Assignees: -
Labels:

area-CodeGen-coreclr, community-contribution

Milestone: -

…com:Bajtazar/runtime into riscv-emit-designated-instr-crossgen2-fixes
@ryujit-bot
Copy link

Diff results for #98226

Throughput diffs

Throughput diffs for osx/arm64 ran on linux/x64

MinOpts (-0.00% to +0.01%)
Collection PDIFF
libraries.pmi.osx.arm64.checked.mch +0.01%

Details here


@ryujit-bot
Copy link

Diff results for #98226

Throughput diffs

Throughput diffs for osx/arm64 ran on windows/x64

MinOpts (-0.00% to +0.01%)
Collection PDIFF
libraries.pmi.osx.arm64.checked.mch +0.01%

Throughput diffs for windows/arm64 ran on windows/x64

MinOpts (-0.00% to +0.01%)
Collection PDIFF
libraries.pmi.windows.arm64.checked.mch +0.01%

Details here


Comment on lines 2447 to 2448
ssize_t format = immediate >> 8;
assertCodeLength(format, 3);
Copy link
Member

Choose a reason for hiding this comment

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

I cannot understand what it means. It looks assertCodeLength(format, 8) is ok. Could you please explain?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry for this bug, this functions have been synchronized with my latest changes, but the fence usage haven't been tested or used yet hence this bug was not noticed. I've wanted to check whether the format of the fence is equal to 0b0000 or 0b1000 since currently those are only allowed values. It seems that I've too eagerly replaced the assert((format & 0x7) == 0) with this line of code, although as I said this function is never called with the fence instruction yet so it wouldn't cause any regression. Thanks for pointing that out

Copy link
Member

Choose a reason for hiding this comment

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

Thank you.

@jakobbotsch jakobbotsch merged commit e3af00b into dotnet:main Feb 13, 2024
126 of 129 checks passed
@brucehoult
Copy link

LGTM

@github-actions github-actions bot locked and limited conversation to collaborators Apr 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-riscv Related to the RISC-V architecture area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI 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.

8 participants