-
Notifications
You must be signed in to change notification settings - Fork 14.5k
[lld][LoongArch] Support TLSDESC GD/LD to IE/LE #123715
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e6b28b6
[lld][LoongArch] Implement TLSDESC GD/LD to IE/LE.
ylzsx b789e95
Modify loongarch-tlsdesc.s and loongarch-tlsdesc-pcrel20-s2.s
ylzsx 36e42bf
Delete the wrong flag NEEDS_TLSGD_TO_IE in the extreme code model.
ylzsx f74ad7a
Revert "Delete the wrong flag NEEDS_TLSGD_TO_IE in the extreme code m…
ylzsx 243ec8f
[NFC] Fix code format
ylzsx 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
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
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.
It seems that if lo12 is 0, we can also write
nop
. Others LGTM, thanks.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.
I believe it is necessary to retain one
ori
instruction. When val is0
, if all four instructions are replaced bynop
, the value of the$a0
register would become undefined. In this scenario,$a0
should be explicitly set to zero to ensure correctness. What’s your opinion on this?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.
When
lo12(val)
== 0&& val != 0, set nop. (If val is zero, it will be set byisUInt12
,$a0
is always valid.)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.
I didn’t fully understand your intention earlier. You were referring to modifying the
!isUInt12
path. I think this scenario is rare, and handling it would increase the complexity of thelld
code. What do you think?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.
You're right. Keep the current codes is reasonable.