[PATCH] D47140: [Sparc] Add mnemonic aliases for flush and stb

Daniel Cederman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 21 07:41:55 PDT 2018


dcederman created this revision.
dcederman added a reviewer: jyknight.
Herald added subscribers: llvm-commits, jrtc27, fedor.sergeev.

Repository:
  rL LLVM

https://reviews.llvm.org/D47140

Files:
  lib/Target/Sparc/SparcInstrAliases.td
  test/MC/Sparc/sparc-mem-instructions.s


Index: test/MC/Sparc/sparc-mem-instructions.s
===================================================================
--- test/MC/Sparc/sparc-mem-instructions.s
+++ test/MC/Sparc/sparc-mem-instructions.s
@@ -61,6 +61,10 @@
         stb %o2, [%i0 + 32]
         ! CHECK: stb %o2, [%g1]       ! encoding: [0xd4,0x28,0x40,0x00]
         stb %o2, [%g1]
+        ! CHECK: stb %o2, [%g1]       ! encoding: [0xd4,0x28,0x40,0x00]
+        stub %o2, [%g1]
+        ! CHECK: stb %o2, [%g1]       ! encoding: [0xd4,0x28,0x40,0x00]
+        stsb %o2, [%g1]
         ! CHECK: stba %o2, [%i0+%l6] 131 ! encoding: [0xd4,0xae,0x10,0x76]
         stba %o2, [%i0 + %l6] 131
 
@@ -100,3 +104,5 @@
         ! Not specified in manual, but accepted by gas.
         ! CHECK:  flush %g0             ! encoding: [0x81,0xd8,0x00,0x00]
         flush
+        ! CHECK:  flush %g0             ! encoding: [0x81,0xd8,0x00,0x00]
+        iflush
Index: lib/Target/Sparc/SparcInstrAliases.td
===================================================================
--- lib/Target/Sparc/SparcInstrAliases.td
+++ lib/Target/Sparc/SparcInstrAliases.td
@@ -474,6 +474,9 @@
 // flush -> flush %g0
 def : InstAlias<"flush", (FLUSH), 0>;
 
+def : MnemonicAlias<"iflush", "flush">;
+def : MnemonicAlias<"stub", "stb">;
+def : MnemonicAlias<"stsb", "stb">;
 
 def : MnemonicAlias<"lduw", "ld">, Requires<[HasV9]>;
 def : MnemonicAlias<"lduwa", "lda">, Requires<[HasV9]>;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47140.147782.patch
Type: text/x-patch
Size: 1422 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180521/889c4c6a/attachment.bin>


More information about the llvm-commits mailing list