[Sparc] Add unimp alias

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

Reviewers: jyknight, venkatra

Subscribers: fedor.sergeev, jrtc27, llvm-commits

Differential Revision: https://reviews.llvm.org/D51526

llvm-svn: 343203
This commit is contained in:
Daniel Cederman 2018-09-27 12:34:53 +00:00
parent c1968ba5d3
commit b35d3a2733
2 changed files with 11 additions and 0 deletions

View File

@ -476,6 +476,9 @@ def : InstAlias<"pwr $simm13, %psr", (PWRPSRri G0, i32imm:$simm13), 0>;
// 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">;

View File

@ -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