llvm.org GIT mirror llvm / 777b95d
[AVR] Redefine the 'SBR' instruction as an alias This fixes a TableGen warning about duplicate bit patterns. SBR === This is an alias of 'ORI Rd, K'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341277 91177308-0d34-0410-b5e6-96231b3b80d8 Dylan McKay 2 years ago
2 changed file(s) with 13 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
730730 // Test for zero of minus.
731731 // This operation is identical to a `Rd AND Rd`.
732732 def : InstAlias<"tst\t$rd", (ANDRdRr GPR8:$rd, GPR8:$rd)>;
733
734 // SBR Rd, K
735 //
736 // Mnemonic alias to 'ORI Rd, K'. Same bit pattern, same operands,
737 // same everything.
738 def : InstAlias<"sbr\t$rd, $k",
739 (ORIRdK LD8:$rd, imm_ldi8:$k),
740 /* Disable display, so we don't override ORI */ 0>;
733741
734742 //===----------------------------------------------------------------------===//
735743 // Jump instructions
17291737 let Constraints = "$src = $rd",
17301738 Defs = [SREG] in
17311739 {
1732 // SBR Rd, K
1733 // Alias for ORI Rd, K
1734 def SBRRdK : FRdK<0b0110,
1735 (outs LD8:$rd),
1736 (ins LD8:$src, imm_ldi8:$k),
1737 "sbr\t$rd, $k",
1738 [(set i8:$rd, (or i8:$src, imm:$k)),
1739 (implicit SREG)]>;
1740
17411740 // CBR Rd, K
17421741 // Alias for `ANDI Rd, COM(K)` where COM(K) is the complement of K.
17431742 // FIXME: This uses the 'complement' encoder. We need it to also use the
88
99 sbr r19, _start
1010
11 ; CHECK: sbr r17, 208 ; encoding: [0x10,0x6d]
12 ; CHECK: sbr r24, 190 ; encoding: [0x8e,0x6b]
13 ; CHECK: sbr r20, 173 ; encoding: [0x4d,0x6a]
14 ; CHECK: sbr r31, 0 ; encoding: [0xf0,0x60]
11 ; CHECK: ori r17, 208 ; encoding: [0x10,0x6d]
12 ; CHECK: ori r24, 190 ; encoding: [0x8e,0x6b]
13 ; CHECK: ori r20, 173 ; encoding: [0x4d,0x6a]
14 ; CHECK: ori r31, 0 ; encoding: [0xf0,0x60]
1515
16 ; CHECK: sbr r19, _start ; encoding: [0x30'A',0x60]
16 ; CHECK: ori r19, _start ; encoding: [0x30'A',0x60]
1717 ; CHECK: ; fixup A - offset: 0, value: _start, kind: fixup_ldi