-
Notifications
You must be signed in to change notification settings - Fork 15.5k
[WIP][SPARC][IAS] Implement Solaris Natural Instruction extension #170794
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
koachan
wants to merge
2
commits into
llvm:main
Choose a base branch
from
koachan:sparc64-ias
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.
+155
−26
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| ! RUN: llvm-mc %s -triple=sparc -mcpu=v9 -show-encoding | FileCheck %s --check-prefixes=SPARC32 | ||
| ! RUN: llvm-mc %s -triple=sparcv9 -mcpu=v9 -show-encoding | FileCheck %s --check-prefixes=SPARC64 | ||
|
|
||
| !! Solaris Natural Instructions. | ||
|
|
||
| ! SPARC32: .word 305419896 | ||
| ! SPARC64: .xword 305419896 | ||
| .nword 0x12345678 | ||
|
|
||
| ! SPARC32: ld [%o0+8], %g1 ! encoding: [0xc2,0x02,0x20,0x08] | ||
| ! SPARC64: ldx [%o0+8], %g1 ! encoding: [0xc2,0x5a,0x20,0x08] | ||
| ldn [%o0 + 8], %g1 | ||
| ! SPARC32: st %g1, [%o0+8] ! encoding: [0xc2,0x22,0x20,0x08] | ||
| ! SPARC64: stx %g1, [%o0+8] ! encoding: [0xc2,0x72,0x20,0x08] | ||
| stn %g1, [%o0 + 8] | ||
| ! SPARC32: lda [%o0] #ASI_AIUP, %g1 ! encoding: [0xc2,0x82,0x02,0x00] | ||
| ! SPARC64: ldxa [%o0] #ASI_AIUP, %g1 ! encoding: [0xc2,0xda,0x02,0x00] | ||
| ldna [%o0] 0x10, %g1 | ||
| ! SPARC32: sta %g1, [%o0] #ASI_AIUP ! encoding: [0xc2,0xa2,0x02,0x00] | ||
| ! SPARC64: stxa %g1, [%o0] #ASI_AIUP ! encoding: [0xc2,0xf2,0x02,0x00] | ||
| stna %g1, [%o0] 0x10 | ||
| ! SPARC32: cas [%o0], %g0, %g1 ! encoding: [0xc3,0xe2,0x10,0x00] | ||
| ! SPARC64: casx [%o0], %g0, %g1 ! encoding: [0xc3,0xf2,0x10,0x00] | ||
| casn [%o0], %g0, %g1 | ||
| ! SPARC32: sll %g0, %g1, %g2 ! encoding: [0x85,0x28,0x00,0x01] | ||
| ! SPARC64: sllx %g0, %g1, %g2 ! encoding: [0x85,0x28,0x10,0x01] | ||
| slln %g0, %g1, %g2 | ||
| ! SPARC32: srl %g0, %g1, %g2 ! encoding: [0x85,0x30,0x00,0x01] | ||
| ! SPARC64: srlx %g0, %g1, %g2 ! encoding: [0x85,0x30,0x10,0x01] | ||
| srln %g0, %g1, %g2 | ||
| ! SPARC32: sra %g0, %g1, %g2 ! encoding: [0x85,0x38,0x00,0x01] | ||
| ! SPARC64: srax %g0, %g1, %g2 ! encoding: [0x85,0x38,0x10,0x01] | ||
| sran %g0, %g1, %g2 | ||
| ! SPARC32: st %g0, [%o0+8] ! encoding: [0xc0,0x22,0x20,0x08] | ||
| ! SPARC64: stx %g0, [%o0+8] ! encoding: [0xc0,0x72,0x20,0x08] | ||
| clrn [%o0 + 8] | ||
|
|
||
| ba %ncc, . | ||
| ta %ncc, 0x6d | ||
| move %ncc, %g1, %g2 | ||
| fmovse %ncc, %f0, %f1 | ||
| fmovse %ncc, %f0, %f2 | ||
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.
Marking as WIP because I'm kinda lost with how to implement
%ncchandling.I tried following the other conditional instructions parsing in SparcInstrAliases.td but seems like I can't get it to work.
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.
@arsenm this is what makes it fail.
I tried adding the bits for
%nccin SparcInstrAliases.td (e.g here and here) but it seems to still not be able to recognize it. Any ideas how I should implement it?