[PATCH] D96313: [SPARCv9] allow stw as alias for st

Joerg Sonnenberger via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 8 19:43:44 PST 2021


joerg created this revision.
Herald added subscribers: fedor.sergeev, hiraditya, jyknight.
joerg requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Strictly speaking, the architecture manual no longer uses the st
mnemonic, but that's a much more intrusive change for little gain.


https://reviews.llvm.org/D96313

Files:
  llvm/lib/Target/Sparc/SparcInstrAliases.td
  llvm/test/MC/Sparc/sparcv9-instructions.s


Index: llvm/test/MC/Sparc/sparcv9-instructions.s
===================================================================
--- llvm/test/MC/Sparc/sparcv9-instructions.s
+++ llvm/test/MC/Sparc/sparcv9-instructions.s
@@ -298,3 +298,6 @@
         ! V8-NEXT: rd %pc, %o7
         ! V9: rd %pc, %o7               ! encoding: [0x9f,0x41,0x40,0x00]
         rd %pc, %o7
+
+        ! V9: st %o1, [%o0]             ! encoding: [0xd2,0x22,0x00,0x00]
+        stw %o1, [%o0]
Index: llvm/lib/Target/Sparc/SparcInstrAliases.td
===================================================================
--- llvm/lib/Target/Sparc/SparcInstrAliases.td
+++ llvm/lib/Target/Sparc/SparcInstrAliases.td
@@ -492,6 +492,7 @@
 
 def : MnemonicAlias<"stuha", "stha">;
 def : MnemonicAlias<"stsha", "stha">;
+def : MnemonicAlias<"stw", "st">, Requires<[HasV9]>;
 
 def : MnemonicAlias<"lduw", "ld">, Requires<[HasV9]>;
 def : MnemonicAlias<"lduwa", "lda">, Requires<[HasV9]>;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96313.322274.patch
Type: text/x-patch
Size: 938 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210209/00f6903c/attachment.bin>


More information about the llvm-commits mailing list