[Hexagon] Adding packhl instruction.
authorColin LeMahieu <colinl@codeaurora.org>
Mon, 8 Dec 2014 17:01:18 +0000 (17:01 +0000)
committerColin LeMahieu <colinl@codeaurora.org>
Mon, 8 Dec 2014 17:01:18 +0000 (17:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223664 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Hexagon/HexagonInstrInfo.td
test/MC/Disassembler/Hexagon/alu32_perm.txt

index 14dfad1044ddaa9403ee852ba3724b9d87d1c94f..3158adcfa5e5d55e0f814d00b9819a2f023d8be9 100644 (file)
@@ -204,6 +204,12 @@ def: BinOp32_pat<or,  A2_or,  i32>;
 def: BinOp32_pat<sub, A2_sub, i32>;
 def: BinOp32_pat<xor, A2_xor, i32>;
 
+// A few special cases producing register pairs:
+let OutOperandList = (outs DoubleRegs:$Rd), hasNewValue = 0,
+    isCodeGenOnly = 0 in {
+  def S2_packhl    : T_ALU32_3op  <"packhl",  0b101, 0b100, 0, 0>;
+}
+
 let hasSideEffects = 0, hasNewValue = 1, isCompare = 1, InputType = "reg"  in
 class T_ALU32_3op_cmp<string mnemonic, bits<2> MinOp, bit IsNeg, bit IsComm>
   : ALU32_rr<(outs PredRegs:$Pd), (ins IntRegs:$Rs, IntRegs:$Rt),
index fce6f8dc68a3b108d2932b34eb1da77ce1e50032..2f1d1b65067aae0a6512ce2f7706871c22ad0efa 100644 (file)
@@ -22,3 +22,5 @@
 # CHECK: r17 = aslh(r21)
 0x11 0xc0 0x35 0x70
 # CHECK: r17 = asrh(r21)
+0x10 0xdf 0x95 0xf5
+# CHECK: r17:16 = packhl(r21, r31)