-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
[SPARC][IAS] Add setuw
alias for set
#125149
Merged
koachan
merged 2 commits into
main
from
users/koachan/spr/sparcias-add-setuw-alias-for-set
Feb 3, 2025
Merged
[SPARC][IAS] Add setuw
alias for set
#125149
koachan
merged 2 commits into
main
from
users/koachan/spr/sparcias-add-setuw-alias-for-set
Feb 3, 2025
+10
−0
Conversation
This file contains 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
Created using spr 1.3.4
@llvm/pr-subscribers-backend-sparc Author: Koakuma (koachan) ChangesFull diff: https://github.com/llvm/llvm-project/pull/125149.diff 2 Files Affected:
diff --git a/llvm/lib/Target/Sparc/SparcInstrAliases.td b/llvm/lib/Target/Sparc/SparcInstrAliases.td
index 673a2db59b0929..cfc0b4735c91c4 100644
--- a/llvm/lib/Target/Sparc/SparcInstrAliases.td
+++ b/llvm/lib/Target/Sparc/SparcInstrAliases.td
@@ -605,6 +605,8 @@ def : InstAlias<"unimp", (UNIMP 0), 0>;
// interchangeable with `unimp` all the time.
def : MnemonicAlias<"illtrap", "unimp">;
+def : MnemonicAlias<"setuw", "set">;
+
def : MnemonicAlias<"iflush", "flush">;
def : MnemonicAlias<"stub", "stb">;
diff --git a/llvm/test/MC/Sparc/sparc-synthetic-instructions.s b/llvm/test/MC/Sparc/sparc-synthetic-instructions.s
index 5652f868419504..9c6db2836af176 100644
--- a/llvm/test/MC/Sparc/sparc-synthetic-instructions.s
+++ b/llvm/test/MC/Sparc/sparc-synthetic-instructions.s
@@ -54,6 +54,13 @@
! CHECK: ! fixup A - offset: 0, value: %lo(2147483647), kind: fixup_sparc_lo10
set 2147483647, %o1
+ !! setuw is a mnemonic alias for set.
+ ! CHECK: sethi %hi(32768), %g1 ! encoding: [0x03,0b00AAAAAA,A,A]
+ ! CHECK: ! fixup A - offset: 0, value: %hi(32768), kind: fixup_sparc_hi22
+ setuw 32768, %g1
+ ! CHECK: mov 1, %g1 ! encoding: [0x82,0x10,0x20,0x01]
+ setuw 1, %g1
+
! CHECK: xnor %g1, %g0, %g2 ! encoding: [0x84,0x38,0x40,0x00]
not %g1, %g2
! CHECK: xnor %g1, %g0, %g1 ! encoding: [0x82,0x38,0x40,0x00]
|
@llvm/pr-subscribers-mc Author: Koakuma (koachan) ChangesFull diff: https://github.com/llvm/llvm-project/pull/125149.diff 2 Files Affected:
diff --git a/llvm/lib/Target/Sparc/SparcInstrAliases.td b/llvm/lib/Target/Sparc/SparcInstrAliases.td
index 673a2db59b0929..cfc0b4735c91c4 100644
--- a/llvm/lib/Target/Sparc/SparcInstrAliases.td
+++ b/llvm/lib/Target/Sparc/SparcInstrAliases.td
@@ -605,6 +605,8 @@ def : InstAlias<"unimp", (UNIMP 0), 0>;
// interchangeable with `unimp` all the time.
def : MnemonicAlias<"illtrap", "unimp">;
+def : MnemonicAlias<"setuw", "set">;
+
def : MnemonicAlias<"iflush", "flush">;
def : MnemonicAlias<"stub", "stb">;
diff --git a/llvm/test/MC/Sparc/sparc-synthetic-instructions.s b/llvm/test/MC/Sparc/sparc-synthetic-instructions.s
index 5652f868419504..9c6db2836af176 100644
--- a/llvm/test/MC/Sparc/sparc-synthetic-instructions.s
+++ b/llvm/test/MC/Sparc/sparc-synthetic-instructions.s
@@ -54,6 +54,13 @@
! CHECK: ! fixup A - offset: 0, value: %lo(2147483647), kind: fixup_sparc_lo10
set 2147483647, %o1
+ !! setuw is a mnemonic alias for set.
+ ! CHECK: sethi %hi(32768), %g1 ! encoding: [0x03,0b00AAAAAA,A,A]
+ ! CHECK: ! fixup A - offset: 0, value: %hi(32768), kind: fixup_sparc_hi22
+ setuw 32768, %g1
+ ! CHECK: mov 1, %g1 ! encoding: [0x82,0x10,0x20,0x01]
+ setuw 1, %g1
+
! CHECK: xnor %g1, %g0, %g2 ! encoding: [0x84,0x38,0x40,0x00]
not %g1, %g2
! CHECK: xnor %g1, %g0, %g1 ! encoding: [0x82,0x38,0x40,0x00]
|
Created using spr 1.3.4
s-barannikov
approved these changes
Feb 2, 2025
koachan
deleted the
users/koachan/spr/sparcias-add-setuw-alias-for-set
branch
February 3, 2025 16:15
github-actions bot
pushed a commit
to arm/arm-toolchain
that referenced
this pull request
Feb 3, 2025
Reviewers: s-barannikov, brad0, rorth Reviewed By: s-barannikov Pull Request: llvm/llvm-project#125149
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.