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

[LoongArch64] fix the errors when reverse GT_JCC. #85555

Merged
merged 2 commits into from
Apr 29, 2023

Conversation

shushanhf
Copy link
Contributor

@shushanhf shushanhf commented Apr 29, 2023

This PR is part of the issue #69705 to amend the LA's port.

Fix the errors when reverse GT_JCC.

For LoongArch64, the floating compare result is saved to the specific register, where there are 8 bits for saveing at most eight different results, that is the FCC0 ~ FCC7.

fcmp.cond   cc, $f1, $f2                 ----->update the float comparing result FCC-x by cc.

And there are two condition branch instructions bcnez and bceqz which based on the floating comparing results to jump.

This is very different with the AArch64 and AMD64.

/// For  AArch64 and AMD64:                                    /// For  LoongArch64
cmp  $f1, $f2                                                   fcmp.cond      <----the condition is here.
branch.condition   <---the condition is here.                  branch true or false.

So, the struct GenTreeCC is not so fit for LoongArch64 and RISC-V.

@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 Apr 29, 2023
@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Apr 29, 2023
@ghost
Copy link

ghost commented Apr 29, 2023

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

Issue Details

This PR is part of the issue #69705 to amend the LA's port.

Fix the errors when reverse GT_JCC.

Author: shushanhf
Assignees: -
Labels:

area-CodeGen-coreclr, community-contribution

Milestone: -

@shushanhf
Copy link
Contributor Author

Hi, @jakobbotsch
Could you please review this PR?
How to amend the struct GenTreeCC for LoongArch64 and RISC-V?

@jakobbotsch jakobbotsch merged commit b7d36a8 into dotnet:main Apr 29, 2023
@shushanhf shushanhf deleted the float_JCC branch May 5, 2023 03:32
@ghost ghost locked as resolved and limited conversation to collaborators Jun 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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.

2 participants