Skip to content

Commit 7955760

Browse files
authored
[SPARC][IAS] Add illtrap alias for unimp (#105928)
This follows Solaris behavior of allowing both mnemonics all the time. Fixes #105639.
1 parent acff429 commit 7955760

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

llvm/lib/Target/Sparc/SparcInstrAliases.td

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,10 @@ def : InstAlias<"flush", (FLUSH), 0>;
601601
// unimp -> unimp 0
602602
def : InstAlias<"unimp", (UNIMP 0), 0>;
603603

604+
// Not in spec, but we follow Solaris behavior of having `illtrap`
605+
// interchangeable with `unimp` all the time.
606+
def : MnemonicAlias<"illtrap", "unimp">;
607+
604608
def : MnemonicAlias<"iflush", "flush">;
605609

606610
def : MnemonicAlias<"stub", "stb">;

llvm/test/MC/Sparc/sparc-misc-instructions.s

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,9 @@
66

77
! CHECK: unimp 0 ! encoding: [0x00,0x00,0x00,0x00]
88
unimp 0
9+
10+
! CHECK: unimp 0 ! encoding: [0x00,0x00,0x00,0x00]
11+
illtrap
12+
13+
! CHECK: unimp 0 ! encoding: [0x00,0x00,0x00,0x00]
14+
illtrap 0

0 commit comments

Comments
 (0)