-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[LoongArch64] Add atomic instruction implementation for LoongArch64 #129683
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
Open
lawn123
wants to merge
18
commits into
dotnet:main
Choose a base branch
from
lawn123:LoongArch64_Atomic
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
5ea3049
[LoongArch64] Add atomic instruction implementation for LoongArch64
lawn123 d755abe
Fix jit-format failure issue
lawn123 f680198
Remove the use of TARGET_64BIT for expanding the intrinsics
lawn123 35fd1c8
Delete CompareExchange and Exchange smalltype simulation implementati…
lawn123 1cd04d8
Modify helper function to internal and fix compilation failure and fo…
lawn123 6990eb9
EnableLoongArch64LAM_CAS and EnableLoongArch64LAM_BH are enabled by d…
lawn123 41f9cf2
Delete System.Runtime.Intrinsics.cs changes
lawn123 1e08109
Update the corinfoinstructionset.h file auto-generator produced by ge…
lawn123 622f190
Merge the main branch and update jiteeversionguid.h
lawn123 707b672
Revert "Merge the main branch and update jiteeversionguid.h"
lawn123 f7d8bba
Fix compilation issues in checks
lawn123 79a8228
Add #if TARGET_LOONGARCH64 conditional compilation in Interlocked.cs …
lawn123 cfc4fd1
Merge remote-tracking branch 'upstream/main' into LoongArch64_Atomic
lawn123 ed79c0b
Merge remote-tracking branch 'upstream/main' into LoongArch64_Atomic
lawn123 4a2e93c
Merge branch 'main' into LoongArch64_Atomic
jkotas 02f0815
Merge remote-tracking branch 'upstream/main' into LoongArch64_Atomic
lawn123 9620eb1
Merge remote-tracking branch 'upstream/main' into LoongArch64_Atomic
lawn123 534fe40
fix jit-format failure
lawn123 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 In this small-type
GT_XCHGbranch, ifInstructionSet_LAM_BHis not supported theifis skipped,insremainsINS_none, and no instruction is emitted at all —targetRegis left undefined and the swap silently doesn't happen. In practice this path is unreachable becauseimpIntrinsiconly expands small-typeExchangewhenLAM_BHis available (otherwise it falls back to the managed impl or throwsPlatformNotSupported), so this is defensive rather than a live bug. Still, consider adding anelse { unreached(); }/assert(HasInstructionSet(InstructionSet_LAM_BH))before the block so an invariant violation fails loudly instead of emitting a silent no-op. This mirrors the explicit asserts you already added ingenCodeForCmpXchg.