Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions llvm/lib/Target/Sparc/SparcInstrAliases.td
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,8 @@ def : InstAlias<"unimp", (UNIMP 0), 0>;
// interchangeable with `unimp` all the time.
def : MnemonicAlias<"illtrap", "unimp">;

def : MnemonicAlias<"setuw", "set">, Requires<[HasV9]>;

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

def : MnemonicAlias<"stub", "stb">;
Expand Down
8 changes: 8 additions & 0 deletions llvm/test/MC/Sparc/sparcv9-synthetic-instructions.s
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,11 @@ setx (0x0123456700000000+0x0000000089abcdef), %g1, %o0
! V9: sllx %g1, 32, %g1 ! encoding: [0x83,0x28,0x70,0x20]
! V9: or %g1, %o0, %o0 ! encoding: [0x90,0x10,0x40,0x08]
setx (.BB1-.BB0), %g1, %o0

!! In V9, setuw is a mnemonic alias for set.
! V8: error: invalid instruction mnemonic
! V9: sethi %hi(32768), %g1 ! encoding: [0x03,0b00AAAAAA,A,A]
! V9: ! fixup A - offset: 0, value: %hi(32768), kind: fixup_sparc_hi22
setuw 32768, %g1
! V9: mov 1, %g1 ! encoding: [0x82,0x10,0x20,0x01]
setuw 1, %g1