Skip to content

Commit

Permalink
[SPARC][IAS] Add illtrap alias for unimp (#105928)
Browse files Browse the repository at this point in the history
This follows Solaris behavior of allowing both mnemonics all the time.

Fixes #105639.
  • Loading branch information
koachan authored Aug 29, 2024
1 parent acff429 commit 7955760
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions llvm/lib/Target/Sparc/SparcInstrAliases.td
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,10 @@ def : InstAlias<"flush", (FLUSH), 0>;
// unimp -> unimp 0
def : InstAlias<"unimp", (UNIMP 0), 0>;

// Not in spec, but we follow Solaris behavior of having `illtrap`
// interchangeable with `unimp` all the time.
def : MnemonicAlias<"illtrap", "unimp">;

def : MnemonicAlias<"iflush", "flush">;

def : MnemonicAlias<"stub", "stb">;
Expand Down
6 changes: 6 additions & 0 deletions llvm/test/MC/Sparc/sparc-misc-instructions.s
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@

! CHECK: unimp 0 ! encoding: [0x00,0x00,0x00,0x00]
unimp 0

! CHECK: unimp 0 ! encoding: [0x00,0x00,0x00,0x00]
illtrap

! CHECK: unimp 0 ! encoding: [0x00,0x00,0x00,0x00]
illtrap 0

0 comments on commit 7955760

Please sign in to comment.