[PATCH] D51526: [Sparc] Add unimp alias

Daniel Cederman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 31 00:43:32 PDT 2018


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

Use 0 as the default immediate for the UNIMP instruction. This matches the behavior in gas.


Repository:
  rL LLVM

https://reviews.llvm.org/D51526

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


Index: test/MC/Sparc/sparc-misc-instructions.s
===================================================================
--- /dev/null
+++ test/MC/Sparc/sparc-misc-instructions.s
@@ -0,0 +1,8 @@
+! RUN: llvm-mc %s -arch=sparc   -show-encoding | FileCheck %s
+! RUN: llvm-mc %s -arch=sparcv9 -show-encoding | FileCheck %s
+
+        ! CHECK: unimp 0   ! encoding: [0x00,0x00,0x00,0x00]
+        unimp
+
+        ! CHECK: unimp 0   ! encoding: [0x00,0x00,0x00,0x00]
+        unimp 0
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>;
 
+// unimp -> unimp 0
+def : InstAlias<"unimp", (UNIMP 0), 0>;
+
 def : MnemonicAlias<"iflush", "flush">;
 
 def : MnemonicAlias<"stub", "stb">;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51526.163466.patch
Type: text/x-patch
Size: 900 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180831/1de9c1dd/attachment.bin>


More information about the llvm-commits mailing list