Skip to content

Commit 329c941

Browse files
committed
Make setuw V9-only
Created using spr 1.3.4
1 parent 6b51393 commit 329c941

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

llvm/lib/Target/Sparc/SparcInstrAliases.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ def : InstAlias<"unimp", (UNIMP 0), 0>;
605605
// interchangeable with `unimp` all the time.
606606
def : MnemonicAlias<"illtrap", "unimp">;
607607

608-
def : MnemonicAlias<"setuw", "set">;
608+
def : MnemonicAlias<"setuw", "set">, Requires<[HasV9]>;
609609

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

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,6 @@
5454
! CHECK: ! fixup A - offset: 0, value: %lo(2147483647), kind: fixup_sparc_lo10
5555
set 2147483647, %o1
5656

57-
!! setuw is a mnemonic alias for set.
58-
! CHECK: sethi %hi(32768), %g1 ! encoding: [0x03,0b00AAAAAA,A,A]
59-
! CHECK: ! fixup A - offset: 0, value: %hi(32768), kind: fixup_sparc_hi22
60-
setuw 32768, %g1
61-
! CHECK: mov 1, %g1 ! encoding: [0x82,0x10,0x20,0x01]
62-
setuw 1, %g1
63-
6457
! CHECK: xnor %g1, %g0, %g2 ! encoding: [0x84,0x38,0x40,0x00]
6558
not %g1, %g2
6659
! CHECK: xnor %g1, %g0, %g1 ! encoding: [0x82,0x38,0x40,0x00]

llvm/test/MC/Sparc/sparcv9-synthetic-instructions.s

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,11 @@ setx (0x0123456700000000+0x0000000089abcdef), %g1, %o0
7878
! V9: sllx %g1, 32, %g1 ! encoding: [0x83,0x28,0x70,0x20]
7979
! V9: or %g1, %o0, %o0 ! encoding: [0x90,0x10,0x40,0x08]
8080
setx (.BB1-.BB0), %g1, %o0
81+
82+
!! In V9, setuw is a mnemonic alias for set.
83+
! V8: error: invalid instruction mnemonic
84+
! V9: sethi %hi(32768), %g1 ! encoding: [0x03,0b00AAAAAA,A,A]
85+
! V9: ! fixup A - offset: 0, value: %hi(32768), kind: fixup_sparc_hi22
86+
setuw 32768, %g1
87+
! V9: mov 1, %g1 ! encoding: [0x82,0x10,0x20,0x01]
88+
setuw 1, %g1

0 commit comments

Comments
 (0)