| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1 | //===- ARMInstrNEON.td - NEON support for ARM -----------------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file describes the ARM NEON instruction set. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | //===----------------------------------------------------------------------===// |
| 15 | // NEON-specific DAG Nodes. |
| 16 | //===----------------------------------------------------------------------===// |
| 17 | |
| 18 | def SDTARMVCMP : SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisSameAs<1, 2>]>; |
| 19 | |
| 20 | def NEONvceq : SDNode<"ARMISD::VCEQ", SDTARMVCMP>; |
| 21 | def NEONvcge : SDNode<"ARMISD::VCGE", SDTARMVCMP>; |
| 22 | def NEONvcgeu : SDNode<"ARMISD::VCGEU", SDTARMVCMP>; |
| 23 | def NEONvcgt : SDNode<"ARMISD::VCGT", SDTARMVCMP>; |
| 24 | def NEONvcgtu : SDNode<"ARMISD::VCGTU", SDTARMVCMP>; |
| 25 | def NEONvtst : SDNode<"ARMISD::VTST", SDTARMVCMP>; |
| 26 | |
| 27 | // Types for vector shift by immediates. The "SHX" version is for long and |
| 28 | // narrow operations where the source and destination vectors have different |
| 29 | // types. The "SHINS" version is for shift and insert operations. |
| 30 | def SDTARMVSH : SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisSameAs<0, 1>, |
| 31 | SDTCisVT<2, i32>]>; |
| 32 | def SDTARMVSHX : SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisInt<1>, |
| 33 | SDTCisVT<2, i32>]>; |
| 34 | def SDTARMVSHINS : SDTypeProfile<1, 3, [SDTCisInt<0>, SDTCisSameAs<0, 1>, |
| 35 | SDTCisSameAs<0, 2>, SDTCisVT<3, i32>]>; |
| 36 | |
| 37 | def NEONvshl : SDNode<"ARMISD::VSHL", SDTARMVSH>; |
| 38 | def NEONvshrs : SDNode<"ARMISD::VSHRs", SDTARMVSH>; |
| 39 | def NEONvshru : SDNode<"ARMISD::VSHRu", SDTARMVSH>; |
| 40 | def NEONvshlls : SDNode<"ARMISD::VSHLLs", SDTARMVSHX>; |
| 41 | def NEONvshllu : SDNode<"ARMISD::VSHLLu", SDTARMVSHX>; |
| 42 | def NEONvshlli : SDNode<"ARMISD::VSHLLi", SDTARMVSHX>; |
| 43 | def NEONvshrn : SDNode<"ARMISD::VSHRN", SDTARMVSHX>; |
| 44 | |
| 45 | def NEONvrshrs : SDNode<"ARMISD::VRSHRs", SDTARMVSH>; |
| 46 | def NEONvrshru : SDNode<"ARMISD::VRSHRu", SDTARMVSH>; |
| 47 | def NEONvrshrn : SDNode<"ARMISD::VRSHRN", SDTARMVSHX>; |
| 48 | |
| 49 | def NEONvqshls : SDNode<"ARMISD::VQSHLs", SDTARMVSH>; |
| 50 | def NEONvqshlu : SDNode<"ARMISD::VQSHLu", SDTARMVSH>; |
| 51 | def NEONvqshlsu : SDNode<"ARMISD::VQSHLsu", SDTARMVSH>; |
| 52 | def NEONvqshrns : SDNode<"ARMISD::VQSHRNs", SDTARMVSHX>; |
| 53 | def NEONvqshrnu : SDNode<"ARMISD::VQSHRNu", SDTARMVSHX>; |
| 54 | def NEONvqshrnsu : SDNode<"ARMISD::VQSHRNsu", SDTARMVSHX>; |
| 55 | |
| 56 | def NEONvqrshrns : SDNode<"ARMISD::VQRSHRNs", SDTARMVSHX>; |
| 57 | def NEONvqrshrnu : SDNode<"ARMISD::VQRSHRNu", SDTARMVSHX>; |
| 58 | def NEONvqrshrnsu : SDNode<"ARMISD::VQRSHRNsu", SDTARMVSHX>; |
| 59 | |
| 60 | def NEONvsli : SDNode<"ARMISD::VSLI", SDTARMVSHINS>; |
| 61 | def NEONvsri : SDNode<"ARMISD::VSRI", SDTARMVSHINS>; |
| 62 | |
| 63 | def SDTARMVGETLN : SDTypeProfile<1, 2, [SDTCisVT<0, i32>, SDTCisInt<1>, |
| 64 | SDTCisVT<2, i32>]>; |
| 65 | def NEONvgetlaneu : SDNode<"ARMISD::VGETLANEu", SDTARMVGETLN>; |
| 66 | def NEONvgetlanes : SDNode<"ARMISD::VGETLANEs", SDTARMVGETLN>; |
| 67 | |
| Bob Wilson | bad47f6 | 2010-07-14 06:31:50 +0000 | [diff] [blame] | 68 | def SDTARMVMOVIMM : SDTypeProfile<1, 1, [SDTCisVec<0>, SDTCisVT<1, i32>]>; |
| 69 | def NEONvmovImm : SDNode<"ARMISD::VMOVIMM", SDTARMVMOVIMM>; |
| 70 | def NEONvmvnImm : SDNode<"ARMISD::VMVNIMM", SDTARMVMOVIMM>; |
| 71 | |
| Bob Wilson | eb54d51 | 2009-08-14 05:13:08 +0000 | [diff] [blame] | 72 | def NEONvdup : SDNode<"ARMISD::VDUP", SDTypeProfile<1, 1, [SDTCisVec<0>]>>; |
| 73 | |
| Bob Wilson | cce31f6 | 2009-08-14 05:08:32 +0000 | [diff] [blame] | 74 | // VDUPLANE can produce a quad-register result from a double-register source, |
| 75 | // so the result is not constrained to match the source. |
| 76 | def NEONvduplane : SDNode<"ARMISD::VDUPLANE", |
| 77 | SDTypeProfile<1, 2, [SDTCisVec<0>, SDTCisVec<1>, |
| 78 | SDTCisVT<2, i32>]>>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 79 | |
| Bob Wilson | 32cd855 | 2009-08-19 17:03:43 +0000 | [diff] [blame] | 80 | def SDTARMVEXT : SDTypeProfile<1, 3, [SDTCisVec<0>, SDTCisSameAs<0, 1>, |
| 81 | SDTCisSameAs<0, 2>, SDTCisVT<3, i32>]>; |
| 82 | def NEONvext : SDNode<"ARMISD::VEXT", SDTARMVEXT>; |
| 83 | |
| Bob Wilson | ea3a402 | 2009-08-12 22:31:50 +0000 | [diff] [blame] | 84 | def SDTARMVSHUF : SDTypeProfile<1, 1, [SDTCisVec<0>, SDTCisSameAs<0, 1>]>; |
| 85 | def NEONvrev64 : SDNode<"ARMISD::VREV64", SDTARMVSHUF>; |
| 86 | def NEONvrev32 : SDNode<"ARMISD::VREV32", SDTARMVSHUF>; |
| 87 | def NEONvrev16 : SDNode<"ARMISD::VREV16", SDTARMVSHUF>; |
| 88 | |
| Anton Korobeynikov | ce3ff1b | 2009-08-21 12:40:50 +0000 | [diff] [blame] | 89 | def SDTARMVSHUF2 : SDTypeProfile<2, 2, [SDTCisVec<0>, SDTCisSameAs<0, 1>, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 90 | SDTCisSameAs<0, 2>, |
| 91 | SDTCisSameAs<0, 3>]>; |
| Anton Korobeynikov | 232b19c | 2009-08-21 12:41:42 +0000 | [diff] [blame] | 92 | def NEONzip : SDNode<"ARMISD::VZIP", SDTARMVSHUF2>; |
| 93 | def NEONuzp : SDNode<"ARMISD::VUZP", SDTARMVSHUF2>; |
| 94 | def NEONtrn : SDNode<"ARMISD::VTRN", SDTARMVSHUF2>; |
| Anton Korobeynikov | ce3ff1b | 2009-08-21 12:40:50 +0000 | [diff] [blame] | 95 | |
| Bob Wilson | 38ab35a | 2010-09-01 23:50:19 +0000 | [diff] [blame] | 96 | def SDTARMVMULL : SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisInt<1>, |
| 97 | SDTCisSameAs<1, 2>]>; |
| 98 | def NEONvmulls : SDNode<"ARMISD::VMULLs", SDTARMVMULL>; |
| 99 | def NEONvmullu : SDNode<"ARMISD::VMULLu", SDTARMVMULL>; |
| 100 | |
| Bob Wilson | c6c13a3 | 2010-02-18 06:05:53 +0000 | [diff] [blame] | 101 | def SDTARMFMAX : SDTypeProfile<1, 2, [SDTCisVT<0, f32>, SDTCisSameAs<0, 1>, |
| 102 | SDTCisSameAs<0, 2>]>; |
| 103 | def NEONfmax : SDNode<"ARMISD::FMAX", SDTARMFMAX>; |
| 104 | def NEONfmin : SDNode<"ARMISD::FMIN", SDTARMFMAX>; |
| 105 | |
| Bob Wilson | a3f1901 | 2010-07-13 21:16:48 +0000 | [diff] [blame] | 106 | def NEONimmAllZerosV: PatLeaf<(NEONvmovImm (i32 timm)), [{ |
| 107 | ConstantSDNode *ConstVal = cast<ConstantSDNode>(N->getOperand(0)); |
| Daniel Dunbar | 727be43 | 2010-07-31 21:08:54 +0000 | [diff] [blame] | 108 | unsigned EltBits = 0; |
| Bob Wilson | a3f1901 | 2010-07-13 21:16:48 +0000 | [diff] [blame] | 109 | uint64_t EltVal = ARM_AM::decodeNEONModImm(ConstVal->getZExtValue(), EltBits); |
| 110 | return (EltBits == 32 && EltVal == 0); |
| 111 | }]>; |
| 112 | |
| 113 | def NEONimmAllOnesV: PatLeaf<(NEONvmovImm (i32 timm)), [{ |
| 114 | ConstantSDNode *ConstVal = cast<ConstantSDNode>(N->getOperand(0)); |
| Daniel Dunbar | 727be43 | 2010-07-31 21:08:54 +0000 | [diff] [blame] | 115 | unsigned EltBits = 0; |
| Bob Wilson | a3f1901 | 2010-07-13 21:16:48 +0000 | [diff] [blame] | 116 | uint64_t EltVal = ARM_AM::decodeNEONModImm(ConstVal->getZExtValue(), EltBits); |
| 117 | return (EltBits == 8 && EltVal == 0xff); |
| 118 | }]>; |
| 119 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 120 | //===----------------------------------------------------------------------===// |
| 121 | // NEON operand definitions |
| 122 | //===----------------------------------------------------------------------===// |
| 123 | |
| Bob Wilson | 6eae520 | 2010-06-11 21:34:50 +0000 | [diff] [blame] | 124 | def nModImm : Operand<i32> { |
| 125 | let PrintMethod = "printNEONModImmOperand"; |
| Bob Wilson | d95ccd6 | 2009-11-06 23:33:28 +0000 | [diff] [blame] | 126 | } |
| 127 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 128 | //===----------------------------------------------------------------------===// |
| 129 | // NEON load / store instructions |
| 130 | //===----------------------------------------------------------------------===// |
| 131 | |
| Bob Wilson | 59f75bb | 2010-03-23 18:54:46 +0000 | [diff] [blame] | 132 | // Use vldmia to load a Q register as a D register pair. |
| 133 | // This is equivalent to VLDMD except that it has a Q register operand |
| 134 | // instead of a pair of D registers. |
| 135 | def VLDMQ |
| Jim Grosbach | abcbe24 | 2010-09-08 00:25:50 +0000 | [diff] [blame] | 136 | : AXDI4<(outs QPR:$dst), (ins addrmode4:$addr, pred:$p), |
| Bob Wilson | 59f75bb | 2010-03-23 18:54:46 +0000 | [diff] [blame] | 137 | IndexModeNone, IIC_fpLoadm, |
| Bob Wilson | 8ee9394 | 2010-08-28 00:20:11 +0000 | [diff] [blame] | 138 | "vldm${addr:submode}${p}\t$addr, ${dst:dregpair}", "", |
| 139 | [(set QPR:$dst, (v2f64 (load addrmode4:$addr)))]>; |
| Evan Cheng | 9de7cfe | 2010-05-13 01:12:06 +0000 | [diff] [blame] | 140 | |
| Bob Wilson | 8ee9394 | 2010-08-28 00:20:11 +0000 | [diff] [blame] | 141 | let mayLoad = 1, neverHasSideEffects = 1 in { |
| Evan Cheng | 9de7cfe | 2010-05-13 01:12:06 +0000 | [diff] [blame] | 142 | // Use vld1 to load a Q register as a D register pair. |
| 143 | // This alternative to VLDMQ allows an alignment to be specified. |
| 144 | // This is equivalent to VLD1q64 except that it has a Q register operand. |
| 145 | def VLD1q |
| 146 | : NLdSt<0,0b10,0b1010,0b1100, (outs QPR:$dst), (ins addrmode6:$addr), |
| 147 | IIC_VLD1, "vld1", "64", "${dst:dregpair}, $addr", "", []>; |
| Evan Cheng | dd7f566 | 2010-05-19 06:07:03 +0000 | [diff] [blame] | 148 | } // mayLoad = 1, neverHasSideEffects = 1 |
| Bob Wilson | 340861d | 2010-03-23 05:25:43 +0000 | [diff] [blame] | 149 | |
| Bob Wilson | 59f75bb | 2010-03-23 18:54:46 +0000 | [diff] [blame] | 150 | // Use vstmia to store a Q register as a D register pair. |
| 151 | // This is equivalent to VSTMD except that it has a Q register operand |
| 152 | // instead of a pair of D registers. |
| 153 | def VSTMQ |
| Jim Grosbach | abcbe24 | 2010-09-08 00:25:50 +0000 | [diff] [blame] | 154 | : AXDI4<(outs), (ins QPR:$src, addrmode4:$addr, pred:$p), |
| Bob Wilson | 59f75bb | 2010-03-23 18:54:46 +0000 | [diff] [blame] | 155 | IndexModeNone, IIC_fpStorem, |
| Bob Wilson | 8ee9394 | 2010-08-28 00:20:11 +0000 | [diff] [blame] | 156 | "vstm${addr:submode}${p}\t$addr, ${src:dregpair}", "", |
| 157 | [(store (v2f64 QPR:$src), addrmode4:$addr)]>; |
| Evan Cheng | 9de7cfe | 2010-05-13 01:12:06 +0000 | [diff] [blame] | 158 | |
| Bob Wilson | 8ee9394 | 2010-08-28 00:20:11 +0000 | [diff] [blame] | 159 | let mayStore = 1, neverHasSideEffects = 1 in { |
| Evan Cheng | 9de7cfe | 2010-05-13 01:12:06 +0000 | [diff] [blame] | 160 | // Use vst1 to store a Q register as a D register pair. |
| 161 | // This alternative to VSTMQ allows an alignment to be specified. |
| 162 | // This is equivalent to VST1q64 except that it has a Q register operand. |
| 163 | def VST1q |
| 164 | : NLdSt<0,0b00,0b1010,0b1100, (outs), (ins addrmode6:$addr, QPR:$src), |
| 165 | IIC_VST, "vst1", "64", "${src:dregpair}, $addr", "", []>; |
| Evan Cheng | dd7f566 | 2010-05-19 06:07:03 +0000 | [diff] [blame] | 166 | } // mayStore = 1, neverHasSideEffects = 1 |
| Bob Wilson | cc0a2a7 | 2010-03-23 06:20:33 +0000 | [diff] [blame] | 167 | |
| Evan Cheng | dd7f566 | 2010-05-19 06:07:03 +0000 | [diff] [blame] | 168 | let mayLoad = 1, neverHasSideEffects = 1, hasExtraDefRegAllocReq = 1 in { |
| Bob Wilson | 340861d | 2010-03-23 05:25:43 +0000 | [diff] [blame] | 169 | |
| Bob Wilson | 75a6408 | 2010-09-02 16:00:54 +0000 | [diff] [blame] | 170 | // Classes for VLD* pseudo-instructions with multi-register operands. |
| 171 | // These are expanded to real instructions after register allocation. |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 172 | class VLDQPseudo<InstrItinClass itin> |
| 173 | : PseudoNLdSt<(outs QPR:$dst), (ins addrmode6:$addr), itin, "">; |
| 174 | class VLDQWBPseudo<InstrItinClass itin> |
| Bob Wilson | 75a6408 | 2010-09-02 16:00:54 +0000 | [diff] [blame] | 175 | : PseudoNLdSt<(outs QPR:$dst, GPR:$wb), |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 176 | (ins addrmode6:$addr, am6offset:$offset), itin, |
| Bob Wilson | 75a6408 | 2010-09-02 16:00:54 +0000 | [diff] [blame] | 177 | "$addr.addr = $wb">; |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 178 | class VLDQQPseudo<InstrItinClass itin> |
| 179 | : PseudoNLdSt<(outs QQPR:$dst), (ins addrmode6:$addr), itin, "">; |
| 180 | class VLDQQWBPseudo<InstrItinClass itin> |
| Bob Wilson | 75a6408 | 2010-09-02 16:00:54 +0000 | [diff] [blame] | 181 | : PseudoNLdSt<(outs QQPR:$dst, GPR:$wb), |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 182 | (ins addrmode6:$addr, am6offset:$offset), itin, |
| Bob Wilson | 75a6408 | 2010-09-02 16:00:54 +0000 | [diff] [blame] | 183 | "$addr.addr = $wb">; |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 184 | class VLDQQQQWBPseudo<InstrItinClass itin> |
| Bob Wilson | 35fafca | 2010-09-03 18:16:02 +0000 | [diff] [blame] | 185 | : PseudoNLdSt<(outs QQQQPR:$dst, GPR:$wb), |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 186 | (ins addrmode6:$addr, am6offset:$offset, QQQQPR:$src), itin, |
| Bob Wilson | 35fafca | 2010-09-03 18:16:02 +0000 | [diff] [blame] | 187 | "$addr.addr = $wb, $src = $dst">; |
| Bob Wilson | 75a6408 | 2010-09-02 16:00:54 +0000 | [diff] [blame] | 188 | |
| Bob Wilson | f731a2d | 2009-07-08 18:11:30 +0000 | [diff] [blame] | 189 | // VLD1 : Vector Load (multiple single elements) |
| Bob Wilson | 340861d | 2010-03-23 05:25:43 +0000 | [diff] [blame] | 190 | class VLD1D<bits<4> op7_4, string Dt> |
| 191 | : NLdSt<0,0b10,0b0111,op7_4, (outs DPR:$dst), |
| 192 | (ins addrmode6:$addr), IIC_VLD1, |
| 193 | "vld1", Dt, "\\{$dst\\}, $addr", "", []>; |
| 194 | class VLD1Q<bits<4> op7_4, string Dt> |
| 195 | : NLdSt<0,0b10,0b1010,op7_4, (outs DPR:$dst1, DPR:$dst2), |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 196 | (ins addrmode6:$addr), IIC_VLD2, |
| Bob Wilson | 340861d | 2010-03-23 05:25:43 +0000 | [diff] [blame] | 197 | "vld1", Dt, "\\{$dst1, $dst2\\}, $addr", "", []>; |
| Bob Wilson | f731a2d | 2009-07-08 18:11:30 +0000 | [diff] [blame] | 198 | |
| Bob Wilson | 340861d | 2010-03-23 05:25:43 +0000 | [diff] [blame] | 199 | def VLD1d8 : VLD1D<0b0000, "8">; |
| 200 | def VLD1d16 : VLD1D<0b0100, "16">; |
| 201 | def VLD1d32 : VLD1D<0b1000, "32">; |
| 202 | def VLD1d64 : VLD1D<0b1100, "64">; |
| Bob Wilson | f731a2d | 2009-07-08 18:11:30 +0000 | [diff] [blame] | 203 | |
| Bob Wilson | 340861d | 2010-03-23 05:25:43 +0000 | [diff] [blame] | 204 | def VLD1q8 : VLD1Q<0b0000, "8">; |
| 205 | def VLD1q16 : VLD1Q<0b0100, "16">; |
| 206 | def VLD1q32 : VLD1Q<0b1000, "32">; |
| 207 | def VLD1q64 : VLD1Q<0b1100, "64">; |
| Bob Wilson | 496766c | 2010-03-20 17:59:03 +0000 | [diff] [blame] | 208 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 209 | def VLD1q8Pseudo : VLDQPseudo<IIC_VLD2>; |
| 210 | def VLD1q16Pseudo : VLDQPseudo<IIC_VLD2>; |
| 211 | def VLD1q32Pseudo : VLDQPseudo<IIC_VLD2>; |
| 212 | def VLD1q64Pseudo : VLDQPseudo<IIC_VLD2>; |
| Bob Wilson | 75a6408 | 2010-09-02 16:00:54 +0000 | [diff] [blame] | 213 | |
| Bob Wilson | 496766c | 2010-03-20 17:59:03 +0000 | [diff] [blame] | 214 | // ...with address register writeback: |
| 215 | class VLD1DWB<bits<4> op7_4, string Dt> |
| 216 | : NLdSt<0,0b10,0b0111,op7_4, (outs DPR:$dst, GPR:$wb), |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 217 | (ins addrmode6:$addr, am6offset:$offset), IIC_VLD1, |
| 218 | "vld1", Dt, "\\{$dst\\}, $addr$offset", |
| Bob Wilson | 496766c | 2010-03-20 17:59:03 +0000 | [diff] [blame] | 219 | "$addr.addr = $wb", []>; |
| 220 | class VLD1QWB<bits<4> op7_4, string Dt> |
| Jim Grosbach | c7cf42d | 2010-09-14 23:54:06 +0000 | [diff] [blame^] | 221 | : NLdSt<0,0b10,0b1010,op7_4, (outs DPR:$dst1, DPR:$dst2, GPR:$wb), |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 222 | (ins addrmode6:$addr, am6offset:$offset), IIC_VLD2, |
| Jim Grosbach | c7cf42d | 2010-09-14 23:54:06 +0000 | [diff] [blame^] | 223 | "vld1", Dt, "\\{$dst1, $dst2\\}, $addr$offset", |
| Bob Wilson | 496766c | 2010-03-20 17:59:03 +0000 | [diff] [blame] | 224 | "$addr.addr = $wb", []>; |
| 225 | |
| 226 | def VLD1d8_UPD : VLD1DWB<0b0000, "8">; |
| 227 | def VLD1d16_UPD : VLD1DWB<0b0100, "16">; |
| 228 | def VLD1d32_UPD : VLD1DWB<0b1000, "32">; |
| 229 | def VLD1d64_UPD : VLD1DWB<0b1100, "64">; |
| 230 | |
| 231 | def VLD1q8_UPD : VLD1QWB<0b0000, "8">; |
| 232 | def VLD1q16_UPD : VLD1QWB<0b0100, "16">; |
| 233 | def VLD1q32_UPD : VLD1QWB<0b1000, "32">; |
| 234 | def VLD1q64_UPD : VLD1QWB<0b1100, "64">; |
| Bob Wilson | 496766c | 2010-03-20 17:59:03 +0000 | [diff] [blame] | 235 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 236 | def VLD1q8Pseudo_UPD : VLDQWBPseudo<IIC_VLD2>; |
| 237 | def VLD1q16Pseudo_UPD : VLDQWBPseudo<IIC_VLD2>; |
| 238 | def VLD1q32Pseudo_UPD : VLDQWBPseudo<IIC_VLD2>; |
| 239 | def VLD1q64Pseudo_UPD : VLDQWBPseudo<IIC_VLD2>; |
| Bob Wilson | 75a6408 | 2010-09-02 16:00:54 +0000 | [diff] [blame] | 240 | |
| Bob Wilson | c286c88 | 2010-03-22 18:22:06 +0000 | [diff] [blame] | 241 | // ...with 3 registers (some of these are only for the disassembler): |
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 242 | class VLD1D3<bits<4> op7_4, string Dt> |
| Bob Wilson | 7ee900d | 2010-03-20 19:57:03 +0000 | [diff] [blame] | 243 | : NLdSt<0,0b10,0b0110,op7_4, (outs DPR:$dst1, DPR:$dst2, DPR:$dst3), |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 244 | (ins addrmode6:$addr), IIC_VLD3, "vld1", Dt, |
| Bob Wilson | 98bf518 | 2010-03-22 18:02:38 +0000 | [diff] [blame] | 245 | "\\{$dst1, $dst2, $dst3\\}, $addr", "", []>; |
| Bob Wilson | 496766c | 2010-03-20 17:59:03 +0000 | [diff] [blame] | 246 | class VLD1D3WB<bits<4> op7_4, string Dt> |
| 247 | : NLdSt<0,0b10,0b0110,op7_4, (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, GPR:$wb), |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 248 | (ins addrmode6:$addr, am6offset:$offset), IIC_VLD3, "vld1", Dt, |
| Bob Wilson | 98bf518 | 2010-03-22 18:02:38 +0000 | [diff] [blame] | 249 | "\\{$dst1, $dst2, $dst3\\}, $addr$offset", "$addr.addr = $wb", []>; |
| Bob Wilson | c286c88 | 2010-03-22 18:22:06 +0000 | [diff] [blame] | 250 | |
| 251 | def VLD1d8T : VLD1D3<0b0000, "8">; |
| 252 | def VLD1d16T : VLD1D3<0b0100, "16">; |
| 253 | def VLD1d32T : VLD1D3<0b1000, "32">; |
| 254 | def VLD1d64T : VLD1D3<0b1100, "64">; |
| 255 | |
| 256 | def VLD1d8T_UPD : VLD1D3WB<0b0000, "8">; |
| 257 | def VLD1d16T_UPD : VLD1D3WB<0b0100, "16">; |
| 258 | def VLD1d32T_UPD : VLD1D3WB<0b1000, "32">; |
| Bob Wilson | e60e3ab | 2010-03-22 20:31:39 +0000 | [diff] [blame] | 259 | def VLD1d64T_UPD : VLD1D3WB<0b1100, "64">; |
| Bob Wilson | c286c88 | 2010-03-22 18:22:06 +0000 | [diff] [blame] | 260 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 261 | def VLD1d64TPseudo : VLDQQPseudo<IIC_VLD3>; |
| 262 | def VLD1d64TPseudo_UPD : VLDQQWBPseudo<IIC_VLD3>; |
| Bob Wilson | 75a6408 | 2010-09-02 16:00:54 +0000 | [diff] [blame] | 263 | |
| Bob Wilson | c286c88 | 2010-03-22 18:22:06 +0000 | [diff] [blame] | 264 | // ...with 4 registers (some of these are only for the disassembler): |
| 265 | class VLD1D4<bits<4> op7_4, string Dt> |
| 266 | : NLdSt<0,0b10,0b0010,op7_4,(outs DPR:$dst1, DPR:$dst2, DPR:$dst3, DPR:$dst4), |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 267 | (ins addrmode6:$addr), IIC_VLD4, "vld1", Dt, |
| Bob Wilson | c286c88 | 2010-03-22 18:22:06 +0000 | [diff] [blame] | 268 | "\\{$dst1, $dst2, $dst3, $dst4\\}, $addr", "", []>; |
| Bob Wilson | 496766c | 2010-03-20 17:59:03 +0000 | [diff] [blame] | 269 | class VLD1D4WB<bits<4> op7_4, string Dt> |
| 270 | : NLdSt<0,0b10,0b0010,op7_4, |
| 271 | (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, DPR:$dst4, GPR:$wb), |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 272 | (ins addrmode6:$addr, am6offset:$offset), IIC_VLD4, "vld1", Dt, |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 273 | "\\{$dst1, $dst2, $dst3, $dst4\\}, $addr$offset", "$addr.addr = $wb", |
| Bob Wilson | 98bf518 | 2010-03-22 18:02:38 +0000 | [diff] [blame] | 274 | []>; |
| Johnny Chen | b14a5c5 | 2010-02-23 20:51:23 +0000 | [diff] [blame] | 275 | |
| Bob Wilson | c286c88 | 2010-03-22 18:22:06 +0000 | [diff] [blame] | 276 | def VLD1d8Q : VLD1D4<0b0000, "8">; |
| 277 | def VLD1d16Q : VLD1D4<0b0100, "16">; |
| 278 | def VLD1d32Q : VLD1D4<0b1000, "32">; |
| 279 | def VLD1d64Q : VLD1D4<0b1100, "64">; |
| Bob Wilson | 496766c | 2010-03-20 17:59:03 +0000 | [diff] [blame] | 280 | |
| 281 | def VLD1d8Q_UPD : VLD1D4WB<0b0000, "8">; |
| 282 | def VLD1d16Q_UPD : VLD1D4WB<0b0100, "16">; |
| 283 | def VLD1d32Q_UPD : VLD1D4WB<0b1000, "32">; |
| Bob Wilson | c53a112 | 2010-03-22 18:13:18 +0000 | [diff] [blame] | 284 | def VLD1d64Q_UPD : VLD1D4WB<0b1100, "64">; |
| Bob Wilson | 25cae66 | 2009-08-12 17:04:56 +0000 | [diff] [blame] | 285 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 286 | def VLD1d64QPseudo : VLDQQPseudo<IIC_VLD4>; |
| 287 | def VLD1d64QPseudo_UPD : VLDQQWBPseudo<IIC_VLD4>; |
| Bob Wilson | 75a6408 | 2010-09-02 16:00:54 +0000 | [diff] [blame] | 288 | |
| Bob Wilson | 20f79e3 | 2009-08-05 00:49:09 +0000 | [diff] [blame] | 289 | // VLD2 : Vector Load (multiple 2-element structures) |
| Bob Wilson | d092669 | 2010-03-20 18:14:26 +0000 | [diff] [blame] | 290 | class VLD2D<bits<4> op11_8, bits<4> op7_4, string Dt> |
| 291 | : NLdSt<0, 0b10, op11_8, op7_4, (outs DPR:$dst1, DPR:$dst2), |
| Bob Wilson | 50820a2 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 292 | (ins addrmode6:$addr), IIC_VLD2, |
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 293 | "vld2", Dt, "\\{$dst1, $dst2\\}, $addr", "", []>; |
| 294 | class VLD2Q<bits<4> op7_4, string Dt> |
| Bob Wilson | d092669 | 2010-03-20 18:14:26 +0000 | [diff] [blame] | 295 | : NLdSt<0, 0b10, 0b0011, op7_4, |
| Bob Wilson | 50820a2 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 296 | (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, DPR:$dst4), |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 297 | (ins addrmode6:$addr), IIC_VLD4, |
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 298 | "vld2", Dt, "\\{$dst1, $dst2, $dst3, $dst4\\}, $addr", "", []>; |
| Bob Wilson | 20f79e3 | 2009-08-05 00:49:09 +0000 | [diff] [blame] | 299 | |
| Bob Wilson | d092669 | 2010-03-20 18:14:26 +0000 | [diff] [blame] | 300 | def VLD2d8 : VLD2D<0b1000, 0b0000, "8">; |
| 301 | def VLD2d16 : VLD2D<0b1000, 0b0100, "16">; |
| 302 | def VLD2d32 : VLD2D<0b1000, 0b1000, "32">; |
| Bob Wilson | 20f79e3 | 2009-08-05 00:49:09 +0000 | [diff] [blame] | 303 | |
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 304 | def VLD2q8 : VLD2Q<0b0000, "8">; |
| 305 | def VLD2q16 : VLD2Q<0b0100, "16">; |
| 306 | def VLD2q32 : VLD2Q<0b1000, "32">; |
| Bob Wilson | e6b778d | 2009-10-06 22:01:59 +0000 | [diff] [blame] | 307 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 308 | def VLD2d8Pseudo : VLDQPseudo<IIC_VLD2>; |
| 309 | def VLD2d16Pseudo : VLDQPseudo<IIC_VLD2>; |
| 310 | def VLD2d32Pseudo : VLDQPseudo<IIC_VLD2>; |
| Bob Wilson | 75a6408 | 2010-09-02 16:00:54 +0000 | [diff] [blame] | 311 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 312 | def VLD2q8Pseudo : VLDQQPseudo<IIC_VLD4>; |
| 313 | def VLD2q16Pseudo : VLDQQPseudo<IIC_VLD4>; |
| 314 | def VLD2q32Pseudo : VLDQQPseudo<IIC_VLD4>; |
| Bob Wilson | 75a6408 | 2010-09-02 16:00:54 +0000 | [diff] [blame] | 315 | |
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 316 | // ...with address register writeback: |
| 317 | class VLD2DWB<bits<4> op11_8, bits<4> op7_4, string Dt> |
| 318 | : NLdSt<0, 0b10, op11_8, op7_4, (outs DPR:$dst1, DPR:$dst2, GPR:$wb), |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 319 | (ins addrmode6:$addr, am6offset:$offset), IIC_VLD2, |
| 320 | "vld2", Dt, "\\{$dst1, $dst2\\}, $addr$offset", |
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 321 | "$addr.addr = $wb", []>; |
| 322 | class VLD2QWB<bits<4> op7_4, string Dt> |
| 323 | : NLdSt<0, 0b10, 0b0011, op7_4, |
| 324 | (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, DPR:$dst4, GPR:$wb), |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 325 | (ins addrmode6:$addr, am6offset:$offset), IIC_VLD4, |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 326 | "vld2", Dt, "\\{$dst1, $dst2, $dst3, $dst4\\}, $addr$offset", |
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 327 | "$addr.addr = $wb", []>; |
| 328 | |
| 329 | def VLD2d8_UPD : VLD2DWB<0b1000, 0b0000, "8">; |
| 330 | def VLD2d16_UPD : VLD2DWB<0b1000, 0b0100, "16">; |
| 331 | def VLD2d32_UPD : VLD2DWB<0b1000, 0b1000, "32">; |
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 332 | |
| 333 | def VLD2q8_UPD : VLD2QWB<0b0000, "8">; |
| 334 | def VLD2q16_UPD : VLD2QWB<0b0100, "16">; |
| 335 | def VLD2q32_UPD : VLD2QWB<0b1000, "32">; |
| 336 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 337 | def VLD2d8Pseudo_UPD : VLDQWBPseudo<IIC_VLD2>; |
| 338 | def VLD2d16Pseudo_UPD : VLDQWBPseudo<IIC_VLD2>; |
| 339 | def VLD2d32Pseudo_UPD : VLDQWBPseudo<IIC_VLD2>; |
| Bob Wilson | 75a6408 | 2010-09-02 16:00:54 +0000 | [diff] [blame] | 340 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 341 | def VLD2q8Pseudo_UPD : VLDQQWBPseudo<IIC_VLD4>; |
| 342 | def VLD2q16Pseudo_UPD : VLDQQWBPseudo<IIC_VLD4>; |
| 343 | def VLD2q32Pseudo_UPD : VLDQQWBPseudo<IIC_VLD4>; |
| Bob Wilson | 75a6408 | 2010-09-02 16:00:54 +0000 | [diff] [blame] | 344 | |
| Bob Wilson | d092669 | 2010-03-20 18:14:26 +0000 | [diff] [blame] | 345 | // ...with double-spaced registers (for disassembly only): |
| 346 | def VLD2b8 : VLD2D<0b1001, 0b0000, "8">; |
| 347 | def VLD2b16 : VLD2D<0b1001, 0b0100, "16">; |
| 348 | def VLD2b32 : VLD2D<0b1001, 0b1000, "32">; |
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 349 | def VLD2b8_UPD : VLD2DWB<0b1001, 0b0000, "8">; |
| 350 | def VLD2b16_UPD : VLD2DWB<0b1001, 0b0100, "16">; |
| 351 | def VLD2b32_UPD : VLD2DWB<0b1001, 0b1000, "32">; |
| Johnny Chen | b14a5c5 | 2010-02-23 20:51:23 +0000 | [diff] [blame] | 352 | |
| Bob Wilson | 20f79e3 | 2009-08-05 00:49:09 +0000 | [diff] [blame] | 353 | // VLD3 : Vector Load (multiple 3-element structures) |
| Bob Wilson | d092669 | 2010-03-20 18:14:26 +0000 | [diff] [blame] | 354 | class VLD3D<bits<4> op11_8, bits<4> op7_4, string Dt> |
| 355 | : NLdSt<0, 0b10, op11_8, op7_4, (outs DPR:$dst1, DPR:$dst2, DPR:$dst3), |
| Bob Wilson | 50820a2 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 356 | (ins addrmode6:$addr), IIC_VLD3, |
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 357 | "vld3", Dt, "\\{$dst1, $dst2, $dst3\\}, $addr", "", []>; |
| Bob Wilson | 20f79e3 | 2009-08-05 00:49:09 +0000 | [diff] [blame] | 358 | |
| Bob Wilson | d092669 | 2010-03-20 18:14:26 +0000 | [diff] [blame] | 359 | def VLD3d8 : VLD3D<0b0100, 0b0000, "8">; |
| 360 | def VLD3d16 : VLD3D<0b0100, 0b0100, "16">; |
| 361 | def VLD3d32 : VLD3D<0b0100, 0b1000, "32">; |
| Bob Wilson | 20f79e3 | 2009-08-05 00:49:09 +0000 | [diff] [blame] | 362 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 363 | def VLD3d8Pseudo : VLDQQPseudo<IIC_VLD3>; |
| 364 | def VLD3d16Pseudo : VLDQQPseudo<IIC_VLD3>; |
| 365 | def VLD3d32Pseudo : VLDQQPseudo<IIC_VLD3>; |
| Bob Wilson | 35fafca | 2010-09-03 18:16:02 +0000 | [diff] [blame] | 366 | |
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 367 | // ...with address register writeback: |
| 368 | class VLD3DWB<bits<4> op11_8, bits<4> op7_4, string Dt> |
| 369 | : NLdSt<0, 0b10, op11_8, op7_4, |
| 370 | (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, GPR:$wb), |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 371 | (ins addrmode6:$addr, am6offset:$offset), IIC_VLD3, |
| 372 | "vld3", Dt, "\\{$dst1, $dst2, $dst3\\}, $addr$offset", |
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 373 | "$addr.addr = $wb", []>; |
| 374 | |
| 375 | def VLD3d8_UPD : VLD3DWB<0b0100, 0b0000, "8">; |
| 376 | def VLD3d16_UPD : VLD3DWB<0b0100, 0b0100, "16">; |
| 377 | def VLD3d32_UPD : VLD3DWB<0b0100, 0b1000, "32">; |
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 378 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 379 | def VLD3d8Pseudo_UPD : VLDQQWBPseudo<IIC_VLD3>; |
| 380 | def VLD3d16Pseudo_UPD : VLDQQWBPseudo<IIC_VLD3>; |
| 381 | def VLD3d32Pseudo_UPD : VLDQQWBPseudo<IIC_VLD3>; |
| Bob Wilson | 35fafca | 2010-09-03 18:16:02 +0000 | [diff] [blame] | 382 | |
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 383 | // ...with double-spaced registers (non-updating versions for disassembly only): |
| Bob Wilson | d092669 | 2010-03-20 18:14:26 +0000 | [diff] [blame] | 384 | def VLD3q8 : VLD3D<0b0101, 0b0000, "8">; |
| 385 | def VLD3q16 : VLD3D<0b0101, 0b0100, "16">; |
| 386 | def VLD3q32 : VLD3D<0b0101, 0b1000, "32">; |
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 387 | def VLD3q8_UPD : VLD3DWB<0b0101, 0b0000, "8">; |
| 388 | def VLD3q16_UPD : VLD3DWB<0b0101, 0b0100, "16">; |
| 389 | def VLD3q32_UPD : VLD3DWB<0b0101, 0b1000, "32">; |
| Bob Wilson | d092669 | 2010-03-20 18:14:26 +0000 | [diff] [blame] | 390 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 391 | def VLD3q8Pseudo_UPD : VLDQQQQWBPseudo<IIC_VLD3>; |
| 392 | def VLD3q16Pseudo_UPD : VLDQQQQWBPseudo<IIC_VLD3>; |
| 393 | def VLD3q32Pseudo_UPD : VLDQQQQWBPseudo<IIC_VLD3>; |
| Bob Wilson | 35fafca | 2010-09-03 18:16:02 +0000 | [diff] [blame] | 394 | |
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 395 | // ...alternate versions to be allocated odd register numbers: |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 396 | def VLD3q8oddPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD3>; |
| 397 | def VLD3q16oddPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD3>; |
| 398 | def VLD3q32oddPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD3>; |
| Bob Wilson | 6bbefc2 | 2009-10-07 17:24:55 +0000 | [diff] [blame] | 399 | |
| Bob Wilson | 20f79e3 | 2009-08-05 00:49:09 +0000 | [diff] [blame] | 400 | // VLD4 : Vector Load (multiple 4-element structures) |
| Bob Wilson | d092669 | 2010-03-20 18:14:26 +0000 | [diff] [blame] | 401 | class VLD4D<bits<4> op11_8, bits<4> op7_4, string Dt> |
| 402 | : NLdSt<0, 0b10, op11_8, op7_4, |
| Bob Wilson | 50820a2 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 403 | (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, DPR:$dst4), |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 404 | (ins addrmode6:$addr), IIC_VLD4, |
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 405 | "vld4", Dt, "\\{$dst1, $dst2, $dst3, $dst4\\}, $addr", "", []>; |
| Bob Wilson | 20f79e3 | 2009-08-05 00:49:09 +0000 | [diff] [blame] | 406 | |
| Bob Wilson | d092669 | 2010-03-20 18:14:26 +0000 | [diff] [blame] | 407 | def VLD4d8 : VLD4D<0b0000, 0b0000, "8">; |
| 408 | def VLD4d16 : VLD4D<0b0000, 0b0100, "16">; |
| 409 | def VLD4d32 : VLD4D<0b0000, 0b1000, "32">; |
| Bob Wilson | da9817c | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 410 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 411 | def VLD4d8Pseudo : VLDQQPseudo<IIC_VLD4>; |
| 412 | def VLD4d16Pseudo : VLDQQPseudo<IIC_VLD4>; |
| 413 | def VLD4d32Pseudo : VLDQQPseudo<IIC_VLD4>; |
| Bob Wilson | 35fafca | 2010-09-03 18:16:02 +0000 | [diff] [blame] | 414 | |
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 415 | // ...with address register writeback: |
| 416 | class VLD4DWB<bits<4> op11_8, bits<4> op7_4, string Dt> |
| 417 | : NLdSt<0, 0b10, op11_8, op7_4, |
| 418 | (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, DPR:$dst4, GPR:$wb), |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 419 | (ins addrmode6:$addr, am6offset:$offset), IIC_VLD4, |
| 420 | "vld4", Dt, "\\{$dst1, $dst2, $dst3, $dst4\\}, $addr$offset", |
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 421 | "$addr.addr = $wb", []>; |
| 422 | |
| 423 | def VLD4d8_UPD : VLD4DWB<0b0000, 0b0000, "8">; |
| 424 | def VLD4d16_UPD : VLD4DWB<0b0000, 0b0100, "16">; |
| 425 | def VLD4d32_UPD : VLD4DWB<0b0000, 0b1000, "32">; |
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 426 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 427 | def VLD4d8Pseudo_UPD : VLDQQWBPseudo<IIC_VLD4>; |
| 428 | def VLD4d16Pseudo_UPD : VLDQQWBPseudo<IIC_VLD4>; |
| 429 | def VLD4d32Pseudo_UPD : VLDQQWBPseudo<IIC_VLD4>; |
| Bob Wilson | 35fafca | 2010-09-03 18:16:02 +0000 | [diff] [blame] | 430 | |
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 431 | // ...with double-spaced registers (non-updating versions for disassembly only): |
| Bob Wilson | d092669 | 2010-03-20 18:14:26 +0000 | [diff] [blame] | 432 | def VLD4q8 : VLD4D<0b0001, 0b0000, "8">; |
| 433 | def VLD4q16 : VLD4D<0b0001, 0b0100, "16">; |
| 434 | def VLD4q32 : VLD4D<0b0001, 0b1000, "32">; |
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 435 | def VLD4q8_UPD : VLD4DWB<0b0001, 0b0000, "8">; |
| 436 | def VLD4q16_UPD : VLD4DWB<0b0001, 0b0100, "16">; |
| 437 | def VLD4q32_UPD : VLD4DWB<0b0001, 0b1000, "32">; |
| Bob Wilson | d092669 | 2010-03-20 18:14:26 +0000 | [diff] [blame] | 438 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 439 | def VLD4q8Pseudo_UPD : VLDQQQQWBPseudo<IIC_VLD4>; |
| 440 | def VLD4q16Pseudo_UPD : VLDQQQQWBPseudo<IIC_VLD4>; |
| 441 | def VLD4q32Pseudo_UPD : VLDQQQQWBPseudo<IIC_VLD4>; |
| Bob Wilson | 35fafca | 2010-09-03 18:16:02 +0000 | [diff] [blame] | 442 | |
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 443 | // ...alternate versions to be allocated odd register numbers: |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 444 | def VLD4q8oddPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD4>; |
| 445 | def VLD4q16oddPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD4>; |
| 446 | def VLD4q32oddPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD4>; |
| Bob Wilson | 50820a2 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 447 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 448 | // Classes for VLD*LN pseudo-instructions with multi-register operands. |
| 449 | // These are expanded to real instructions after register allocation. |
| 450 | class VLDQLNPseudo<InstrItinClass itin> |
| 451 | : PseudoNLdSt<(outs QPR:$dst), |
| 452 | (ins addrmode6:$addr, QPR:$src, nohash_imm:$lane), |
| 453 | itin, "$src = $dst">; |
| 454 | class VLDQLNWBPseudo<InstrItinClass itin> |
| 455 | : PseudoNLdSt<(outs QPR:$dst, GPR:$wb), |
| 456 | (ins addrmode6:$addr, am6offset:$offset, QPR:$src, |
| 457 | nohash_imm:$lane), itin, "$addr.addr = $wb, $src = $dst">; |
| 458 | class VLDQQLNPseudo<InstrItinClass itin> |
| 459 | : PseudoNLdSt<(outs QQPR:$dst), |
| 460 | (ins addrmode6:$addr, QQPR:$src, nohash_imm:$lane), |
| 461 | itin, "$src = $dst">; |
| 462 | class VLDQQLNWBPseudo<InstrItinClass itin> |
| 463 | : PseudoNLdSt<(outs QQPR:$dst, GPR:$wb), |
| 464 | (ins addrmode6:$addr, am6offset:$offset, QQPR:$src, |
| 465 | nohash_imm:$lane), itin, "$addr.addr = $wb, $src = $dst">; |
| 466 | class VLDQQQQLNPseudo<InstrItinClass itin> |
| 467 | : PseudoNLdSt<(outs QQQQPR:$dst), |
| 468 | (ins addrmode6:$addr, QQQQPR:$src, nohash_imm:$lane), |
| 469 | itin, "$src = $dst">; |
| 470 | class VLDQQQQLNWBPseudo<InstrItinClass itin> |
| 471 | : PseudoNLdSt<(outs QQQQPR:$dst, GPR:$wb), |
| 472 | (ins addrmode6:$addr, am6offset:$offset, QQQQPR:$src, |
| 473 | nohash_imm:$lane), itin, "$addr.addr = $wb, $src = $dst">; |
| 474 | |
| Bob Wilson | 50820a2 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 475 | // VLD1LN : Vector Load (single element to one lane) |
| 476 | // FIXME: Not yet implemented. |
| Bob Wilson | ab3a947 | 2009-10-07 18:09:32 +0000 | [diff] [blame] | 477 | |
| Bob Wilson | da9817c | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 478 | // VLD2LN : Vector Load (single 2-element structure to one lane) |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 479 | class VLD2LN<bits<4> op11_8, bits<4> op7_4, string Dt> |
| 480 | : NLdSt<1, 0b10, op11_8, op7_4, (outs DPR:$dst1, DPR:$dst2), |
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 481 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, nohash_imm:$lane), |
| 482 | IIC_VLD2, "vld2", Dt, "\\{$dst1[$lane], $dst2[$lane]\\}, $addr", |
| 483 | "$src1 = $dst1, $src2 = $dst2", []>; |
| Bob Wilson | da9817c | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 484 | |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 485 | def VLD2LNd8 : VLD2LN<0b0001, {?,?,?,?}, "8">; |
| 486 | def VLD2LNd16 : VLD2LN<0b0101, {?,?,0,?}, "16">; |
| 487 | def VLD2LNd32 : VLD2LN<0b1001, {?,0,?,?}, "32">; |
| Bob Wilson | c2728f4 | 2009-10-08 18:56:10 +0000 | [diff] [blame] | 488 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 489 | def VLD2LNd8Pseudo : VLDQLNPseudo<IIC_VLD2>; |
| 490 | def VLD2LNd16Pseudo : VLDQLNPseudo<IIC_VLD2>; |
| 491 | def VLD2LNd32Pseudo : VLDQLNPseudo<IIC_VLD2>; |
| 492 | |
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 493 | // ...with double-spaced registers: |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 494 | def VLD2LNq16 : VLD2LN<0b0101, {?,?,1,?}, "16">; |
| 495 | def VLD2LNq32 : VLD2LN<0b1001, {?,1,?,?}, "32">; |
| Bob Wilson | c2728f4 | 2009-10-08 18:56:10 +0000 | [diff] [blame] | 496 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 497 | def VLD2LNq16Pseudo : VLDQQLNPseudo<IIC_VLD2>; |
| 498 | def VLD2LNq32Pseudo : VLDQQLNPseudo<IIC_VLD2>; |
| Bob Wilson | da9817c | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 499 | |
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 500 | // ...with address register writeback: |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 501 | class VLD2LNWB<bits<4> op11_8, bits<4> op7_4, string Dt> |
| 502 | : NLdSt<1, 0b10, op11_8, op7_4, (outs DPR:$dst1, DPR:$dst2, GPR:$wb), |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 503 | (ins addrmode6:$addr, am6offset:$offset, |
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 504 | DPR:$src1, DPR:$src2, nohash_imm:$lane), IIC_VLD2, "vld2", Dt, |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 505 | "\\{$dst1[$lane], $dst2[$lane]\\}, $addr$offset", |
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 506 | "$src1 = $dst1, $src2 = $dst2, $addr.addr = $wb", []>; |
| 507 | |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 508 | def VLD2LNd8_UPD : VLD2LNWB<0b0001, {?,?,?,?}, "8">; |
| 509 | def VLD2LNd16_UPD : VLD2LNWB<0b0101, {?,?,0,?}, "16">; |
| 510 | def VLD2LNd32_UPD : VLD2LNWB<0b1001, {?,0,?,?}, "32">; |
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 511 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 512 | def VLD2LNd8Pseudo_UPD : VLDQLNWBPseudo<IIC_VLD2>; |
| 513 | def VLD2LNd16Pseudo_UPD : VLDQLNWBPseudo<IIC_VLD2>; |
| 514 | def VLD2LNd32Pseudo_UPD : VLDQLNWBPseudo<IIC_VLD2>; |
| 515 | |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 516 | def VLD2LNq16_UPD : VLD2LNWB<0b0101, {?,?,1,?}, "16">; |
| 517 | def VLD2LNq32_UPD : VLD2LNWB<0b1001, {?,1,?,?}, "32">; |
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 518 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 519 | def VLD2LNq16Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD2>; |
| 520 | def VLD2LNq32Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD2>; |
| 521 | |
| Bob Wilson | da9817c | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 522 | // VLD3LN : Vector Load (single 3-element structure to one lane) |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 523 | class VLD3LN<bits<4> op11_8, bits<4> op7_4, string Dt> |
| 524 | : NLdSt<1, 0b10, op11_8, op7_4, (outs DPR:$dst1, DPR:$dst2, DPR:$dst3), |
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 525 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3, |
| 526 | nohash_imm:$lane), IIC_VLD3, "vld3", Dt, |
| 527 | "\\{$dst1[$lane], $dst2[$lane], $dst3[$lane]\\}, $addr", |
| 528 | "$src1 = $dst1, $src2 = $dst2, $src3 = $dst3", []>; |
| Bob Wilson | da9817c | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 529 | |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 530 | def VLD3LNd8 : VLD3LN<0b0010, {?,?,?,0}, "8">; |
| 531 | def VLD3LNd16 : VLD3LN<0b0110, {?,?,0,0}, "16">; |
| 532 | def VLD3LNd32 : VLD3LN<0b1010, {?,0,0,0}, "32">; |
| Bob Wilson | cf54e93 | 2009-10-08 22:27:33 +0000 | [diff] [blame] | 533 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 534 | def VLD3LNd8Pseudo : VLDQQLNPseudo<IIC_VLD3>; |
| 535 | def VLD3LNd16Pseudo : VLDQQLNPseudo<IIC_VLD3>; |
| 536 | def VLD3LNd32Pseudo : VLDQQLNPseudo<IIC_VLD3>; |
| 537 | |
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 538 | // ...with double-spaced registers: |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 539 | def VLD3LNq16 : VLD3LN<0b0110, {?,?,1,0}, "16">; |
| 540 | def VLD3LNq32 : VLD3LN<0b1010, {?,1,0,0}, "32">; |
| Bob Wilson | cf54e93 | 2009-10-08 22:27:33 +0000 | [diff] [blame] | 541 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 542 | def VLD3LNq16Pseudo : VLDQQQQLNPseudo<IIC_VLD3>; |
| 543 | def VLD3LNq32Pseudo : VLDQQQQLNPseudo<IIC_VLD3>; |
| Bob Wilson | da9817c | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 544 | |
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 545 | // ...with address register writeback: |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 546 | class VLD3LNWB<bits<4> op11_8, bits<4> op7_4, string Dt> |
| 547 | : NLdSt<1, 0b10, op11_8, op7_4, |
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 548 | (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, GPR:$wb), |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 549 | (ins addrmode6:$addr, am6offset:$offset, |
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 550 | DPR:$src1, DPR:$src2, DPR:$src3, nohash_imm:$lane), |
| 551 | IIC_VLD3, "vld3", Dt, |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 552 | "\\{$dst1[$lane], $dst2[$lane], $dst3[$lane]\\}, $addr$offset", |
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 553 | "$src1 = $dst1, $src2 = $dst2, $src3 = $dst3, $addr.addr = $wb", |
| 554 | []>; |
| 555 | |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 556 | def VLD3LNd8_UPD : VLD3LNWB<0b0010, {?,?,?,0}, "8">; |
| 557 | def VLD3LNd16_UPD : VLD3LNWB<0b0110, {?,?,0,0}, "16">; |
| 558 | def VLD3LNd32_UPD : VLD3LNWB<0b1010, {?,0,0,0}, "32">; |
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 559 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 560 | def VLD3LNd8Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD3>; |
| 561 | def VLD3LNd16Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD3>; |
| 562 | def VLD3LNd32Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD3>; |
| 563 | |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 564 | def VLD3LNq16_UPD : VLD3LNWB<0b0110, {?,?,1,0}, "16">; |
| 565 | def VLD3LNq32_UPD : VLD3LNWB<0b1010, {?,1,0,0}, "32">; |
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 566 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 567 | def VLD3LNq16Pseudo_UPD : VLDQQQQLNWBPseudo<IIC_VLD3>; |
| 568 | def VLD3LNq32Pseudo_UPD : VLDQQQQLNWBPseudo<IIC_VLD3>; |
| 569 | |
| Bob Wilson | da9817c | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 570 | // VLD4LN : Vector Load (single 4-element structure to one lane) |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 571 | class VLD4LN<bits<4> op11_8, bits<4> op7_4, string Dt> |
| 572 | : NLdSt<1, 0b10, op11_8, op7_4, |
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 573 | (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, DPR:$dst4), |
| 574 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4, |
| 575 | nohash_imm:$lane), IIC_VLD4, "vld4", Dt, |
| Bob Wilson | 7430a98 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 576 | "\\{$dst1[$lane], $dst2[$lane], $dst3[$lane], $dst4[$lane]\\}, $addr", |
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 577 | "$src1 = $dst1, $src2 = $dst2, $src3 = $dst3, $src4 = $dst4", []>; |
| Bob Wilson | da9817c | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 578 | |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 579 | def VLD4LNd8 : VLD4LN<0b0011, {?,?,?,?}, "8">; |
| 580 | def VLD4LNd16 : VLD4LN<0b0111, {?,?,0,?}, "16">; |
| 581 | def VLD4LNd32 : VLD4LN<0b1011, {?,0,?,?}, "32">; |
| Bob Wilson | 38ba472 | 2009-10-08 22:53:57 +0000 | [diff] [blame] | 582 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 583 | def VLD4LNd8Pseudo : VLDQQLNPseudo<IIC_VLD4>; |
| 584 | def VLD4LNd16Pseudo : VLDQQLNPseudo<IIC_VLD4>; |
| 585 | def VLD4LNd32Pseudo : VLDQQLNPseudo<IIC_VLD4>; |
| 586 | |
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 587 | // ...with double-spaced registers: |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 588 | def VLD4LNq16 : VLD4LN<0b0111, {?,?,1,?}, "16">; |
| 589 | def VLD4LNq32 : VLD4LN<0b1011, {?,1,?,?}, "32">; |
| Bob Wilson | 38ba472 | 2009-10-08 22:53:57 +0000 | [diff] [blame] | 590 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 591 | def VLD4LNq16Pseudo : VLDQQQQLNPseudo<IIC_VLD4>; |
| 592 | def VLD4LNq32Pseudo : VLDQQQQLNPseudo<IIC_VLD4>; |
| Bob Wilson | 50820a2 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 593 | |
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 594 | // ...with address register writeback: |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 595 | class VLD4LNWB<bits<4> op11_8, bits<4> op7_4, string Dt> |
| 596 | : NLdSt<1, 0b10, op11_8, op7_4, |
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 597 | (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, DPR:$dst4, GPR:$wb), |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 598 | (ins addrmode6:$addr, am6offset:$offset, |
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 599 | DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4, nohash_imm:$lane), |
| 600 | IIC_VLD4, "vld4", Dt, |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 601 | "\\{$dst1[$lane], $dst2[$lane], $dst3[$lane], $dst4[$lane]\\}, $addr$offset", |
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 602 | "$src1 = $dst1, $src2 = $dst2, $src3 = $dst3, $src4 = $dst4, $addr.addr = $wb", |
| 603 | []>; |
| 604 | |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 605 | def VLD4LNd8_UPD : VLD4LNWB<0b0011, {?,?,?,?}, "8">; |
| 606 | def VLD4LNd16_UPD : VLD4LNWB<0b0111, {?,?,0,?}, "16">; |
| 607 | def VLD4LNd32_UPD : VLD4LNWB<0b1011, {?,0,?,?}, "32">; |
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 608 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 609 | def VLD4LNd8Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD4>; |
| 610 | def VLD4LNd16Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD4>; |
| 611 | def VLD4LNd32Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD4>; |
| 612 | |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 613 | def VLD4LNq16_UPD : VLD4LNWB<0b0111, {?,?,1,?}, "16">; |
| 614 | def VLD4LNq32_UPD : VLD4LNWB<0b1011, {?,1,?,?}, "32">; |
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 615 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 616 | def VLD4LNq16Pseudo_UPD : VLDQQQQLNWBPseudo<IIC_VLD4>; |
| 617 | def VLD4LNq32Pseudo_UPD : VLDQQQQLNWBPseudo<IIC_VLD4>; |
| 618 | |
| Bob Wilson | 50820a2 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 619 | // VLD1DUP : Vector Load (single element to all lanes) |
| 620 | // VLD2DUP : Vector Load (single 2-element structure to all lanes) |
| 621 | // VLD3DUP : Vector Load (single 3-element structure to all lanes) |
| 622 | // VLD4DUP : Vector Load (single 4-element structure to all lanes) |
| 623 | // FIXME: Not yet implemented. |
| Evan Cheng | dd7f566 | 2010-05-19 06:07:03 +0000 | [diff] [blame] | 624 | } // mayLoad = 1, neverHasSideEffects = 1, hasExtraDefRegAllocReq = 1 |
| Bob Wilson | f042ead | 2009-08-12 00:49:01 +0000 | [diff] [blame] | 625 | |
| Evan Cheng | dd7f566 | 2010-05-19 06:07:03 +0000 | [diff] [blame] | 626 | let mayStore = 1, neverHasSideEffects = 1, hasExtraSrcRegAllocReq = 1 in { |
| Bob Wilson | 322cbff | 2010-03-20 20:54:36 +0000 | [diff] [blame] | 627 | |
| Bob Wilson | 9392b0e | 2010-08-25 23:27:42 +0000 | [diff] [blame] | 628 | // Classes for VST* pseudo-instructions with multi-register operands. |
| 629 | // These are expanded to real instructions after register allocation. |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 630 | class VSTQPseudo<InstrItinClass itin> |
| 631 | : PseudoNLdSt<(outs), (ins addrmode6:$addr, QPR:$src), itin, "">; |
| 632 | class VSTQWBPseudo<InstrItinClass itin> |
| Bob Wilson | 950882b | 2010-08-28 05:12:57 +0000 | [diff] [blame] | 633 | : PseudoNLdSt<(outs GPR:$wb), |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 634 | (ins addrmode6:$addr, am6offset:$offset, QPR:$src), itin, |
| Bob Wilson | 950882b | 2010-08-28 05:12:57 +0000 | [diff] [blame] | 635 | "$addr.addr = $wb">; |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 636 | class VSTQQPseudo<InstrItinClass itin> |
| 637 | : PseudoNLdSt<(outs), (ins addrmode6:$addr, QQPR:$src), itin, "">; |
| 638 | class VSTQQWBPseudo<InstrItinClass itin> |
| Bob Wilson | 9392b0e | 2010-08-25 23:27:42 +0000 | [diff] [blame] | 639 | : PseudoNLdSt<(outs GPR:$wb), |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 640 | (ins addrmode6:$addr, am6offset:$offset, QQPR:$src), itin, |
| Bob Wilson | 9392b0e | 2010-08-25 23:27:42 +0000 | [diff] [blame] | 641 | "$addr.addr = $wb">; |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 642 | class VSTQQQQWBPseudo<InstrItinClass itin> |
| Bob Wilson | 9392b0e | 2010-08-25 23:27:42 +0000 | [diff] [blame] | 643 | : PseudoNLdSt<(outs GPR:$wb), |
| 644 | (ins addrmode6:$addr, am6offset:$offset, QQQQPR:$src), IIC_VST, |
| 645 | "$addr.addr = $wb">; |
| 646 | |
| Bob Wilson | cc0a2a7 | 2010-03-23 06:20:33 +0000 | [diff] [blame] | 647 | // VST1 : Vector Store (multiple single elements) |
| 648 | class VST1D<bits<4> op7_4, string Dt> |
| 649 | : NLdSt<0,0b00,0b0111,op7_4, (outs), (ins addrmode6:$addr, DPR:$src), IIC_VST, |
| 650 | "vst1", Dt, "\\{$src\\}, $addr", "", []>; |
| 651 | class VST1Q<bits<4> op7_4, string Dt> |
| 652 | : NLdSt<0,0b00,0b1010,op7_4, (outs), |
| 653 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2), IIC_VST, |
| 654 | "vst1", Dt, "\\{$src1, $src2\\}, $addr", "", []>; |
| 655 | |
| 656 | def VST1d8 : VST1D<0b0000, "8">; |
| 657 | def VST1d16 : VST1D<0b0100, "16">; |
| 658 | def VST1d32 : VST1D<0b1000, "32">; |
| 659 | def VST1d64 : VST1D<0b1100, "64">; |
| 660 | |
| 661 | def VST1q8 : VST1Q<0b0000, "8">; |
| 662 | def VST1q16 : VST1Q<0b0100, "16">; |
| 663 | def VST1q32 : VST1Q<0b1000, "32">; |
| 664 | def VST1q64 : VST1Q<0b1100, "64">; |
| 665 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 666 | def VST1q8Pseudo : VSTQPseudo<IIC_VST>; |
| 667 | def VST1q16Pseudo : VSTQPseudo<IIC_VST>; |
| 668 | def VST1q32Pseudo : VSTQPseudo<IIC_VST>; |
| 669 | def VST1q64Pseudo : VSTQPseudo<IIC_VST>; |
| Bob Wilson | 950882b | 2010-08-28 05:12:57 +0000 | [diff] [blame] | 670 | |
| Bob Wilson | 322cbff | 2010-03-20 20:54:36 +0000 | [diff] [blame] | 671 | // ...with address register writeback: |
| 672 | class VST1DWB<bits<4> op7_4, string Dt> |
| 673 | : NLdSt<0, 0b00, 0b0111, op7_4, (outs GPR:$wb), |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 674 | (ins addrmode6:$addr, am6offset:$offset, DPR:$src), IIC_VST, |
| 675 | "vst1", Dt, "\\{$src\\}, $addr$offset", "$addr.addr = $wb", []>; |
| Bob Wilson | 322cbff | 2010-03-20 20:54:36 +0000 | [diff] [blame] | 676 | class VST1QWB<bits<4> op7_4, string Dt> |
| 677 | : NLdSt<0, 0b00, 0b1010, op7_4, (outs GPR:$wb), |
| Jim Grosbach | c7cf42d | 2010-09-14 23:54:06 +0000 | [diff] [blame^] | 678 | (ins addrmode6:$addr, am6offset:$offset, DPR:$src1, DPR:$src2), |
| 679 | IIC_VST, "vst1", Dt, "\\{$src1, $src2\\}, $addr$offset", |
| 680 | "$addr.addr = $wb", []>; |
| Bob Wilson | 322cbff | 2010-03-20 20:54:36 +0000 | [diff] [blame] | 681 | |
| 682 | def VST1d8_UPD : VST1DWB<0b0000, "8">; |
| 683 | def VST1d16_UPD : VST1DWB<0b0100, "16">; |
| 684 | def VST1d32_UPD : VST1DWB<0b1000, "32">; |
| 685 | def VST1d64_UPD : VST1DWB<0b1100, "64">; |
| 686 | |
| 687 | def VST1q8_UPD : VST1QWB<0b0000, "8">; |
| 688 | def VST1q16_UPD : VST1QWB<0b0100, "16">; |
| 689 | def VST1q32_UPD : VST1QWB<0b1000, "32">; |
| 690 | def VST1q64_UPD : VST1QWB<0b1100, "64">; |
| 691 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 692 | def VST1q8Pseudo_UPD : VSTQWBPseudo<IIC_VST>; |
| 693 | def VST1q16Pseudo_UPD : VSTQWBPseudo<IIC_VST>; |
| 694 | def VST1q32Pseudo_UPD : VSTQWBPseudo<IIC_VST>; |
| 695 | def VST1q64Pseudo_UPD : VSTQWBPseudo<IIC_VST>; |
| Bob Wilson | 950882b | 2010-08-28 05:12:57 +0000 | [diff] [blame] | 696 | |
| Bob Wilson | c286c88 | 2010-03-22 18:22:06 +0000 | [diff] [blame] | 697 | // ...with 3 registers (some of these are only for the disassembler): |
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 698 | class VST1D3<bits<4> op7_4, string Dt> |
| Johnny Chen | d5c472d | 2010-02-24 02:57:20 +0000 | [diff] [blame] | 699 | : NLdSt<0, 0b00, 0b0110, op7_4, (outs), |
| Bob Wilson | 7ee900d | 2010-03-20 19:57:03 +0000 | [diff] [blame] | 700 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3), |
| Bob Wilson | 98bf518 | 2010-03-22 18:02:38 +0000 | [diff] [blame] | 701 | IIC_VST, "vst1", Dt, "\\{$src1, $src2, $src3\\}, $addr", "", []>; |
| Bob Wilson | 322cbff | 2010-03-20 20:54:36 +0000 | [diff] [blame] | 702 | class VST1D3WB<bits<4> op7_4, string Dt> |
| 703 | : NLdSt<0, 0b00, 0b0110, op7_4, (outs GPR:$wb), |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 704 | (ins addrmode6:$addr, am6offset:$offset, |
| Bob Wilson | 322cbff | 2010-03-20 20:54:36 +0000 | [diff] [blame] | 705 | DPR:$src1, DPR:$src2, DPR:$src3), |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 706 | IIC_VST, "vst1", Dt, "\\{$src1, $src2, $src3\\}, $addr$offset", |
| Bob Wilson | 98bf518 | 2010-03-22 18:02:38 +0000 | [diff] [blame] | 707 | "$addr.addr = $wb", []>; |
| Bob Wilson | c286c88 | 2010-03-22 18:22:06 +0000 | [diff] [blame] | 708 | |
| 709 | def VST1d8T : VST1D3<0b0000, "8">; |
| 710 | def VST1d16T : VST1D3<0b0100, "16">; |
| 711 | def VST1d32T : VST1D3<0b1000, "32">; |
| 712 | def VST1d64T : VST1D3<0b1100, "64">; |
| 713 | |
| 714 | def VST1d8T_UPD : VST1D3WB<0b0000, "8">; |
| 715 | def VST1d16T_UPD : VST1D3WB<0b0100, "16">; |
| 716 | def VST1d32T_UPD : VST1D3WB<0b1000, "32">; |
| 717 | def VST1d64T_UPD : VST1D3WB<0b1100, "64">; |
| 718 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 719 | def VST1d64TPseudo : VSTQQPseudo<IIC_VST>; |
| 720 | def VST1d64TPseudo_UPD : VSTQQWBPseudo<IIC_VST>; |
| Bob Wilson | 97919e9 | 2010-08-26 18:51:29 +0000 | [diff] [blame] | 721 | |
| Bob Wilson | c286c88 | 2010-03-22 18:22:06 +0000 | [diff] [blame] | 722 | // ...with 4 registers (some of these are only for the disassembler): |
| 723 | class VST1D4<bits<4> op7_4, string Dt> |
| 724 | : NLdSt<0, 0b00, 0b0010, op7_4, (outs), |
| 725 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4), |
| 726 | IIC_VST, "vst1", Dt, "\\{$src1, $src2, $src3, $src4\\}, $addr", "", |
| 727 | []>; |
| Bob Wilson | 322cbff | 2010-03-20 20:54:36 +0000 | [diff] [blame] | 728 | class VST1D4WB<bits<4> op7_4, string Dt> |
| 729 | : NLdSt<0, 0b00, 0b0010, op7_4, (outs GPR:$wb), |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 730 | (ins addrmode6:$addr, am6offset:$offset, |
| Bob Wilson | 322cbff | 2010-03-20 20:54:36 +0000 | [diff] [blame] | 731 | DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4), |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 732 | IIC_VST, "vst1", Dt, "\\{$src1, $src2, $src3, $src4\\}, $addr$offset", |
| Bob Wilson | 98bf518 | 2010-03-22 18:02:38 +0000 | [diff] [blame] | 733 | "$addr.addr = $wb", []>; |
| Bob Wilson | 322cbff | 2010-03-20 20:54:36 +0000 | [diff] [blame] | 734 | |
| Bob Wilson | c286c88 | 2010-03-22 18:22:06 +0000 | [diff] [blame] | 735 | def VST1d8Q : VST1D4<0b0000, "8">; |
| 736 | def VST1d16Q : VST1D4<0b0100, "16">; |
| 737 | def VST1d32Q : VST1D4<0b1000, "32">; |
| 738 | def VST1d64Q : VST1D4<0b1100, "64">; |
| Bob Wilson | 322cbff | 2010-03-20 20:54:36 +0000 | [diff] [blame] | 739 | |
| 740 | def VST1d8Q_UPD : VST1D4WB<0b0000, "8">; |
| 741 | def VST1d16Q_UPD : VST1D4WB<0b0100, "16">; |
| 742 | def VST1d32Q_UPD : VST1D4WB<0b1000, "32">; |
| Bob Wilson | c53a112 | 2010-03-22 18:13:18 +0000 | [diff] [blame] | 743 | def VST1d64Q_UPD : VST1D4WB<0b1100, "64">; |
| Bob Wilson | 25cae66 | 2009-08-12 17:04:56 +0000 | [diff] [blame] | 744 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 745 | def VST1d64QPseudo : VSTQQPseudo<IIC_VST>; |
| 746 | def VST1d64QPseudo_UPD : VSTQQWBPseudo<IIC_VST>; |
| Bob Wilson | 4cec449 | 2010-08-26 05:33:30 +0000 | [diff] [blame] | 747 | |
| Bob Wilson | 0127031 | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 748 | // VST2 : Vector Store (multiple 2-element structures) |
| Bob Wilson | 89ba42c | 2010-03-20 21:15:48 +0000 | [diff] [blame] | 749 | class VST2D<bits<4> op11_8, bits<4> op7_4, string Dt> |
| 750 | : NLdSt<0, 0b00, op11_8, op7_4, (outs), |
| 751 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2), |
| 752 | IIC_VST, "vst2", Dt, "\\{$src1, $src2\\}, $addr", "", []>; |
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 753 | class VST2Q<bits<4> op7_4, string Dt> |
| Bob Wilson | 89ba42c | 2010-03-20 21:15:48 +0000 | [diff] [blame] | 754 | : NLdSt<0, 0b00, 0b0011, op7_4, (outs), |
| Bob Wilson | 50820a2 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 755 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4), |
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 756 | IIC_VST, "vst2", Dt, "\\{$src1, $src2, $src3, $src4\\}, $addr", |
| Bob Wilson | 3dcb537 | 2009-10-07 18:47:39 +0000 | [diff] [blame] | 757 | "", []>; |
| Bob Wilson | 0127031 | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 758 | |
| Bob Wilson | 89ba42c | 2010-03-20 21:15:48 +0000 | [diff] [blame] | 759 | def VST2d8 : VST2D<0b1000, 0b0000, "8">; |
| 760 | def VST2d16 : VST2D<0b1000, 0b0100, "16">; |
| 761 | def VST2d32 : VST2D<0b1000, 0b1000, "32">; |
| Bob Wilson | 0127031 | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 762 | |
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 763 | def VST2q8 : VST2Q<0b0000, "8">; |
| 764 | def VST2q16 : VST2Q<0b0100, "16">; |
| 765 | def VST2q32 : VST2Q<0b1000, "32">; |
| Bob Wilson | 3dcb537 | 2009-10-07 18:47:39 +0000 | [diff] [blame] | 766 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 767 | def VST2d8Pseudo : VSTQPseudo<IIC_VST>; |
| 768 | def VST2d16Pseudo : VSTQPseudo<IIC_VST>; |
| 769 | def VST2d32Pseudo : VSTQPseudo<IIC_VST>; |
| Bob Wilson | 950882b | 2010-08-28 05:12:57 +0000 | [diff] [blame] | 770 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 771 | def VST2q8Pseudo : VSTQQPseudo<IIC_VST>; |
| 772 | def VST2q16Pseudo : VSTQQPseudo<IIC_VST>; |
| 773 | def VST2q32Pseudo : VSTQQPseudo<IIC_VST>; |
| Bob Wilson | 950882b | 2010-08-28 05:12:57 +0000 | [diff] [blame] | 774 | |
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 775 | // ...with address register writeback: |
| 776 | class VST2DWB<bits<4> op11_8, bits<4> op7_4, string Dt> |
| 777 | : NLdSt<0, 0b00, op11_8, op7_4, (outs GPR:$wb), |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 778 | (ins addrmode6:$addr, am6offset:$offset, DPR:$src1, DPR:$src2), |
| 779 | IIC_VST, "vst2", Dt, "\\{$src1, $src2\\}, $addr$offset", |
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 780 | "$addr.addr = $wb", []>; |
| 781 | class VST2QWB<bits<4> op7_4, string Dt> |
| 782 | : NLdSt<0, 0b00, 0b0011, op7_4, (outs GPR:$wb), |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 783 | (ins addrmode6:$addr, am6offset:$offset, |
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 784 | DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4), |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 785 | IIC_VST, "vst2", Dt, "\\{$src1, $src2, $src3, $src4\\}, $addr$offset", |
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 786 | "$addr.addr = $wb", []>; |
| 787 | |
| 788 | def VST2d8_UPD : VST2DWB<0b1000, 0b0000, "8">; |
| 789 | def VST2d16_UPD : VST2DWB<0b1000, 0b0100, "16">; |
| 790 | def VST2d32_UPD : VST2DWB<0b1000, 0b1000, "32">; |
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 791 | |
| 792 | def VST2q8_UPD : VST2QWB<0b0000, "8">; |
| 793 | def VST2q16_UPD : VST2QWB<0b0100, "16">; |
| 794 | def VST2q32_UPD : VST2QWB<0b1000, "32">; |
| 795 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 796 | def VST2d8Pseudo_UPD : VSTQWBPseudo<IIC_VST>; |
| 797 | def VST2d16Pseudo_UPD : VSTQWBPseudo<IIC_VST>; |
| 798 | def VST2d32Pseudo_UPD : VSTQWBPseudo<IIC_VST>; |
| Bob Wilson | 950882b | 2010-08-28 05:12:57 +0000 | [diff] [blame] | 799 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 800 | def VST2q8Pseudo_UPD : VSTQQWBPseudo<IIC_VST>; |
| 801 | def VST2q16Pseudo_UPD : VSTQQWBPseudo<IIC_VST>; |
| 802 | def VST2q32Pseudo_UPD : VSTQQWBPseudo<IIC_VST>; |
| Bob Wilson | 950882b | 2010-08-28 05:12:57 +0000 | [diff] [blame] | 803 | |
| Bob Wilson | 89ba42c | 2010-03-20 21:15:48 +0000 | [diff] [blame] | 804 | // ...with double-spaced registers (for disassembly only): |
| 805 | def VST2b8 : VST2D<0b1001, 0b0000, "8">; |
| 806 | def VST2b16 : VST2D<0b1001, 0b0100, "16">; |
| 807 | def VST2b32 : VST2D<0b1001, 0b1000, "32">; |
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 808 | def VST2b8_UPD : VST2DWB<0b1001, 0b0000, "8">; |
| 809 | def VST2b16_UPD : VST2DWB<0b1001, 0b0100, "16">; |
| 810 | def VST2b32_UPD : VST2DWB<0b1001, 0b1000, "32">; |
| Johnny Chen | d5c472d | 2010-02-24 02:57:20 +0000 | [diff] [blame] | 811 | |
| Bob Wilson | 0127031 | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 812 | // VST3 : Vector Store (multiple 3-element structures) |
| Bob Wilson | 89ba42c | 2010-03-20 21:15:48 +0000 | [diff] [blame] | 813 | class VST3D<bits<4> op11_8, bits<4> op7_4, string Dt> |
| 814 | : NLdSt<0, 0b00, op11_8, op7_4, (outs), |
| Bob Wilson | 50820a2 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 815 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3), IIC_VST, |
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 816 | "vst3", Dt, "\\{$src1, $src2, $src3\\}, $addr", "", []>; |
| Bob Wilson | 0127031 | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 817 | |
| Bob Wilson | 89ba42c | 2010-03-20 21:15:48 +0000 | [diff] [blame] | 818 | def VST3d8 : VST3D<0b0100, 0b0000, "8">; |
| 819 | def VST3d16 : VST3D<0b0100, 0b0100, "16">; |
| 820 | def VST3d32 : VST3D<0b0100, 0b1000, "32">; |
| Bob Wilson | 0127031 | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 821 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 822 | def VST3d8Pseudo : VSTQQPseudo<IIC_VST>; |
| 823 | def VST3d16Pseudo : VSTQQPseudo<IIC_VST>; |
| 824 | def VST3d32Pseudo : VSTQQPseudo<IIC_VST>; |
| Bob Wilson | 97919e9 | 2010-08-26 18:51:29 +0000 | [diff] [blame] | 825 | |
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 826 | // ...with address register writeback: |
| 827 | class VST3DWB<bits<4> op11_8, bits<4> op7_4, string Dt> |
| 828 | : NLdSt<0, 0b00, op11_8, op7_4, (outs GPR:$wb), |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 829 | (ins addrmode6:$addr, am6offset:$offset, |
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 830 | DPR:$src1, DPR:$src2, DPR:$src3), IIC_VST, |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 831 | "vst3", Dt, "\\{$src1, $src2, $src3\\}, $addr$offset", |
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 832 | "$addr.addr = $wb", []>; |
| 833 | |
| 834 | def VST3d8_UPD : VST3DWB<0b0100, 0b0000, "8">; |
| 835 | def VST3d16_UPD : VST3DWB<0b0100, 0b0100, "16">; |
| 836 | def VST3d32_UPD : VST3DWB<0b0100, 0b1000, "32">; |
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 837 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 838 | def VST3d8Pseudo_UPD : VSTQQWBPseudo<IIC_VST>; |
| 839 | def VST3d16Pseudo_UPD : VSTQQWBPseudo<IIC_VST>; |
| 840 | def VST3d32Pseudo_UPD : VSTQQWBPseudo<IIC_VST>; |
| Bob Wilson | 97919e9 | 2010-08-26 18:51:29 +0000 | [diff] [blame] | 841 | |
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 842 | // ...with double-spaced registers (non-updating versions for disassembly only): |
| Bob Wilson | 89ba42c | 2010-03-20 21:15:48 +0000 | [diff] [blame] | 843 | def VST3q8 : VST3D<0b0101, 0b0000, "8">; |
| 844 | def VST3q16 : VST3D<0b0101, 0b0100, "16">; |
| 845 | def VST3q32 : VST3D<0b0101, 0b1000, "32">; |
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 846 | def VST3q8_UPD : VST3DWB<0b0101, 0b0000, "8">; |
| 847 | def VST3q16_UPD : VST3DWB<0b0101, 0b0100, "16">; |
| 848 | def VST3q32_UPD : VST3DWB<0b0101, 0b1000, "32">; |
| Bob Wilson | 89ba42c | 2010-03-20 21:15:48 +0000 | [diff] [blame] | 849 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 850 | def VST3q8Pseudo_UPD : VSTQQQQWBPseudo<IIC_VST>; |
| 851 | def VST3q16Pseudo_UPD : VSTQQQQWBPseudo<IIC_VST>; |
| 852 | def VST3q32Pseudo_UPD : VSTQQQQWBPseudo<IIC_VST>; |
| Bob Wilson | 97919e9 | 2010-08-26 18:51:29 +0000 | [diff] [blame] | 853 | |
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 854 | // ...alternate versions to be allocated odd register numbers: |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 855 | def VST3q8oddPseudo_UPD : VSTQQQQWBPseudo<IIC_VST>; |
| 856 | def VST3q16oddPseudo_UPD : VSTQQQQWBPseudo<IIC_VST>; |
| 857 | def VST3q32oddPseudo_UPD : VSTQQQQWBPseudo<IIC_VST>; |
| Bob Wilson | 2346486 | 2009-10-07 20:30:08 +0000 | [diff] [blame] | 858 | |
| Bob Wilson | 0127031 | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 859 | // VST4 : Vector Store (multiple 4-element structures) |
| Bob Wilson | 89ba42c | 2010-03-20 21:15:48 +0000 | [diff] [blame] | 860 | class VST4D<bits<4> op11_8, bits<4> op7_4, string Dt> |
| 861 | : NLdSt<0, 0b00, op11_8, op7_4, (outs), |
| Bob Wilson | 50820a2 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 862 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4), |
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 863 | IIC_VST, "vst4", Dt, "\\{$src1, $src2, $src3, $src4\\}, $addr", |
| Bob Wilson | 9129376 | 2009-08-25 17:46:06 +0000 | [diff] [blame] | 864 | "", []>; |
| Bob Wilson | 0127031 | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 865 | |
| Bob Wilson | 89ba42c | 2010-03-20 21:15:48 +0000 | [diff] [blame] | 866 | def VST4d8 : VST4D<0b0000, 0b0000, "8">; |
| 867 | def VST4d16 : VST4D<0b0000, 0b0100, "16">; |
| 868 | def VST4d32 : VST4D<0b0000, 0b1000, "32">; |
| Bob Wilson | d779775 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 869 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 870 | def VST4d8Pseudo : VSTQQPseudo<IIC_VST>; |
| 871 | def VST4d16Pseudo : VSTQQPseudo<IIC_VST>; |
| 872 | def VST4d32Pseudo : VSTQQPseudo<IIC_VST>; |
| Bob Wilson | 9392b0e | 2010-08-25 23:27:42 +0000 | [diff] [blame] | 873 | |
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 874 | // ...with address register writeback: |
| 875 | class VST4DWB<bits<4> op11_8, bits<4> op7_4, string Dt> |
| 876 | : NLdSt<0, 0b00, op11_8, op7_4, (outs GPR:$wb), |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 877 | (ins addrmode6:$addr, am6offset:$offset, |
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 878 | DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4), IIC_VST, |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 879 | "vst4", Dt, "\\{$src1, $src2, $src3, $src4\\}, $addr$offset", |
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 880 | "$addr.addr = $wb", []>; |
| 881 | |
| 882 | def VST4d8_UPD : VST4DWB<0b0000, 0b0000, "8">; |
| 883 | def VST4d16_UPD : VST4DWB<0b0000, 0b0100, "16">; |
| 884 | def VST4d32_UPD : VST4DWB<0b0000, 0b1000, "32">; |
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 885 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 886 | def VST4d8Pseudo_UPD : VSTQQWBPseudo<IIC_VST>; |
| 887 | def VST4d16Pseudo_UPD : VSTQQWBPseudo<IIC_VST>; |
| 888 | def VST4d32Pseudo_UPD : VSTQQWBPseudo<IIC_VST>; |
| Bob Wilson | 9392b0e | 2010-08-25 23:27:42 +0000 | [diff] [blame] | 889 | |
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 890 | // ...with double-spaced registers (non-updating versions for disassembly only): |
| Bob Wilson | 89ba42c | 2010-03-20 21:15:48 +0000 | [diff] [blame] | 891 | def VST4q8 : VST4D<0b0001, 0b0000, "8">; |
| 892 | def VST4q16 : VST4D<0b0001, 0b0100, "16">; |
| 893 | def VST4q32 : VST4D<0b0001, 0b1000, "32">; |
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 894 | def VST4q8_UPD : VST4DWB<0b0001, 0b0000, "8">; |
| 895 | def VST4q16_UPD : VST4DWB<0b0001, 0b0100, "16">; |
| 896 | def VST4q32_UPD : VST4DWB<0b0001, 0b1000, "32">; |
| Bob Wilson | 89ba42c | 2010-03-20 21:15:48 +0000 | [diff] [blame] | 897 | |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 898 | def VST4q8Pseudo_UPD : VSTQQQQWBPseudo<IIC_VST>; |
| 899 | def VST4q16Pseudo_UPD : VSTQQQQWBPseudo<IIC_VST>; |
| 900 | def VST4q32Pseudo_UPD : VSTQQQQWBPseudo<IIC_VST>; |
| Bob Wilson | 9392b0e | 2010-08-25 23:27:42 +0000 | [diff] [blame] | 901 | |
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 902 | // ...alternate versions to be allocated odd register numbers: |
| Bob Wilson | dd29db5 | 2010-09-14 20:59:49 +0000 | [diff] [blame] | 903 | def VST4q8oddPseudo_UPD : VSTQQQQWBPseudo<IIC_VST>; |
| 904 | def VST4q16oddPseudo_UPD : VSTQQQQWBPseudo<IIC_VST>; |
| 905 | def VST4q32oddPseudo_UPD : VSTQQQQWBPseudo<IIC_VST>; |
| Bob Wilson | 50820a2 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 906 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 907 | // Classes for VST*LN pseudo-instructions with multi-register operands. |
| 908 | // These are expanded to real instructions after register allocation. |
| 909 | class VSTQLNPseudo<InstrItinClass itin> |
| 910 | : PseudoNLdSt<(outs), (ins addrmode6:$addr, QPR:$src, nohash_imm:$lane), |
| 911 | itin, "">; |
| 912 | class VSTQLNWBPseudo<InstrItinClass itin> |
| 913 | : PseudoNLdSt<(outs GPR:$wb), |
| 914 | (ins addrmode6:$addr, am6offset:$offset, QPR:$src, |
| 915 | nohash_imm:$lane), itin, "$addr.addr = $wb">; |
| 916 | class VSTQQLNPseudo<InstrItinClass itin> |
| 917 | : PseudoNLdSt<(outs), (ins addrmode6:$addr, QQPR:$src, nohash_imm:$lane), |
| 918 | itin, "">; |
| 919 | class VSTQQLNWBPseudo<InstrItinClass itin> |
| 920 | : PseudoNLdSt<(outs GPR:$wb), |
| 921 | (ins addrmode6:$addr, am6offset:$offset, QQPR:$src, |
| 922 | nohash_imm:$lane), itin, "$addr.addr = $wb">; |
| 923 | class VSTQQQQLNPseudo<InstrItinClass itin> |
| 924 | : PseudoNLdSt<(outs), (ins addrmode6:$addr, QQQQPR:$src, nohash_imm:$lane), |
| 925 | itin, "">; |
| 926 | class VSTQQQQLNWBPseudo<InstrItinClass itin> |
| 927 | : PseudoNLdSt<(outs GPR:$wb), |
| 928 | (ins addrmode6:$addr, am6offset:$offset, QQQQPR:$src, |
| 929 | nohash_imm:$lane), itin, "$addr.addr = $wb">; |
| 930 | |
| Bob Wilson | 50820a2 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 931 | // VST1LN : Vector Store (single element from one lane) |
| 932 | // FIXME: Not yet implemented. |
| Bob Wilson | e7ef4a9 | 2009-10-07 20:49:18 +0000 | [diff] [blame] | 933 | |
| Bob Wilson | d779775 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 934 | // VST2LN : Vector Store (single 2-element structure from one lane) |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 935 | class VST2LN<bits<4> op11_8, bits<4> op7_4, string Dt> |
| 936 | : NLdSt<1, 0b00, op11_8, op7_4, (outs), |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 937 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, nohash_imm:$lane), |
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 938 | IIC_VST, "vst2", Dt, "\\{$src1[$lane], $src2[$lane]\\}, $addr", |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 939 | "", []>; |
| Bob Wilson | d779775 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 940 | |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 941 | def VST2LNd8 : VST2LN<0b0001, {?,?,?,?}, "8">; |
| 942 | def VST2LNd16 : VST2LN<0b0101, {?,?,0,?}, "16">; |
| 943 | def VST2LNd32 : VST2LN<0b1001, {?,0,?,?}, "32">; |
| Bob Wilson | b851eb3 | 2009-10-08 23:38:24 +0000 | [diff] [blame] | 944 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 945 | def VST2LNd8Pseudo : VSTQLNPseudo<IIC_VST>; |
| 946 | def VST2LNd16Pseudo : VSTQLNPseudo<IIC_VST>; |
| 947 | def VST2LNd32Pseudo : VSTQLNPseudo<IIC_VST>; |
| 948 | |
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 949 | // ...with double-spaced registers: |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 950 | def VST2LNq16 : VST2LN<0b0101, {?,?,1,?}, "16">; |
| 951 | def VST2LNq32 : VST2LN<0b1001, {?,1,?,?}, "32">; |
| Bob Wilson | b851eb3 | 2009-10-08 23:38:24 +0000 | [diff] [blame] | 952 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 953 | def VST2LNq16Pseudo : VSTQQLNPseudo<IIC_VST>; |
| 954 | def VST2LNq32Pseudo : VSTQQLNPseudo<IIC_VST>; |
| Bob Wilson | d779775 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 955 | |
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 956 | // ...with address register writeback: |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 957 | class VST2LNWB<bits<4> op11_8, bits<4> op7_4, string Dt> |
| 958 | : NLdSt<1, 0b00, op11_8, op7_4, (outs GPR:$wb), |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 959 | (ins addrmode6:$addr, am6offset:$offset, |
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 960 | DPR:$src1, DPR:$src2, nohash_imm:$lane), IIC_VST, "vst2", Dt, |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 961 | "\\{$src1[$lane], $src2[$lane]\\}, $addr$offset", |
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 962 | "$addr.addr = $wb", []>; |
| 963 | |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 964 | def VST2LNd8_UPD : VST2LNWB<0b0001, {?,?,?,?}, "8">; |
| 965 | def VST2LNd16_UPD : VST2LNWB<0b0101, {?,?,0,?}, "16">; |
| 966 | def VST2LNd32_UPD : VST2LNWB<0b1001, {?,0,?,?}, "32">; |
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 967 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 968 | def VST2LNd8Pseudo_UPD : VSTQLNWBPseudo<IIC_VST>; |
| 969 | def VST2LNd16Pseudo_UPD : VSTQLNWBPseudo<IIC_VST>; |
| 970 | def VST2LNd32Pseudo_UPD : VSTQLNWBPseudo<IIC_VST>; |
| 971 | |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 972 | def VST2LNq16_UPD : VST2LNWB<0b0101, {?,?,1,?}, "16">; |
| 973 | def VST2LNq32_UPD : VST2LNWB<0b1001, {?,1,?,?}, "32">; |
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 974 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 975 | def VST2LNq16Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST>; |
| 976 | def VST2LNq32Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST>; |
| 977 | |
| Bob Wilson | d779775 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 978 | // VST3LN : Vector Store (single 3-element structure from one lane) |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 979 | class VST3LN<bits<4> op11_8, bits<4> op7_4, string Dt> |
| 980 | : NLdSt<1, 0b00, op11_8, op7_4, (outs), |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 981 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3, |
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 982 | nohash_imm:$lane), IIC_VST, "vst3", Dt, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 983 | "\\{$src1[$lane], $src2[$lane], $src3[$lane]\\}, $addr", "", []>; |
| Bob Wilson | d779775 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 984 | |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 985 | def VST3LNd8 : VST3LN<0b0010, {?,?,?,0}, "8">; |
| 986 | def VST3LNd16 : VST3LN<0b0110, {?,?,0,0}, "16">; |
| 987 | def VST3LNd32 : VST3LN<0b1010, {?,0,0,0}, "32">; |
| Bob Wilson | c4090308 | 2009-10-08 23:51:31 +0000 | [diff] [blame] | 988 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 989 | def VST3LNd8Pseudo : VSTQQLNPseudo<IIC_VST>; |
| 990 | def VST3LNd16Pseudo : VSTQQLNPseudo<IIC_VST>; |
| 991 | def VST3LNd32Pseudo : VSTQQLNPseudo<IIC_VST>; |
| 992 | |
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 993 | // ...with double-spaced registers: |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 994 | def VST3LNq16 : VST3LN<0b0110, {?,?,1,0}, "16">; |
| 995 | def VST3LNq32 : VST3LN<0b1010, {?,1,0,0}, "32">; |
| Bob Wilson | c4090308 | 2009-10-08 23:51:31 +0000 | [diff] [blame] | 996 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 997 | def VST3LNq16Pseudo : VSTQQQQLNPseudo<IIC_VST>; |
| 998 | def VST3LNq32Pseudo : VSTQQQQLNPseudo<IIC_VST>; |
| Bob Wilson | d779775 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 999 | |
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 1000 | // ...with address register writeback: |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 1001 | class VST3LNWB<bits<4> op11_8, bits<4> op7_4, string Dt> |
| 1002 | : NLdSt<1, 0b00, op11_8, op7_4, (outs GPR:$wb), |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 1003 | (ins addrmode6:$addr, am6offset:$offset, |
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 1004 | DPR:$src1, DPR:$src2, DPR:$src3, nohash_imm:$lane), |
| 1005 | IIC_VST, "vst3", Dt, |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 1006 | "\\{$src1[$lane], $src2[$lane], $src3[$lane]\\}, $addr$offset", |
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 1007 | "$addr.addr = $wb", []>; |
| 1008 | |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 1009 | def VST3LNd8_UPD : VST3LNWB<0b0010, {?,?,?,0}, "8">; |
| 1010 | def VST3LNd16_UPD : VST3LNWB<0b0110, {?,?,0,0}, "16">; |
| 1011 | def VST3LNd32_UPD : VST3LNWB<0b1010, {?,0,0,0}, "32">; |
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 1012 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 1013 | def VST3LNd8Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST>; |
| 1014 | def VST3LNd16Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST>; |
| 1015 | def VST3LNd32Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST>; |
| 1016 | |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 1017 | def VST3LNq16_UPD : VST3LNWB<0b0110, {?,?,1,0}, "16">; |
| 1018 | def VST3LNq32_UPD : VST3LNWB<0b1010, {?,1,0,0}, "32">; |
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 1019 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 1020 | def VST3LNq16Pseudo_UPD : VSTQQQQLNWBPseudo<IIC_VST>; |
| 1021 | def VST3LNq32Pseudo_UPD : VSTQQQQLNWBPseudo<IIC_VST>; |
| 1022 | |
| Bob Wilson | d779775 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 1023 | // VST4LN : Vector Store (single 4-element structure from one lane) |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 1024 | class VST4LN<bits<4> op11_8, bits<4> op7_4, string Dt> |
| 1025 | : NLdSt<1, 0b00, op11_8, op7_4, (outs), |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1026 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4, |
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 1027 | nohash_imm:$lane), IIC_VST, "vst4", Dt, |
| Bob Wilson | 7430a98 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 1028 | "\\{$src1[$lane], $src2[$lane], $src3[$lane], $src4[$lane]\\}, $addr", |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1029 | "", []>; |
| Bob Wilson | d779775 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 1030 | |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 1031 | def VST4LNd8 : VST4LN<0b0011, {?,?,?,?}, "8">; |
| 1032 | def VST4LNd16 : VST4LN<0b0111, {?,?,0,?}, "16">; |
| 1033 | def VST4LNd32 : VST4LN<0b1011, {?,0,?,?}, "32">; |
| Bob Wilson | 84e7967 | 2009-10-09 00:01:36 +0000 | [diff] [blame] | 1034 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 1035 | def VST4LNd8Pseudo : VSTQQLNPseudo<IIC_VST>; |
| 1036 | def VST4LNd16Pseudo : VSTQQLNPseudo<IIC_VST>; |
| 1037 | def VST4LNd32Pseudo : VSTQQLNPseudo<IIC_VST>; |
| 1038 | |
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 1039 | // ...with double-spaced registers: |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 1040 | def VST4LNq16 : VST4LN<0b0111, {?,?,1,?}, "16">; |
| 1041 | def VST4LNq32 : VST4LN<0b1011, {?,1,?,?}, "32">; |
| Bob Wilson | 84e7967 | 2009-10-09 00:01:36 +0000 | [diff] [blame] | 1042 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 1043 | def VST4LNq16Pseudo : VSTQQQQLNPseudo<IIC_VST>; |
| 1044 | def VST4LNq32Pseudo : VSTQQQQLNPseudo<IIC_VST>; |
| Bob Wilson | 84e7967 | 2009-10-09 00:01:36 +0000 | [diff] [blame] | 1045 | |
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 1046 | // ...with address register writeback: |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 1047 | class VST4LNWB<bits<4> op11_8, bits<4> op7_4, string Dt> |
| 1048 | : NLdSt<1, 0b00, op11_8, op7_4, (outs GPR:$wb), |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 1049 | (ins addrmode6:$addr, am6offset:$offset, |
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 1050 | DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4, nohash_imm:$lane), |
| 1051 | IIC_VST, "vst4", Dt, |
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 1052 | "\\{$src1[$lane], $src2[$lane], $src3[$lane], $src4[$lane]\\}, $addr$offset", |
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 1053 | "$addr.addr = $wb", []>; |
| 1054 | |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 1055 | def VST4LNd8_UPD : VST4LNWB<0b0011, {?,?,?,?}, "8">; |
| 1056 | def VST4LNd16_UPD : VST4LNWB<0b0111, {?,?,0,?}, "16">; |
| 1057 | def VST4LNd32_UPD : VST4LNWB<0b1011, {?,0,?,?}, "32">; |
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 1058 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 1059 | def VST4LNd8Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST>; |
| 1060 | def VST4LNd16Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST>; |
| 1061 | def VST4LNd32Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST>; |
| 1062 | |
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 1063 | def VST4LNq16_UPD : VST4LNWB<0b0111, {?,?,1,?}, "16">; |
| 1064 | def VST4LNq32_UPD : VST4LNWB<0b1011, {?,1,?,?}, "32">; |
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 1065 | |
| Bob Wilson | d5c57a5 | 2010-09-13 23:01:35 +0000 | [diff] [blame] | 1066 | def VST4LNq16Pseudo_UPD : VSTQQQQLNWBPseudo<IIC_VST>; |
| 1067 | def VST4LNq32Pseudo_UPD : VSTQQQQLNWBPseudo<IIC_VST>; |
| 1068 | |
| Evan Cheng | dd7f566 | 2010-05-19 06:07:03 +0000 | [diff] [blame] | 1069 | } // mayStore = 1, neverHasSideEffects = 1, hasExtraSrcRegAllocReq = 1 |
| Bob Wilson | 0127031 | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 1070 | |
| Bob Wilson | f731a2d | 2009-07-08 18:11:30 +0000 | [diff] [blame] | 1071 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1072 | //===----------------------------------------------------------------------===// |
| 1073 | // NEON pattern fragments |
| 1074 | //===----------------------------------------------------------------------===// |
| 1075 | |
| 1076 | // Extract D sub-registers of Q registers. |
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 1077 | def DSubReg_i8_reg : SDNodeXForm<imm, [{ |
| Jakob Stoklund Olesen | 8d042c0 | 2010-05-24 17:13:28 +0000 | [diff] [blame] | 1078 | assert(ARM::dsub_7 == ARM::dsub_0+7 && "Unexpected subreg numbering"); |
| 1079 | return CurDAG->getTargetConstant(ARM::dsub_0 + N->getZExtValue()/8, MVT::i32); |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1080 | }]>; |
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 1081 | def DSubReg_i16_reg : SDNodeXForm<imm, [{ |
| Jakob Stoklund Olesen | 8d042c0 | 2010-05-24 17:13:28 +0000 | [diff] [blame] | 1082 | assert(ARM::dsub_7 == ARM::dsub_0+7 && "Unexpected subreg numbering"); |
| 1083 | return CurDAG->getTargetConstant(ARM::dsub_0 + N->getZExtValue()/4, MVT::i32); |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1084 | }]>; |
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 1085 | def DSubReg_i32_reg : SDNodeXForm<imm, [{ |
| Jakob Stoklund Olesen | 8d042c0 | 2010-05-24 17:13:28 +0000 | [diff] [blame] | 1086 | assert(ARM::dsub_7 == ARM::dsub_0+7 && "Unexpected subreg numbering"); |
| 1087 | return CurDAG->getTargetConstant(ARM::dsub_0 + N->getZExtValue()/2, MVT::i32); |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1088 | }]>; |
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 1089 | def DSubReg_f64_reg : SDNodeXForm<imm, [{ |
| Jakob Stoklund Olesen | 8d042c0 | 2010-05-24 17:13:28 +0000 | [diff] [blame] | 1090 | assert(ARM::dsub_7 == ARM::dsub_0+7 && "Unexpected subreg numbering"); |
| 1091 | return CurDAG->getTargetConstant(ARM::dsub_0 + N->getZExtValue(), MVT::i32); |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1092 | }]>; |
| 1093 | |
| Anton Korobeynikov | cd41d07 | 2009-08-28 23:41:26 +0000 | [diff] [blame] | 1094 | // Extract S sub-registers of Q/D registers. |
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 1095 | def SSubReg_f32_reg : SDNodeXForm<imm, [{ |
| Jakob Stoklund Olesen | 8d042c0 | 2010-05-24 17:13:28 +0000 | [diff] [blame] | 1096 | assert(ARM::ssub_3 == ARM::ssub_0+3 && "Unexpected subreg numbering"); |
| 1097 | return CurDAG->getTargetConstant(ARM::ssub_0 + N->getZExtValue(), MVT::i32); |
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 1098 | }]>; |
| 1099 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1100 | // Translate lane numbers from Q registers to D subregs. |
| 1101 | def SubReg_i8_lane : SDNodeXForm<imm, [{ |
| Owen Anderson | 9f94459 | 2009-08-11 20:47:22 +0000 | [diff] [blame] | 1102 | return CurDAG->getTargetConstant(N->getZExtValue() & 7, MVT::i32); |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1103 | }]>; |
| 1104 | def SubReg_i16_lane : SDNodeXForm<imm, [{ |
| Owen Anderson | 9f94459 | 2009-08-11 20:47:22 +0000 | [diff] [blame] | 1105 | return CurDAG->getTargetConstant(N->getZExtValue() & 3, MVT::i32); |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1106 | }]>; |
| 1107 | def SubReg_i32_lane : SDNodeXForm<imm, [{ |
| Owen Anderson | 9f94459 | 2009-08-11 20:47:22 +0000 | [diff] [blame] | 1108 | return CurDAG->getTargetConstant(N->getZExtValue() & 1, MVT::i32); |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1109 | }]>; |
| 1110 | |
| 1111 | //===----------------------------------------------------------------------===// |
| 1112 | // Instruction Classes |
| 1113 | //===----------------------------------------------------------------------===// |
| 1114 | |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 1115 | // Basic 2-register operations: single-, double- and quad-register. |
| 1116 | class N2VS<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, |
| 1117 | bits<2> op17_16, bits<5> op11_7, bit op4, string OpcodeStr, |
| 1118 | string Dt, ValueType ResTy, ValueType OpTy, SDNode OpNode> |
| Johnny Chen | e99953c | 2010-03-24 19:47:14 +0000 | [diff] [blame] | 1119 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, |
| 1120 | (outs DPR_VFP2:$dst), (ins DPR_VFP2:$src), |
| 1121 | IIC_VUNAD, OpcodeStr, Dt, "$dst, $src", "", []>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1122 | class N2VD<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 1123 | bits<2> op17_16, bits<5> op11_7, bit op4, string OpcodeStr, |
| 1124 | string Dt, ValueType ResTy, ValueType OpTy, SDNode OpNode> |
| Johnny Chen | e99953c | 2010-03-24 19:47:14 +0000 | [diff] [blame] | 1125 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, (outs DPR:$dst), |
| 1126 | (ins DPR:$src), IIC_VUNAD, OpcodeStr, Dt,"$dst, $src", "", |
| 1127 | [(set DPR:$dst, (ResTy (OpNode (OpTy DPR:$src))))]>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1128 | class N2VQ<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 1129 | bits<2> op17_16, bits<5> op11_7, bit op4, string OpcodeStr, |
| 1130 | string Dt, ValueType ResTy, ValueType OpTy, SDNode OpNode> |
| Johnny Chen | e99953c | 2010-03-24 19:47:14 +0000 | [diff] [blame] | 1131 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 1, op4, (outs QPR:$dst), |
| 1132 | (ins QPR:$src), IIC_VUNAQ, OpcodeStr, Dt,"$dst, $src", "", |
| 1133 | [(set QPR:$dst, (ResTy (OpNode (OpTy QPR:$src))))]>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1134 | |
| Bob Wilson | cb2deb2 | 2010-02-17 22:42:54 +0000 | [diff] [blame] | 1135 | // Basic 2-register intrinsics, both double- and quad-register. |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1136 | class N2VDInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, |
| Johnny Chen | d82f900 | 2010-03-25 20:39:04 +0000 | [diff] [blame] | 1137 | bits<2> op17_16, bits<5> op11_7, bit op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1138 | InstrItinClass itin, string OpcodeStr, string Dt, |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1139 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
| 1140 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, (outs DPR:$dst), |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1141 | (ins DPR:$src), itin, OpcodeStr, Dt, "$dst, $src", "", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1142 | [(set DPR:$dst, (ResTy (IntOp (OpTy DPR:$src))))]>; |
| 1143 | class N2VQInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1144 | bits<2> op17_16, bits<5> op11_7, bit op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1145 | InstrItinClass itin, string OpcodeStr, string Dt, |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1146 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
| 1147 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 1, op4, (outs QPR:$dst), |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1148 | (ins QPR:$src), itin, OpcodeStr, Dt, "$dst, $src", "", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1149 | [(set QPR:$dst, (ResTy (IntOp (OpTy QPR:$src))))]>; |
| 1150 | |
| Bob Wilson | 4cd8a12 | 2010-08-30 20:02:30 +0000 | [diff] [blame] | 1151 | // Narrow 2-register operations. |
| 1152 | class N2VN<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, |
| 1153 | bits<2> op17_16, bits<5> op11_7, bit op6, bit op4, |
| 1154 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 1155 | ValueType TyD, ValueType TyQ, SDNode OpNode> |
| 1156 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, op6, op4, (outs DPR:$dst), |
| 1157 | (ins QPR:$src), itin, OpcodeStr, Dt, "$dst, $src", "", |
| 1158 | [(set DPR:$dst, (TyD (OpNode (TyQ QPR:$src))))]>; |
| 1159 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1160 | // Narrow 2-register intrinsics. |
| 1161 | class N2VNInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, |
| 1162 | bits<2> op17_16, bits<5> op11_7, bit op6, bit op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1163 | InstrItinClass itin, string OpcodeStr, string Dt, |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1164 | ValueType TyD, ValueType TyQ, Intrinsic IntOp> |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1165 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, op6, op4, (outs DPR:$dst), |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1166 | (ins QPR:$src), itin, OpcodeStr, Dt, "$dst, $src", "", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1167 | [(set DPR:$dst, (TyD (IntOp (TyQ QPR:$src))))]>; |
| 1168 | |
| Bob Wilson | 9a511c0 | 2010-08-20 04:54:02 +0000 | [diff] [blame] | 1169 | // Long 2-register operations (currently only used for VMOVL). |
| 1170 | class N2VL<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, |
| 1171 | bits<2> op17_16, bits<5> op11_7, bit op6, bit op4, |
| 1172 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 1173 | ValueType TyQ, ValueType TyD, SDNode OpNode> |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1174 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, op6, op4, (outs QPR:$dst), |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1175 | (ins DPR:$src), itin, OpcodeStr, Dt, "$dst, $src", "", |
| Bob Wilson | 9a511c0 | 2010-08-20 04:54:02 +0000 | [diff] [blame] | 1176 | [(set QPR:$dst, (TyQ (OpNode (TyD DPR:$src))))]>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1177 | |
| Bob Wilson | e223107 | 2009-08-08 06:13:25 +0000 | [diff] [blame] | 1178 | // 2-register shuffles (VTRN/VZIP/VUZP), both double- and quad-register. |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1179 | class N2VDShuffle<bits<2> op19_18, bits<5> op11_7, string OpcodeStr, string Dt> |
| Bob Wilson | e223107 | 2009-08-08 06:13:25 +0000 | [diff] [blame] | 1180 | : N2V<0b11, 0b11, op19_18, 0b10, op11_7, 0, 0, (outs DPR:$dst1, DPR:$dst2), |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1181 | (ins DPR:$src1, DPR:$src2), IIC_VPERMD, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1182 | OpcodeStr, Dt, "$dst1, $dst2", |
| Johnny Chen | 274a0d3 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 1183 | "$src1 = $dst1, $src2 = $dst2", []>; |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1184 | class N2VQShuffle<bits<2> op19_18, bits<5> op11_7, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1185 | InstrItinClass itin, string OpcodeStr, string Dt> |
| Bob Wilson | e223107 | 2009-08-08 06:13:25 +0000 | [diff] [blame] | 1186 | : N2V<0b11, 0b11, op19_18, 0b10, op11_7, 1, 0, (outs QPR:$dst1, QPR:$dst2), |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1187 | (ins QPR:$src1, QPR:$src2), itin, OpcodeStr, Dt, "$dst1, $dst2", |
| Johnny Chen | 274a0d3 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 1188 | "$src1 = $dst1, $src2 = $dst2", []>; |
| Bob Wilson | e223107 | 2009-08-08 06:13:25 +0000 | [diff] [blame] | 1189 | |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 1190 | // Basic 3-register operations: single-, double- and quad-register. |
| 1191 | class N3VS<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| 1192 | string OpcodeStr, string Dt, ValueType ResTy, ValueType OpTy, |
| 1193 | SDNode OpNode, bit Commutable> |
| 1194 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1195 | (outs DPR_VFP2:$dst), (ins DPR_VFP2:$src1, DPR_VFP2:$src2), N3RegFrm, |
| 1196 | IIC_VBIND, OpcodeStr, Dt, "$dst, $src1, $src2", "", []> { |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 1197 | let isCommutable = Commutable; |
| 1198 | } |
| 1199 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1200 | class N3VD<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1201 | InstrItinClass itin, string OpcodeStr, string Dt, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1202 | ValueType ResTy, ValueType OpTy, SDNode OpNode, bit Commutable> |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1203 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1204 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2), N3RegFrm, itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1205 | OpcodeStr, Dt, "$dst, $src1, $src2", "", |
| 1206 | [(set DPR:$dst, (ResTy (OpNode (OpTy DPR:$src1), (OpTy DPR:$src2))))]> { |
| 1207 | let isCommutable = Commutable; |
| 1208 | } |
| 1209 | // Same as N3VD but no data type. |
| 1210 | class N3VDX<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| 1211 | InstrItinClass itin, string OpcodeStr, |
| 1212 | ValueType ResTy, ValueType OpTy, |
| 1213 | SDNode OpNode, bit Commutable> |
| 1214 | : N3VX<op24, op23, op21_20, op11_8, 0, op4, |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1215 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2), N3RegFrm, itin, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1216 | OpcodeStr, "$dst, $src1, $src2", "", |
| 1217 | [(set DPR:$dst, (ResTy (OpNode (OpTy DPR:$src1), (OpTy DPR:$src2))))]>{ |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1218 | let isCommutable = Commutable; |
| 1219 | } |
| Johnny Chen | 6094cda | 2010-03-27 01:03:13 +0000 | [diff] [blame] | 1220 | |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1221 | class N3VDSL<bits<2> op21_20, bits<4> op11_8, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1222 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 1223 | ValueType Ty, SDNode ShOp> |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1224 | : N3V<0, 1, op21_20, op11_8, 1, 0, |
| 1225 | (outs DPR:$dst), (ins DPR:$src1, DPR_VFP2:$src2, nohash_imm:$lane), |
| 1226 | NVMulSLFrm, itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", |
| 1227 | [(set (Ty DPR:$dst), |
| 1228 | (Ty (ShOp (Ty DPR:$src1), |
| 1229 | (Ty (NEONvduplane (Ty DPR_VFP2:$src2),imm:$lane)))))]> { |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1230 | let isCommutable = 0; |
| 1231 | } |
| 1232 | class N3VDSL16<bits<2> op21_20, bits<4> op11_8, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1233 | string OpcodeStr, string Dt, ValueType Ty, SDNode ShOp> |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1234 | : N3V<0, 1, op21_20, op11_8, 1, 0, |
| 1235 | (outs DPR:$dst), (ins DPR:$src1, DPR_8:$src2, nohash_imm:$lane), |
| 1236 | NVMulSLFrm, IIC_VMULi16D, OpcodeStr, Dt,"$dst, $src1, $src2[$lane]","", |
| 1237 | [(set (Ty DPR:$dst), |
| 1238 | (Ty (ShOp (Ty DPR:$src1), |
| 1239 | (Ty (NEONvduplane (Ty DPR_8:$src2), imm:$lane)))))]> { |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1240 | let isCommutable = 0; |
| 1241 | } |
| 1242 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1243 | class N3VQ<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1244 | InstrItinClass itin, string OpcodeStr, string Dt, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1245 | ValueType ResTy, ValueType OpTy, SDNode OpNode, bit Commutable> |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1246 | : N3V<op24, op23, op21_20, op11_8, 1, op4, |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1247 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2), N3RegFrm, itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1248 | OpcodeStr, Dt, "$dst, $src1, $src2", "", |
| 1249 | [(set QPR:$dst, (ResTy (OpNode (OpTy QPR:$src1), (OpTy QPR:$src2))))]> { |
| 1250 | let isCommutable = Commutable; |
| 1251 | } |
| 1252 | class N3VQX<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| 1253 | InstrItinClass itin, string OpcodeStr, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1254 | ValueType ResTy, ValueType OpTy, SDNode OpNode, bit Commutable> |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1255 | : N3VX<op24, op23, op21_20, op11_8, 1, op4, |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1256 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2), N3RegFrm, itin, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1257 | OpcodeStr, "$dst, $src1, $src2", "", |
| 1258 | [(set QPR:$dst, (ResTy (OpNode (OpTy QPR:$src1), (OpTy QPR:$src2))))]>{ |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1259 | let isCommutable = Commutable; |
| 1260 | } |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1261 | class N3VQSL<bits<2> op21_20, bits<4> op11_8, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1262 | InstrItinClass itin, string OpcodeStr, string Dt, |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1263 | ValueType ResTy, ValueType OpTy, SDNode ShOp> |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1264 | : N3V<1, 1, op21_20, op11_8, 1, 0, |
| 1265 | (outs QPR:$dst), (ins QPR:$src1, DPR_VFP2:$src2, nohash_imm:$lane), |
| 1266 | NVMulSLFrm, itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", |
| 1267 | [(set (ResTy QPR:$dst), |
| 1268 | (ResTy (ShOp (ResTy QPR:$src1), |
| 1269 | (ResTy (NEONvduplane (OpTy DPR_VFP2:$src2), |
| 1270 | imm:$lane)))))]> { |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1271 | let isCommutable = 0; |
| 1272 | } |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1273 | class N3VQSL16<bits<2> op21_20, bits<4> op11_8, string OpcodeStr, string Dt, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1274 | ValueType ResTy, ValueType OpTy, SDNode ShOp> |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1275 | : N3V<1, 1, op21_20, op11_8, 1, 0, |
| 1276 | (outs QPR:$dst), (ins QPR:$src1, DPR_8:$src2, nohash_imm:$lane), |
| 1277 | NVMulSLFrm, IIC_VMULi16Q, OpcodeStr, Dt,"$dst, $src1, $src2[$lane]","", |
| 1278 | [(set (ResTy QPR:$dst), |
| 1279 | (ResTy (ShOp (ResTy QPR:$src1), |
| 1280 | (ResTy (NEONvduplane (OpTy DPR_8:$src2), |
| 1281 | imm:$lane)))))]> { |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1282 | let isCommutable = 0; |
| 1283 | } |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1284 | |
| 1285 | // Basic 3-register intrinsics, both double- and quad-register. |
| 1286 | class N3VDInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 1287 | Format f, InstrItinClass itin, string OpcodeStr, string Dt, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1288 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp, bit Commutable> |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1289 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
| 1290 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2), f, itin, |
| 1291 | OpcodeStr, Dt, "$dst, $src1, $src2", "", |
| 1292 | [(set DPR:$dst, (ResTy (IntOp (OpTy DPR:$src1), (OpTy DPR:$src2))))]> { |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1293 | let isCommutable = Commutable; |
| 1294 | } |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1295 | class N3VDIntSL<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1296 | string OpcodeStr, string Dt, ValueType Ty, Intrinsic IntOp> |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1297 | : N3V<0, 1, op21_20, op11_8, 1, 0, |
| 1298 | (outs DPR:$dst), (ins DPR:$src1, DPR_VFP2:$src2, nohash_imm:$lane), |
| 1299 | NVMulSLFrm, itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", |
| 1300 | [(set (Ty DPR:$dst), |
| 1301 | (Ty (IntOp (Ty DPR:$src1), |
| 1302 | (Ty (NEONvduplane (Ty DPR_VFP2:$src2), |
| 1303 | imm:$lane)))))]> { |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1304 | let isCommutable = 0; |
| 1305 | } |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1306 | class N3VDIntSL16<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1307 | string OpcodeStr, string Dt, ValueType Ty, Intrinsic IntOp> |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1308 | : N3V<0, 1, op21_20, op11_8, 1, 0, |
| 1309 | (outs DPR:$dst), (ins DPR:$src1, DPR_8:$src2, nohash_imm:$lane), |
| 1310 | NVMulSLFrm, itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", |
| 1311 | [(set (Ty DPR:$dst), |
| 1312 | (Ty (IntOp (Ty DPR:$src1), |
| 1313 | (Ty (NEONvduplane (Ty DPR_8:$src2), imm:$lane)))))]> { |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1314 | let isCommutable = 0; |
| 1315 | } |
| 1316 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1317 | class N3VQInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 1318 | Format f, InstrItinClass itin, string OpcodeStr, string Dt, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1319 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp, bit Commutable> |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1320 | : N3V<op24, op23, op21_20, op11_8, 1, op4, |
| 1321 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2), f, itin, |
| 1322 | OpcodeStr, Dt, "$dst, $src1, $src2", "", |
| 1323 | [(set QPR:$dst, (ResTy (IntOp (OpTy QPR:$src1), (OpTy QPR:$src2))))]> { |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1324 | let isCommutable = Commutable; |
| 1325 | } |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1326 | class N3VQIntSL<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1327 | string OpcodeStr, string Dt, |
| 1328 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1329 | : N3V<1, 1, op21_20, op11_8, 1, 0, |
| 1330 | (outs QPR:$dst), (ins QPR:$src1, DPR_VFP2:$src2, nohash_imm:$lane), |
| 1331 | NVMulSLFrm, itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", |
| 1332 | [(set (ResTy QPR:$dst), |
| 1333 | (ResTy (IntOp (ResTy QPR:$src1), |
| 1334 | (ResTy (NEONvduplane (OpTy DPR_VFP2:$src2), |
| 1335 | imm:$lane)))))]> { |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1336 | let isCommutable = 0; |
| 1337 | } |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1338 | class N3VQIntSL16<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1339 | string OpcodeStr, string Dt, |
| 1340 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1341 | : N3V<1, 1, op21_20, op11_8, 1, 0, |
| 1342 | (outs QPR:$dst), (ins QPR:$src1, DPR_8:$src2, nohash_imm:$lane), |
| 1343 | NVMulSLFrm, itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", |
| 1344 | [(set (ResTy QPR:$dst), |
| 1345 | (ResTy (IntOp (ResTy QPR:$src1), |
| 1346 | (ResTy (NEONvduplane (OpTy DPR_8:$src2), |
| 1347 | imm:$lane)))))]> { |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1348 | let isCommutable = 0; |
| 1349 | } |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1350 | |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 1351 | // Multiply-Add/Sub operations: single-, double- and quad-register. |
| 1352 | class N3VSMulOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| 1353 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 1354 | ValueType Ty, SDNode MulOp, SDNode OpNode> |
| 1355 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
| 1356 | (outs DPR_VFP2:$dst), |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1357 | (ins DPR_VFP2:$src1, DPR_VFP2:$src2, DPR_VFP2:$src3), N3RegFrm, itin, |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 1358 | OpcodeStr, Dt, "$dst, $src2, $src3", "$src1 = $dst", []>; |
| 1359 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1360 | class N3VDMulOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1361 | InstrItinClass itin, string OpcodeStr, string Dt, |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1362 | ValueType Ty, SDNode MulOp, SDNode OpNode> |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1363 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1364 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2, DPR:$src3), N3RegFrm, itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1365 | OpcodeStr, Dt, "$dst, $src2, $src3", "$src1 = $dst", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1366 | [(set DPR:$dst, (Ty (OpNode DPR:$src1, |
| 1367 | (Ty (MulOp DPR:$src2, DPR:$src3)))))]>; |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1368 | class N3VDMulOpSL<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1369 | string OpcodeStr, string Dt, |
| 1370 | ValueType Ty, SDNode MulOp, SDNode ShOp> |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1371 | : N3V<0, 1, op21_20, op11_8, 1, 0, |
| 1372 | (outs DPR:$dst), |
| 1373 | (ins DPR:$src1, DPR:$src2, DPR_VFP2:$src3, nohash_imm:$lane), |
| 1374 | NVMulSLFrm, itin, |
| 1375 | OpcodeStr, Dt, "$dst, $src2, $src3[$lane]", "$src1 = $dst", |
| 1376 | [(set (Ty DPR:$dst), |
| 1377 | (Ty (ShOp (Ty DPR:$src1), |
| 1378 | (Ty (MulOp DPR:$src2, |
| 1379 | (Ty (NEONvduplane (Ty DPR_VFP2:$src3), |
| 1380 | imm:$lane)))))))]>; |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1381 | class N3VDMulOpSL16<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1382 | string OpcodeStr, string Dt, |
| 1383 | ValueType Ty, SDNode MulOp, SDNode ShOp> |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1384 | : N3V<0, 1, op21_20, op11_8, 1, 0, |
| 1385 | (outs DPR:$dst), |
| 1386 | (ins DPR:$src1, DPR:$src2, DPR_8:$src3, nohash_imm:$lane), |
| 1387 | NVMulSLFrm, itin, |
| 1388 | OpcodeStr, Dt, "$dst, $src2, $src3[$lane]", "$src1 = $dst", |
| 1389 | [(set (Ty DPR:$dst), |
| 1390 | (Ty (ShOp (Ty DPR:$src1), |
| 1391 | (Ty (MulOp DPR:$src2, |
| 1392 | (Ty (NEONvduplane (Ty DPR_8:$src3), |
| 1393 | imm:$lane)))))))]>; |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1394 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1395 | class N3VQMulOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1396 | InstrItinClass itin, string OpcodeStr, string Dt, ValueType Ty, |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1397 | SDNode MulOp, SDNode OpNode> |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1398 | : N3V<op24, op23, op21_20, op11_8, 1, op4, |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1399 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2, QPR:$src3), N3RegFrm, itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1400 | OpcodeStr, Dt, "$dst, $src2, $src3", "$src1 = $dst", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1401 | [(set QPR:$dst, (Ty (OpNode QPR:$src1, |
| 1402 | (Ty (MulOp QPR:$src2, QPR:$src3)))))]>; |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1403 | class N3VQMulOpSL<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1404 | string OpcodeStr, string Dt, ValueType ResTy, ValueType OpTy, |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1405 | SDNode MulOp, SDNode ShOp> |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1406 | : N3V<1, 1, op21_20, op11_8, 1, 0, |
| 1407 | (outs QPR:$dst), |
| 1408 | (ins QPR:$src1, QPR:$src2, DPR_VFP2:$src3, nohash_imm:$lane), |
| 1409 | NVMulSLFrm, itin, |
| 1410 | OpcodeStr, Dt, "$dst, $src2, $src3[$lane]", "$src1 = $dst", |
| 1411 | [(set (ResTy QPR:$dst), |
| 1412 | (ResTy (ShOp (ResTy QPR:$src1), |
| 1413 | (ResTy (MulOp QPR:$src2, |
| 1414 | (ResTy (NEONvduplane (OpTy DPR_VFP2:$src3), |
| 1415 | imm:$lane)))))))]>; |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1416 | class N3VQMulOpSL16<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1417 | string OpcodeStr, string Dt, |
| 1418 | ValueType ResTy, ValueType OpTy, |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1419 | SDNode MulOp, SDNode ShOp> |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1420 | : N3V<1, 1, op21_20, op11_8, 1, 0, |
| 1421 | (outs QPR:$dst), |
| 1422 | (ins QPR:$src1, QPR:$src2, DPR_8:$src3, nohash_imm:$lane), |
| 1423 | NVMulSLFrm, itin, |
| 1424 | OpcodeStr, Dt, "$dst, $src2, $src3[$lane]", "$src1 = $dst", |
| 1425 | [(set (ResTy QPR:$dst), |
| 1426 | (ResTy (ShOp (ResTy QPR:$src1), |
| 1427 | (ResTy (MulOp QPR:$src2, |
| 1428 | (ResTy (NEONvduplane (OpTy DPR_8:$src3), |
| 1429 | imm:$lane)))))))]>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1430 | |
| Bob Wilson | f65c9ef | 2010-09-03 01:35:08 +0000 | [diff] [blame] | 1431 | // Neon Intrinsic-Op instructions (VABA): double- and quad-register. |
| 1432 | class N3VDIntOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| 1433 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 1434 | ValueType Ty, Intrinsic IntOp, SDNode OpNode> |
| 1435 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
| 1436 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2, DPR:$src3), N3RegFrm, itin, |
| 1437 | OpcodeStr, Dt, "$dst, $src2, $src3", "$src1 = $dst", |
| 1438 | [(set DPR:$dst, (Ty (OpNode DPR:$src1, |
| 1439 | (Ty (IntOp (Ty DPR:$src2), (Ty DPR:$src3))))))]>; |
| 1440 | class N3VQIntOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| 1441 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 1442 | ValueType Ty, Intrinsic IntOp, SDNode OpNode> |
| 1443 | : N3V<op24, op23, op21_20, op11_8, 1, op4, |
| 1444 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2, QPR:$src3), N3RegFrm, itin, |
| 1445 | OpcodeStr, Dt, "$dst, $src2, $src3", "$src1 = $dst", |
| 1446 | [(set QPR:$dst, (Ty (OpNode QPR:$src1, |
| 1447 | (Ty (IntOp (Ty QPR:$src2), (Ty QPR:$src3))))))]>; |
| 1448 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1449 | // Neon 3-argument intrinsics, both double- and quad-register. |
| 1450 | // The destination register is also used as the first source operand register. |
| 1451 | class N3VDInt3<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1452 | InstrItinClass itin, string OpcodeStr, string Dt, |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1453 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1454 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1455 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2, DPR:$src3), N3RegFrm, itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1456 | OpcodeStr, Dt, "$dst, $src2, $src3", "$src1 = $dst", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1457 | [(set DPR:$dst, (ResTy (IntOp (OpTy DPR:$src1), |
| 1458 | (OpTy DPR:$src2), (OpTy DPR:$src3))))]>; |
| 1459 | class N3VQInt3<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1460 | InstrItinClass itin, string OpcodeStr, string Dt, |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1461 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1462 | : N3V<op24, op23, op21_20, op11_8, 1, op4, |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1463 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2, QPR:$src3), N3RegFrm, itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1464 | OpcodeStr, Dt, "$dst, $src2, $src3", "$src1 = $dst", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1465 | [(set QPR:$dst, (ResTy (IntOp (OpTy QPR:$src1), |
| 1466 | (OpTy QPR:$src2), (OpTy QPR:$src3))))]>; |
| 1467 | |
| Bob Wilson | 38ab35a | 2010-09-01 23:50:19 +0000 | [diff] [blame] | 1468 | // Long Multiply-Add/Sub operations. |
| 1469 | class N3VLMulOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| 1470 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 1471 | ValueType TyQ, ValueType TyD, SDNode MulOp, SDNode OpNode> |
| 1472 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
| 1473 | (outs QPR:$dst), (ins QPR:$src1, DPR:$src2, DPR:$src3), N3RegFrm, itin, |
| 1474 | OpcodeStr, Dt, "$dst, $src2, $src3", "$src1 = $dst", |
| 1475 | [(set QPR:$dst, (OpNode (TyQ QPR:$src1), |
| 1476 | (TyQ (MulOp (TyD DPR:$src2), |
| 1477 | (TyD DPR:$src3)))))]>; |
| 1478 | class N3VLMulOpSL<bit op24, bits<2> op21_20, bits<4> op11_8, |
| 1479 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 1480 | ValueType TyQ, ValueType TyD, SDNode MulOp, SDNode OpNode> |
| 1481 | : N3V<op24, 1, op21_20, op11_8, 1, 0, (outs QPR:$dst), |
| 1482 | (ins QPR:$src1, DPR:$src2, DPR_VFP2:$src3, nohash_imm:$lane), |
| 1483 | NVMulSLFrm, itin, |
| 1484 | OpcodeStr, Dt, "$dst, $src2, $src3[$lane]", "$src1 = $dst", |
| 1485 | [(set QPR:$dst, |
| 1486 | (OpNode (TyQ QPR:$src1), |
| 1487 | (TyQ (MulOp (TyD DPR:$src2), |
| 1488 | (TyD (NEONvduplane (TyD DPR_VFP2:$src3), |
| 1489 | imm:$lane))))))]>; |
| 1490 | class N3VLMulOpSL16<bit op24, bits<2> op21_20, bits<4> op11_8, |
| 1491 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 1492 | ValueType TyQ, ValueType TyD, SDNode MulOp, SDNode OpNode> |
| 1493 | : N3V<op24, 1, op21_20, op11_8, 1, 0, (outs QPR:$dst), |
| 1494 | (ins QPR:$src1, DPR:$src2, DPR_8:$src3, nohash_imm:$lane), |
| 1495 | NVMulSLFrm, itin, |
| 1496 | OpcodeStr, Dt, "$dst, $src2, $src3[$lane]", "$src1 = $dst", |
| 1497 | [(set QPR:$dst, |
| 1498 | (OpNode (TyQ QPR:$src1), |
| 1499 | (TyQ (MulOp (TyD DPR:$src2), |
| 1500 | (TyD (NEONvduplane (TyD DPR_8:$src3), |
| 1501 | imm:$lane))))))]>; |
| 1502 | |
| Bob Wilson | f65c9ef | 2010-09-03 01:35:08 +0000 | [diff] [blame] | 1503 | // Long Intrinsic-Op vector operations with explicit extend (VABAL). |
| 1504 | class N3VLIntExtOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| 1505 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 1506 | ValueType TyQ, ValueType TyD, Intrinsic IntOp, SDNode ExtOp, |
| 1507 | SDNode OpNode> |
| 1508 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
| 1509 | (outs QPR:$dst), (ins QPR:$src1, DPR:$src2, DPR:$src3), N3RegFrm, itin, |
| 1510 | OpcodeStr, Dt, "$dst, $src2, $src3", "$src1 = $dst", |
| 1511 | [(set QPR:$dst, (OpNode (TyQ QPR:$src1), |
| 1512 | (TyQ (ExtOp (TyD (IntOp (TyD DPR:$src2), |
| 1513 | (TyD DPR:$src3)))))))]>; |
| Bob Wilson | 38ab35a | 2010-09-01 23:50:19 +0000 | [diff] [blame] | 1514 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1515 | // Neon Long 3-argument intrinsic. The destination register is |
| 1516 | // a quad-register and is also used as the first source operand register. |
| 1517 | class N3VLInt3<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1518 | InstrItinClass itin, string OpcodeStr, string Dt, |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1519 | ValueType TyQ, ValueType TyD, Intrinsic IntOp> |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1520 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1521 | (outs QPR:$dst), (ins QPR:$src1, DPR:$src2, DPR:$src3), N3RegFrm, itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1522 | OpcodeStr, Dt, "$dst, $src2, $src3", "$src1 = $dst", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1523 | [(set QPR:$dst, |
| 1524 | (TyQ (IntOp (TyQ QPR:$src1), (TyD DPR:$src2), (TyD DPR:$src3))))]>; |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1525 | class N3VLInt3SL<bit op24, bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1526 | string OpcodeStr, string Dt, |
| 1527 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1528 | : N3V<op24, 1, op21_20, op11_8, 1, 0, |
| 1529 | (outs QPR:$dst), |
| 1530 | (ins QPR:$src1, DPR:$src2, DPR_VFP2:$src3, nohash_imm:$lane), |
| 1531 | NVMulSLFrm, itin, |
| 1532 | OpcodeStr, Dt, "$dst, $src2, $src3[$lane]", "$src1 = $dst", |
| 1533 | [(set (ResTy QPR:$dst), |
| 1534 | (ResTy (IntOp (ResTy QPR:$src1), |
| 1535 | (OpTy DPR:$src2), |
| 1536 | (OpTy (NEONvduplane (OpTy DPR_VFP2:$src3), |
| 1537 | imm:$lane)))))]>; |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1538 | class N3VLInt3SL16<bit op24, bits<2> op21_20, bits<4> op11_8, |
| 1539 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 1540 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1541 | : N3V<op24, 1, op21_20, op11_8, 1, 0, |
| 1542 | (outs QPR:$dst), |
| 1543 | (ins QPR:$src1, DPR:$src2, DPR_8:$src3, nohash_imm:$lane), |
| 1544 | NVMulSLFrm, itin, |
| 1545 | OpcodeStr, Dt, "$dst, $src2, $src3[$lane]", "$src1 = $dst", |
| 1546 | [(set (ResTy QPR:$dst), |
| 1547 | (ResTy (IntOp (ResTy QPR:$src1), |
| 1548 | (OpTy DPR:$src2), |
| 1549 | (OpTy (NEONvduplane (OpTy DPR_8:$src3), |
| 1550 | imm:$lane)))))]>; |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1551 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1552 | // Narrowing 3-register intrinsics. |
| 1553 | class N3VNInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1554 | string OpcodeStr, string Dt, ValueType TyD, ValueType TyQ, |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1555 | Intrinsic IntOp, bit Commutable> |
| 1556 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1557 | (outs DPR:$dst), (ins QPR:$src1, QPR:$src2), N3RegFrm, IIC_VBINi4D, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1558 | OpcodeStr, Dt, "$dst, $src1, $src2", "", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1559 | [(set DPR:$dst, (TyD (IntOp (TyQ QPR:$src1), (TyQ QPR:$src2))))]> { |
| 1560 | let isCommutable = Commutable; |
| 1561 | } |
| 1562 | |
| Bob Wilson | d0c0548 | 2010-08-29 05:57:34 +0000 | [diff] [blame] | 1563 | // Long 3-register operations. |
| 1564 | class N3VL<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| 1565 | InstrItinClass itin, string OpcodeStr, string Dt, |
| Bob Wilson | 38ab35a | 2010-09-01 23:50:19 +0000 | [diff] [blame] | 1566 | ValueType TyQ, ValueType TyD, SDNode OpNode, bit Commutable> |
| 1567 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
| 1568 | (outs QPR:$dst), (ins DPR:$src1, DPR:$src2), N3RegFrm, itin, |
| 1569 | OpcodeStr, Dt, "$dst, $src1, $src2", "", |
| 1570 | [(set QPR:$dst, (TyQ (OpNode (TyD DPR:$src1), (TyD DPR:$src2))))]> { |
| 1571 | let isCommutable = Commutable; |
| 1572 | } |
| 1573 | class N3VLSL<bit op24, bits<2> op21_20, bits<4> op11_8, |
| 1574 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 1575 | ValueType TyQ, ValueType TyD, SDNode OpNode> |
| 1576 | : N3V<op24, 1, op21_20, op11_8, 1, 0, |
| 1577 | (outs QPR:$dst), (ins DPR:$src1, DPR_VFP2:$src2, nohash_imm:$lane), |
| 1578 | NVMulSLFrm, itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", |
| 1579 | [(set QPR:$dst, |
| 1580 | (TyQ (OpNode (TyD DPR:$src1), |
| 1581 | (TyD (NEONvduplane (TyD DPR_VFP2:$src2),imm:$lane)))))]>; |
| 1582 | class N3VLSL16<bit op24, bits<2> op21_20, bits<4> op11_8, |
| 1583 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 1584 | ValueType TyQ, ValueType TyD, SDNode OpNode> |
| 1585 | : N3V<op24, 1, op21_20, op11_8, 1, 0, |
| 1586 | (outs QPR:$dst), (ins DPR:$src1, DPR_8:$src2, nohash_imm:$lane), |
| 1587 | NVMulSLFrm, itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", |
| 1588 | [(set QPR:$dst, |
| 1589 | (TyQ (OpNode (TyD DPR:$src1), |
| 1590 | (TyD (NEONvduplane (TyD DPR_8:$src2), imm:$lane)))))]>; |
| 1591 | |
| 1592 | // Long 3-register operations with explicitly extended operands. |
| 1593 | class N3VLExt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| 1594 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 1595 | ValueType TyQ, ValueType TyD, SDNode OpNode, SDNode ExtOp, |
| 1596 | bit Commutable> |
| Bob Wilson | d0c0548 | 2010-08-29 05:57:34 +0000 | [diff] [blame] | 1597 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
| 1598 | (outs QPR:$dst), (ins DPR:$src1, DPR:$src2), N3RegFrm, itin, |
| 1599 | OpcodeStr, Dt, "$dst, $src1, $src2", "", |
| 1600 | [(set QPR:$dst, (OpNode (TyQ (ExtOp (TyD DPR:$src1))), |
| 1601 | (TyQ (ExtOp (TyD DPR:$src2)))))]> { |
| 1602 | let isCommutable = Commutable; |
| 1603 | } |
| 1604 | |
| Bob Wilson | f65c9ef | 2010-09-03 01:35:08 +0000 | [diff] [blame] | 1605 | // Long 3-register intrinsics with explicit extend (VABDL). |
| 1606 | class N3VLIntExt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| 1607 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 1608 | ValueType TyQ, ValueType TyD, Intrinsic IntOp, SDNode ExtOp, |
| 1609 | bit Commutable> |
| 1610 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
| 1611 | (outs QPR:$dst), (ins DPR:$src1, DPR:$src2), N3RegFrm, itin, |
| 1612 | OpcodeStr, Dt, "$dst, $src1, $src2", "", |
| 1613 | [(set QPR:$dst, (TyQ (ExtOp (TyD (IntOp (TyD DPR:$src1), |
| 1614 | (TyD DPR:$src2))))))]> { |
| 1615 | let isCommutable = Commutable; |
| 1616 | } |
| 1617 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1618 | // Long 3-register intrinsics. |
| 1619 | class N3VLInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1620 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 1621 | ValueType TyQ, ValueType TyD, Intrinsic IntOp, bit Commutable> |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1622 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1623 | (outs QPR:$dst), (ins DPR:$src1, DPR:$src2), N3RegFrm, itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1624 | OpcodeStr, Dt, "$dst, $src1, $src2", "", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1625 | [(set QPR:$dst, (TyQ (IntOp (TyD DPR:$src1), (TyD DPR:$src2))))]> { |
| 1626 | let isCommutable = Commutable; |
| 1627 | } |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1628 | class N3VLIntSL<bit op24, bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1629 | string OpcodeStr, string Dt, |
| 1630 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1631 | : N3V<op24, 1, op21_20, op11_8, 1, 0, |
| 1632 | (outs QPR:$dst), (ins DPR:$src1, DPR_VFP2:$src2, nohash_imm:$lane), |
| 1633 | NVMulSLFrm, itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", |
| 1634 | [(set (ResTy QPR:$dst), |
| 1635 | (ResTy (IntOp (OpTy DPR:$src1), |
| 1636 | (OpTy (NEONvduplane (OpTy DPR_VFP2:$src2), |
| 1637 | imm:$lane)))))]>; |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1638 | class N3VLIntSL16<bit op24, bits<2> op21_20, bits<4> op11_8, |
| 1639 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 1640 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1641 | : N3V<op24, 1, op21_20, op11_8, 1, 0, |
| 1642 | (outs QPR:$dst), (ins DPR:$src1, DPR_8:$src2, nohash_imm:$lane), |
| 1643 | NVMulSLFrm, itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", |
| 1644 | [(set (ResTy QPR:$dst), |
| 1645 | (ResTy (IntOp (OpTy DPR:$src1), |
| 1646 | (OpTy (NEONvduplane (OpTy DPR_8:$src2), |
| 1647 | imm:$lane)))))]>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1648 | |
| Bob Wilson | d0c0548 | 2010-08-29 05:57:34 +0000 | [diff] [blame] | 1649 | // Wide 3-register operations. |
| 1650 | class N3VW<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| 1651 | string OpcodeStr, string Dt, ValueType TyQ, ValueType TyD, |
| 1652 | SDNode OpNode, SDNode ExtOp, bit Commutable> |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1653 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 1654 | (outs QPR:$dst), (ins QPR:$src1, DPR:$src2), N3RegFrm, IIC_VSUBiD, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1655 | OpcodeStr, Dt, "$dst, $src1, $src2", "", |
| Bob Wilson | d0c0548 | 2010-08-29 05:57:34 +0000 | [diff] [blame] | 1656 | [(set QPR:$dst, (OpNode (TyQ QPR:$src1), |
| 1657 | (TyQ (ExtOp (TyD DPR:$src2)))))]> { |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1658 | let isCommutable = Commutable; |
| 1659 | } |
| 1660 | |
| 1661 | // Pairwise long 2-register intrinsics, both double- and quad-register. |
| 1662 | class N2VDPLInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1663 | bits<2> op17_16, bits<5> op11_7, bit op4, |
| 1664 | string OpcodeStr, string Dt, |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1665 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
| 1666 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, (outs DPR:$dst), |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1667 | (ins DPR:$src), IIC_VSHLiD, OpcodeStr, Dt, "$dst, $src", "", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1668 | [(set DPR:$dst, (ResTy (IntOp (OpTy DPR:$src))))]>; |
| 1669 | class N2VQPLInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1670 | bits<2> op17_16, bits<5> op11_7, bit op4, |
| 1671 | string OpcodeStr, string Dt, |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1672 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
| 1673 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 1, op4, (outs QPR:$dst), |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1674 | (ins QPR:$src), IIC_VSHLiD, OpcodeStr, Dt, "$dst, $src", "", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1675 | [(set QPR:$dst, (ResTy (IntOp (OpTy QPR:$src))))]>; |
| 1676 | |
| 1677 | // Pairwise long 2-register accumulate intrinsics, |
| 1678 | // both double- and quad-register. |
| 1679 | // The destination register is also used as the first source operand register. |
| 1680 | class N2VDPLInt2<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1681 | bits<2> op17_16, bits<5> op11_7, bit op4, |
| 1682 | string OpcodeStr, string Dt, |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1683 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
| 1684 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1685 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2), IIC_VPALiD, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1686 | OpcodeStr, Dt, "$dst, $src2", "$src1 = $dst", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1687 | [(set DPR:$dst, (ResTy (IntOp (ResTy DPR:$src1), (OpTy DPR:$src2))))]>; |
| 1688 | class N2VQPLInt2<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1689 | bits<2> op17_16, bits<5> op11_7, bit op4, |
| 1690 | string OpcodeStr, string Dt, |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1691 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
| 1692 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 1, op4, |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1693 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2), IIC_VPALiQ, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1694 | OpcodeStr, Dt, "$dst, $src2", "$src1 = $dst", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1695 | [(set QPR:$dst, (ResTy (IntOp (ResTy QPR:$src1), (OpTy QPR:$src2))))]>; |
| 1696 | |
| 1697 | // Shift by immediate, |
| 1698 | // both double- and quad-register. |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1699 | class N2VDSh<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1700 | Format f, InstrItinClass itin, string OpcodeStr, string Dt, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1701 | ValueType Ty, SDNode OpNode> |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1702 | : N2VImm<op24, op23, op11_8, op7, 0, op4, |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1703 | (outs DPR:$dst), (ins DPR:$src, i32imm:$SIMM), f, itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1704 | OpcodeStr, Dt, "$dst, $src, $SIMM", "", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1705 | [(set DPR:$dst, (Ty (OpNode (Ty DPR:$src), (i32 imm:$SIMM))))]>; |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1706 | class N2VQSh<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1707 | Format f, InstrItinClass itin, string OpcodeStr, string Dt, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1708 | ValueType Ty, SDNode OpNode> |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1709 | : N2VImm<op24, op23, op11_8, op7, 1, op4, |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1710 | (outs QPR:$dst), (ins QPR:$src, i32imm:$SIMM), f, itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1711 | OpcodeStr, Dt, "$dst, $src, $SIMM", "", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1712 | [(set QPR:$dst, (Ty (OpNode (Ty QPR:$src), (i32 imm:$SIMM))))]>; |
| 1713 | |
| Johnny Chen | 274a0d3 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 1714 | // Long shift by immediate. |
| 1715 | class N2VLSh<bit op24, bit op23, bits<4> op11_8, bit op7, bit op6, bit op4, |
| 1716 | string OpcodeStr, string Dt, |
| 1717 | ValueType ResTy, ValueType OpTy, SDNode OpNode> |
| 1718 | : N2VImm<op24, op23, op11_8, op7, op6, op4, |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1719 | (outs QPR:$dst), (ins DPR:$src, i32imm:$SIMM), N2RegVShLFrm, |
| Johnny Chen | d82f900 | 2010-03-25 20:39:04 +0000 | [diff] [blame] | 1720 | IIC_VSHLiD, OpcodeStr, Dt, "$dst, $src, $SIMM", "", |
| Johnny Chen | 274a0d3 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 1721 | [(set QPR:$dst, (ResTy (OpNode (OpTy DPR:$src), |
| 1722 | (i32 imm:$SIMM))))]>; |
| 1723 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1724 | // Narrow shift by immediate. |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1725 | class N2VNSh<bit op24, bit op23, bits<4> op11_8, bit op7, bit op6, bit op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1726 | InstrItinClass itin, string OpcodeStr, string Dt, |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1727 | ValueType ResTy, ValueType OpTy, SDNode OpNode> |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1728 | : N2VImm<op24, op23, op11_8, op7, op6, op4, |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1729 | (outs DPR:$dst), (ins QPR:$src, i32imm:$SIMM), N2RegVShRFrm, itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1730 | OpcodeStr, Dt, "$dst, $src, $SIMM", "", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1731 | [(set DPR:$dst, (ResTy (OpNode (OpTy QPR:$src), |
| 1732 | (i32 imm:$SIMM))))]>; |
| 1733 | |
| 1734 | // Shift right by immediate and accumulate, |
| 1735 | // both double- and quad-register. |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1736 | class N2VDShAdd<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1737 | string OpcodeStr, string Dt, ValueType Ty, SDNode ShOp> |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1738 | : N2VImm<op24, op23, op11_8, op7, 0, op4, (outs DPR:$dst), |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1739 | (ins DPR:$src1, DPR:$src2, i32imm:$SIMM), N2RegVShRFrm, IIC_VPALiD, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1740 | OpcodeStr, Dt, "$dst, $src2, $SIMM", "$src1 = $dst", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1741 | [(set DPR:$dst, (Ty (add DPR:$src1, |
| 1742 | (Ty (ShOp DPR:$src2, (i32 imm:$SIMM))))))]>; |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1743 | class N2VQShAdd<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1744 | string OpcodeStr, string Dt, ValueType Ty, SDNode ShOp> |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1745 | : N2VImm<op24, op23, op11_8, op7, 1, op4, (outs QPR:$dst), |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1746 | (ins QPR:$src1, QPR:$src2, i32imm:$SIMM), N2RegVShRFrm, IIC_VPALiD, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1747 | OpcodeStr, Dt, "$dst, $src2, $SIMM", "$src1 = $dst", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1748 | [(set QPR:$dst, (Ty (add QPR:$src1, |
| 1749 | (Ty (ShOp QPR:$src2, (i32 imm:$SIMM))))))]>; |
| 1750 | |
| 1751 | // Shift by immediate and insert, |
| 1752 | // both double- and quad-register. |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1753 | class N2VDShIns<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1754 | Format f, string OpcodeStr, string Dt, ValueType Ty,SDNode ShOp> |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1755 | : N2VImm<op24, op23, op11_8, op7, 0, op4, (outs DPR:$dst), |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1756 | (ins DPR:$src1, DPR:$src2, i32imm:$SIMM), f, IIC_VSHLiD, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1757 | OpcodeStr, Dt, "$dst, $src2, $SIMM", "$src1 = $dst", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1758 | [(set DPR:$dst, (Ty (ShOp DPR:$src1, DPR:$src2, (i32 imm:$SIMM))))]>; |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1759 | class N2VQShIns<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1760 | Format f, string OpcodeStr, string Dt, ValueType Ty,SDNode ShOp> |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1761 | : N2VImm<op24, op23, op11_8, op7, 1, op4, (outs QPR:$dst), |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1762 | (ins QPR:$src1, QPR:$src2, i32imm:$SIMM), f, IIC_VSHLiQ, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1763 | OpcodeStr, Dt, "$dst, $src2, $SIMM", "$src1 = $dst", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1764 | [(set QPR:$dst, (Ty (ShOp QPR:$src1, QPR:$src2, (i32 imm:$SIMM))))]>; |
| 1765 | |
| 1766 | // Convert, with fractional bits immediate, |
| 1767 | // both double- and quad-register. |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1768 | class N2VCvtD<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1769 | string OpcodeStr, string Dt, ValueType ResTy, ValueType OpTy, |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1770 | Intrinsic IntOp> |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1771 | : N2VImm<op24, op23, op11_8, op7, 0, op4, |
| Johnny Chen | d82f900 | 2010-03-25 20:39:04 +0000 | [diff] [blame] | 1772 | (outs DPR:$dst), (ins DPR:$src, i32imm:$SIMM), NVCVTFrm, |
| 1773 | IIC_VUNAD, OpcodeStr, Dt, "$dst, $src, $SIMM", "", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1774 | [(set DPR:$dst, (ResTy (IntOp (OpTy DPR:$src), (i32 imm:$SIMM))))]>; |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1775 | class N2VCvtQ<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1776 | string OpcodeStr, string Dt, ValueType ResTy, ValueType OpTy, |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1777 | Intrinsic IntOp> |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1778 | : N2VImm<op24, op23, op11_8, op7, 1, op4, |
| Johnny Chen | d82f900 | 2010-03-25 20:39:04 +0000 | [diff] [blame] | 1779 | (outs QPR:$dst), (ins QPR:$src, i32imm:$SIMM), NVCVTFrm, |
| 1780 | IIC_VUNAQ, OpcodeStr, Dt, "$dst, $src, $SIMM", "", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1781 | [(set QPR:$dst, (ResTy (IntOp (OpTy QPR:$src), (i32 imm:$SIMM))))]>; |
| 1782 | |
| 1783 | //===----------------------------------------------------------------------===// |
| 1784 | // Multiclasses |
| 1785 | //===----------------------------------------------------------------------===// |
| 1786 | |
| Bob Wilson | d76b9b7 | 2009-10-03 04:44:16 +0000 | [diff] [blame] | 1787 | // Abbreviations used in multiclass suffixes: |
| 1788 | // Q = quarter int (8 bit) elements |
| 1789 | // H = half int (16 bit) elements |
| 1790 | // S = single int (32 bit) elements |
| 1791 | // D = double int (64 bit) elements |
| 1792 | |
| Johnny Chen | 886915e | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 1793 | // Neon 2-register vector operations -- for disassembly only. |
| 1794 | |
| 1795 | // First with only element sizes of 8, 16 and 32 bits: |
| Johnny Chen | 21dbd6f | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 1796 | multiclass N2V_QHS_cmp<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16, |
| 1797 | bits<5> op11_7, bit op4, string opc, string Dt, |
| 1798 | string asm> { |
| Johnny Chen | 886915e | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 1799 | // 64-bit vector types. |
| 1800 | def v8i8 : N2V<op24_23, op21_20, 0b00, op17_16, op11_7, 0, op4, |
| 1801 | (outs DPR:$dst), (ins DPR:$src), NoItinerary, |
| Johnny Chen | 21dbd6f | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 1802 | opc, !strconcat(Dt, "8"), asm, "", []>; |
| Johnny Chen | 886915e | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 1803 | def v4i16 : N2V<op24_23, op21_20, 0b01, op17_16, op11_7, 0, op4, |
| 1804 | (outs DPR:$dst), (ins DPR:$src), NoItinerary, |
| Johnny Chen | 21dbd6f | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 1805 | opc, !strconcat(Dt, "16"), asm, "", []>; |
| Johnny Chen | 886915e | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 1806 | def v2i32 : N2V<op24_23, op21_20, 0b10, op17_16, op11_7, 0, op4, |
| 1807 | (outs DPR:$dst), (ins DPR:$src), NoItinerary, |
| Johnny Chen | 21dbd6f | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 1808 | opc, !strconcat(Dt, "32"), asm, "", []>; |
| Johnny Chen | 886915e | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 1809 | def v2f32 : N2V<op24_23, op21_20, 0b10, op17_16, op11_7, 0, op4, |
| 1810 | (outs DPR:$dst), (ins DPR:$src), NoItinerary, |
| 1811 | opc, "f32", asm, "", []> { |
| 1812 | let Inst{10} = 1; // overwrite F = 1 |
| 1813 | } |
| 1814 | |
| 1815 | // 128-bit vector types. |
| 1816 | def v16i8 : N2V<op24_23, op21_20, 0b00, op17_16, op11_7, 1, op4, |
| 1817 | (outs QPR:$dst), (ins QPR:$src), NoItinerary, |
| Johnny Chen | 21dbd6f | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 1818 | opc, !strconcat(Dt, "8"), asm, "", []>; |
| Johnny Chen | 886915e | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 1819 | def v8i16 : N2V<op24_23, op21_20, 0b01, op17_16, op11_7, 1, op4, |
| 1820 | (outs QPR:$dst), (ins QPR:$src), NoItinerary, |
| Johnny Chen | 21dbd6f | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 1821 | opc, !strconcat(Dt, "16"), asm, "", []>; |
| Johnny Chen | 886915e | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 1822 | def v4i32 : N2V<op24_23, op21_20, 0b10, op17_16, op11_7, 1, op4, |
| 1823 | (outs QPR:$dst), (ins QPR:$src), NoItinerary, |
| Johnny Chen | 21dbd6f | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 1824 | opc, !strconcat(Dt, "32"), asm, "", []>; |
| Johnny Chen | 886915e | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 1825 | def v4f32 : N2V<op24_23, op21_20, 0b10, op17_16, op11_7, 1, op4, |
| 1826 | (outs QPR:$dst), (ins QPR:$src), NoItinerary, |
| 1827 | opc, "f32", asm, "", []> { |
| 1828 | let Inst{10} = 1; // overwrite F = 1 |
| 1829 | } |
| 1830 | } |
| 1831 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1832 | // Neon 3-register vector operations. |
| 1833 | |
| 1834 | // First with only element sizes of 8, 16 and 32 bits: |
| 1835 | multiclass N3V_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1836 | InstrItinClass itinD16, InstrItinClass itinD32, |
| 1837 | InstrItinClass itinQ16, InstrItinClass itinQ32, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1838 | string OpcodeStr, string Dt, |
| 1839 | SDNode OpNode, bit Commutable = 0> { |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1840 | // 64-bit vector types. |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1841 | def v8i8 : N3VD<op24, op23, 0b00, op11_8, op4, itinD16, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1842 | OpcodeStr, !strconcat(Dt, "8"), |
| 1843 | v8i8, v8i8, OpNode, Commutable>; |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1844 | def v4i16 : N3VD<op24, op23, 0b01, op11_8, op4, itinD16, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1845 | OpcodeStr, !strconcat(Dt, "16"), |
| 1846 | v4i16, v4i16, OpNode, Commutable>; |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1847 | def v2i32 : N3VD<op24, op23, 0b10, op11_8, op4, itinD32, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1848 | OpcodeStr, !strconcat(Dt, "32"), |
| 1849 | v2i32, v2i32, OpNode, Commutable>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1850 | |
| 1851 | // 128-bit vector types. |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1852 | def v16i8 : N3VQ<op24, op23, 0b00, op11_8, op4, itinQ16, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1853 | OpcodeStr, !strconcat(Dt, "8"), |
| 1854 | v16i8, v16i8, OpNode, Commutable>; |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1855 | def v8i16 : N3VQ<op24, op23, 0b01, op11_8, op4, itinQ16, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1856 | OpcodeStr, !strconcat(Dt, "16"), |
| 1857 | v8i16, v8i16, OpNode, Commutable>; |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1858 | def v4i32 : N3VQ<op24, op23, 0b10, op11_8, op4, itinQ32, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1859 | OpcodeStr, !strconcat(Dt, "32"), |
| 1860 | v4i32, v4i32, OpNode, Commutable>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1861 | } |
| 1862 | |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1863 | multiclass N3VSL_HS<bits<4> op11_8, string OpcodeStr, string Dt, SDNode ShOp> { |
| 1864 | def v4i16 : N3VDSL16<0b01, op11_8, OpcodeStr, !strconcat(Dt, "16"), |
| 1865 | v4i16, ShOp>; |
| 1866 | def v2i32 : N3VDSL<0b10, op11_8, IIC_VMULi32D, OpcodeStr, !strconcat(Dt,"32"), |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1867 | v2i32, ShOp>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1868 | def v8i16 : N3VQSL16<0b01, op11_8, OpcodeStr, !strconcat(Dt, "16"), |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1869 | v8i16, v4i16, ShOp>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1870 | def v4i32 : N3VQSL<0b10, op11_8, IIC_VMULi32Q, OpcodeStr, !strconcat(Dt,"32"), |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1871 | v4i32, v2i32, ShOp>; |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1872 | } |
| 1873 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1874 | // ....then also with element size 64 bits: |
| 1875 | multiclass N3V_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1876 | InstrItinClass itinD, InstrItinClass itinQ, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1877 | string OpcodeStr, string Dt, |
| 1878 | SDNode OpNode, bit Commutable = 0> |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1879 | : N3V_QHS<op24, op23, op11_8, op4, itinD, itinD, itinQ, itinQ, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1880 | OpcodeStr, Dt, OpNode, Commutable> { |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1881 | def v1i64 : N3VD<op24, op23, 0b11, op11_8, op4, itinD, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1882 | OpcodeStr, !strconcat(Dt, "64"), |
| 1883 | v1i64, v1i64, OpNode, Commutable>; |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1884 | def v2i64 : N3VQ<op24, op23, 0b11, op11_8, op4, itinQ, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1885 | OpcodeStr, !strconcat(Dt, "64"), |
| 1886 | v2i64, v2i64, OpNode, Commutable>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1887 | } |
| 1888 | |
| 1889 | |
| Bob Wilson | 4cd8a12 | 2010-08-30 20:02:30 +0000 | [diff] [blame] | 1890 | // Neon Narrowing 2-register vector operations, |
| 1891 | // source operand element sizes of 16, 32 and 64 bits: |
| 1892 | multiclass N2VN_HSD<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16, |
| 1893 | bits<5> op11_7, bit op6, bit op4, |
| 1894 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 1895 | SDNode OpNode> { |
| 1896 | def v8i8 : N2VN<op24_23, op21_20, 0b00, op17_16, op11_7, op6, op4, |
| 1897 | itin, OpcodeStr, !strconcat(Dt, "16"), |
| 1898 | v8i8, v8i16, OpNode>; |
| 1899 | def v4i16 : N2VN<op24_23, op21_20, 0b01, op17_16, op11_7, op6, op4, |
| 1900 | itin, OpcodeStr, !strconcat(Dt, "32"), |
| 1901 | v4i16, v4i32, OpNode>; |
| 1902 | def v2i32 : N2VN<op24_23, op21_20, 0b10, op17_16, op11_7, op6, op4, |
| 1903 | itin, OpcodeStr, !strconcat(Dt, "64"), |
| 1904 | v2i32, v2i64, OpNode>; |
| 1905 | } |
| 1906 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1907 | // Neon Narrowing 2-register vector intrinsics, |
| 1908 | // source operand element sizes of 16, 32 and 64 bits: |
| 1909 | multiclass N2VNInt_HSD<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16, |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1910 | bits<5> op11_7, bit op6, bit op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1911 | InstrItinClass itin, string OpcodeStr, string Dt, |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1912 | Intrinsic IntOp> { |
| 1913 | def v8i8 : N2VNInt<op24_23, op21_20, 0b00, op17_16, op11_7, op6, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1914 | itin, OpcodeStr, !strconcat(Dt, "16"), |
| 1915 | v8i8, v8i16, IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1916 | def v4i16 : N2VNInt<op24_23, op21_20, 0b01, op17_16, op11_7, op6, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1917 | itin, OpcodeStr, !strconcat(Dt, "32"), |
| 1918 | v4i16, v4i32, IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1919 | def v2i32 : N2VNInt<op24_23, op21_20, 0b10, op17_16, op11_7, op6, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1920 | itin, OpcodeStr, !strconcat(Dt, "64"), |
| 1921 | v2i32, v2i64, IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1922 | } |
| 1923 | |
| 1924 | |
| 1925 | // Neon Lengthening 2-register vector intrinsic (currently specific to VMOVL). |
| 1926 | // source operand element sizes of 16, 32 and 64 bits: |
| Bob Wilson | 9a511c0 | 2010-08-20 04:54:02 +0000 | [diff] [blame] | 1927 | multiclass N2VL_QHS<bits<2> op24_23, bits<5> op11_7, bit op6, bit op4, |
| 1928 | string OpcodeStr, string Dt, SDNode OpNode> { |
| 1929 | def v8i16 : N2VL<op24_23, 0b00, 0b10, 0b00, op11_7, op6, op4, IIC_VQUNAiD, |
| 1930 | OpcodeStr, !strconcat(Dt, "8"), v8i16, v8i8, OpNode>; |
| 1931 | def v4i32 : N2VL<op24_23, 0b01, 0b00, 0b00, op11_7, op6, op4, IIC_VQUNAiD, |
| 1932 | OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, OpNode>; |
| 1933 | def v2i64 : N2VL<op24_23, 0b10, 0b00, 0b00, op11_7, op6, op4, IIC_VQUNAiD, |
| 1934 | OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, OpNode>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1935 | } |
| 1936 | |
| 1937 | |
| 1938 | // Neon 3-register vector intrinsics. |
| 1939 | |
| 1940 | // First with only element sizes of 16 and 32 bits: |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 1941 | multiclass N3VInt_HS<bit op24, bit op23, bits<4> op11_8, bit op4, Format f, |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1942 | InstrItinClass itinD16, InstrItinClass itinD32, |
| 1943 | InstrItinClass itinQ16, InstrItinClass itinQ32, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1944 | string OpcodeStr, string Dt, |
| 1945 | Intrinsic IntOp, bit Commutable = 0> { |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1946 | // 64-bit vector types. |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 1947 | def v4i16 : N3VDInt<op24, op23, 0b01, op11_8, op4, f, itinD16, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1948 | OpcodeStr, !strconcat(Dt, "16"), |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1949 | v4i16, v4i16, IntOp, Commutable>; |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 1950 | def v2i32 : N3VDInt<op24, op23, 0b10, op11_8, op4, f, itinD32, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1951 | OpcodeStr, !strconcat(Dt, "32"), |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1952 | v2i32, v2i32, IntOp, Commutable>; |
| 1953 | |
| 1954 | // 128-bit vector types. |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 1955 | def v8i16 : N3VQInt<op24, op23, 0b01, op11_8, op4, f, itinQ16, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1956 | OpcodeStr, !strconcat(Dt, "16"), |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1957 | v8i16, v8i16, IntOp, Commutable>; |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 1958 | def v4i32 : N3VQInt<op24, op23, 0b10, op11_8, op4, f, itinQ32, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1959 | OpcodeStr, !strconcat(Dt, "32"), |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1960 | v4i32, v4i32, IntOp, Commutable>; |
| 1961 | } |
| 1962 | |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1963 | multiclass N3VIntSL_HS<bits<4> op11_8, |
| 1964 | InstrItinClass itinD16, InstrItinClass itinD32, |
| 1965 | InstrItinClass itinQ16, InstrItinClass itinQ32, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1966 | string OpcodeStr, string Dt, Intrinsic IntOp> { |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1967 | def v4i16 : N3VDIntSL16<0b01, op11_8, itinD16, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1968 | OpcodeStr, !strconcat(Dt, "16"), v4i16, IntOp>; |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1969 | def v2i32 : N3VDIntSL<0b10, op11_8, itinD32, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1970 | OpcodeStr, !strconcat(Dt, "32"), v2i32, IntOp>; |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1971 | def v8i16 : N3VQIntSL16<0b01, op11_8, itinQ16, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1972 | OpcodeStr, !strconcat(Dt, "16"), v8i16, v4i16, IntOp>; |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1973 | def v4i32 : N3VQIntSL<0b10, op11_8, itinQ32, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1974 | OpcodeStr, !strconcat(Dt, "32"), v4i32, v2i32, IntOp>; |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1975 | } |
| 1976 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1977 | // ....then also with element size of 8 bits: |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 1978 | multiclass N3VInt_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, Format f, |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1979 | InstrItinClass itinD16, InstrItinClass itinD32, |
| 1980 | InstrItinClass itinQ16, InstrItinClass itinQ32, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1981 | string OpcodeStr, string Dt, |
| 1982 | Intrinsic IntOp, bit Commutable = 0> |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 1983 | : N3VInt_HS<op24, op23, op11_8, op4, f, itinD16, itinD32, itinQ16, itinQ32, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1984 | OpcodeStr, Dt, IntOp, Commutable> { |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 1985 | def v8i8 : N3VDInt<op24, op23, 0b00, op11_8, op4, f, itinD16, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1986 | OpcodeStr, !strconcat(Dt, "8"), |
| 1987 | v8i8, v8i8, IntOp, Commutable>; |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 1988 | def v16i8 : N3VQInt<op24, op23, 0b00, op11_8, op4, f, itinQ16, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1989 | OpcodeStr, !strconcat(Dt, "8"), |
| 1990 | v16i8, v16i8, IntOp, Commutable>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1991 | } |
| 1992 | |
| 1993 | // ....then also with element size of 64 bits: |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 1994 | multiclass N3VInt_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, Format f, |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1995 | InstrItinClass itinD16, InstrItinClass itinD32, |
| 1996 | InstrItinClass itinQ16, InstrItinClass itinQ32, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1997 | string OpcodeStr, string Dt, |
| 1998 | Intrinsic IntOp, bit Commutable = 0> |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 1999 | : N3VInt_QHS<op24, op23, op11_8, op4, f, itinD16, itinD32, itinQ16, itinQ32, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2000 | OpcodeStr, Dt, IntOp, Commutable> { |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 2001 | def v1i64 : N3VDInt<op24, op23, 0b11, op11_8, op4, f, itinD32, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2002 | OpcodeStr, !strconcat(Dt, "64"), |
| 2003 | v1i64, v1i64, IntOp, Commutable>; |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 2004 | def v2i64 : N3VQInt<op24, op23, 0b11, op11_8, op4, f, itinQ32, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2005 | OpcodeStr, !strconcat(Dt, "64"), |
| 2006 | v2i64, v2i64, IntOp, Commutable>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2007 | } |
| 2008 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2009 | // Neon Narrowing 3-register vector intrinsics, |
| 2010 | // source operand element sizes of 16, 32 and 64 bits: |
| 2011 | multiclass N3VNInt_HSD<bit op24, bit op23, bits<4> op11_8, bit op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2012 | string OpcodeStr, string Dt, |
| 2013 | Intrinsic IntOp, bit Commutable = 0> { |
| 2014 | def v8i8 : N3VNInt<op24, op23, 0b00, op11_8, op4, |
| 2015 | OpcodeStr, !strconcat(Dt, "16"), |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2016 | v8i8, v8i16, IntOp, Commutable>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2017 | def v4i16 : N3VNInt<op24, op23, 0b01, op11_8, op4, |
| 2018 | OpcodeStr, !strconcat(Dt, "32"), |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2019 | v4i16, v4i32, IntOp, Commutable>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2020 | def v2i32 : N3VNInt<op24, op23, 0b10, op11_8, op4, |
| 2021 | OpcodeStr, !strconcat(Dt, "64"), |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2022 | v2i32, v2i64, IntOp, Commutable>; |
| 2023 | } |
| 2024 | |
| 2025 | |
| Bob Wilson | d0c0548 | 2010-08-29 05:57:34 +0000 | [diff] [blame] | 2026 | // Neon Long 3-register vector operations. |
| 2027 | |
| 2028 | multiclass N3VL_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, |
| 2029 | InstrItinClass itin16, InstrItinClass itin32, |
| 2030 | string OpcodeStr, string Dt, |
| Bob Wilson | 38ab35a | 2010-09-01 23:50:19 +0000 | [diff] [blame] | 2031 | SDNode OpNode, bit Commutable = 0> { |
| Bob Wilson | d0c0548 | 2010-08-29 05:57:34 +0000 | [diff] [blame] | 2032 | def v8i16 : N3VL<op24, op23, 0b00, op11_8, op4, itin16, |
| 2033 | OpcodeStr, !strconcat(Dt, "8"), |
| Bob Wilson | 38ab35a | 2010-09-01 23:50:19 +0000 | [diff] [blame] | 2034 | v8i16, v8i8, OpNode, Commutable>; |
| 2035 | def v4i32 : N3VL<op24, op23, 0b01, op11_8, op4, itin16, |
| 2036 | OpcodeStr, !strconcat(Dt, "16"), |
| 2037 | v4i32, v4i16, OpNode, Commutable>; |
| 2038 | def v2i64 : N3VL<op24, op23, 0b10, op11_8, op4, itin32, |
| 2039 | OpcodeStr, !strconcat(Dt, "32"), |
| 2040 | v2i64, v2i32, OpNode, Commutable>; |
| 2041 | } |
| 2042 | |
| 2043 | multiclass N3VLSL_HS<bit op24, bits<4> op11_8, |
| 2044 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 2045 | SDNode OpNode> { |
| 2046 | def v4i16 : N3VLSL16<op24, 0b01, op11_8, itin, OpcodeStr, |
| 2047 | !strconcat(Dt, "16"), v4i32, v4i16, OpNode>; |
| 2048 | def v2i32 : N3VLSL<op24, 0b10, op11_8, itin, OpcodeStr, |
| 2049 | !strconcat(Dt, "32"), v2i64, v2i32, OpNode>; |
| 2050 | } |
| 2051 | |
| 2052 | multiclass N3VLExt_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, |
| 2053 | InstrItinClass itin16, InstrItinClass itin32, |
| 2054 | string OpcodeStr, string Dt, |
| 2055 | SDNode OpNode, SDNode ExtOp, bit Commutable = 0> { |
| 2056 | def v8i16 : N3VLExt<op24, op23, 0b00, op11_8, op4, itin16, |
| 2057 | OpcodeStr, !strconcat(Dt, "8"), |
| 2058 | v8i16, v8i8, OpNode, ExtOp, Commutable>; |
| 2059 | def v4i32 : N3VLExt<op24, op23, 0b01, op11_8, op4, itin16, |
| 2060 | OpcodeStr, !strconcat(Dt, "16"), |
| 2061 | v4i32, v4i16, OpNode, ExtOp, Commutable>; |
| 2062 | def v2i64 : N3VLExt<op24, op23, 0b10, op11_8, op4, itin32, |
| 2063 | OpcodeStr, !strconcat(Dt, "32"), |
| 2064 | v2i64, v2i32, OpNode, ExtOp, Commutable>; |
| Bob Wilson | d0c0548 | 2010-08-29 05:57:34 +0000 | [diff] [blame] | 2065 | } |
| 2066 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2067 | // Neon Long 3-register vector intrinsics. |
| 2068 | |
| 2069 | // First with only element sizes of 16 and 32 bits: |
| 2070 | multiclass N3VLInt_HS<bit op24, bit op23, bits<4> op11_8, bit op4, |
| Anton Korobeynikov | 4d36f88 | 2010-04-07 18:21:10 +0000 | [diff] [blame] | 2071 | InstrItinClass itin16, InstrItinClass itin32, |
| 2072 | string OpcodeStr, string Dt, |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2073 | Intrinsic IntOp, bit Commutable = 0> { |
| Anton Korobeynikov | 4d36f88 | 2010-04-07 18:21:10 +0000 | [diff] [blame] | 2074 | def v4i32 : N3VLInt<op24, op23, 0b01, op11_8, op4, itin16, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2075 | OpcodeStr, !strconcat(Dt, "16"), |
| 2076 | v4i32, v4i16, IntOp, Commutable>; |
| Anton Korobeynikov | 4d36f88 | 2010-04-07 18:21:10 +0000 | [diff] [blame] | 2077 | def v2i64 : N3VLInt<op24, op23, 0b10, op11_8, op4, itin32, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2078 | OpcodeStr, !strconcat(Dt, "32"), |
| 2079 | v2i64, v2i32, IntOp, Commutable>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2080 | } |
| 2081 | |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2082 | multiclass N3VLIntSL_HS<bit op24, bits<4> op11_8, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2083 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 2084 | Intrinsic IntOp> { |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2085 | def v4i16 : N3VLIntSL16<op24, 0b01, op11_8, itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2086 | OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, IntOp>; |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2087 | def v2i32 : N3VLIntSL<op24, 0b10, op11_8, itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2088 | OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, IntOp>; |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2089 | } |
| 2090 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2091 | // ....then also with element size of 8 bits: |
| 2092 | multiclass N3VLInt_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, |
| Anton Korobeynikov | 4d36f88 | 2010-04-07 18:21:10 +0000 | [diff] [blame] | 2093 | InstrItinClass itin16, InstrItinClass itin32, |
| 2094 | string OpcodeStr, string Dt, |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2095 | Intrinsic IntOp, bit Commutable = 0> |
| Anton Korobeynikov | 4d36f88 | 2010-04-07 18:21:10 +0000 | [diff] [blame] | 2096 | : N3VLInt_HS<op24, op23, op11_8, op4, itin16, itin32, OpcodeStr, Dt, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2097 | IntOp, Commutable> { |
| Anton Korobeynikov | 4d36f88 | 2010-04-07 18:21:10 +0000 | [diff] [blame] | 2098 | def v8i16 : N3VLInt<op24, op23, 0b00, op11_8, op4, itin16, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2099 | OpcodeStr, !strconcat(Dt, "8"), |
| 2100 | v8i16, v8i8, IntOp, Commutable>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2101 | } |
| 2102 | |
| Bob Wilson | f65c9ef | 2010-09-03 01:35:08 +0000 | [diff] [blame] | 2103 | // ....with explicit extend (VABDL). |
| 2104 | multiclass N3VLIntExt_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, |
| 2105 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 2106 | Intrinsic IntOp, SDNode ExtOp, bit Commutable = 0> { |
| 2107 | def v8i16 : N3VLIntExt<op24, op23, 0b00, op11_8, op4, itin, |
| 2108 | OpcodeStr, !strconcat(Dt, "8"), |
| 2109 | v8i16, v8i8, IntOp, ExtOp, Commutable>; |
| 2110 | def v4i32 : N3VLIntExt<op24, op23, 0b01, op11_8, op4, itin, |
| 2111 | OpcodeStr, !strconcat(Dt, "16"), |
| 2112 | v4i32, v4i16, IntOp, ExtOp, Commutable>; |
| 2113 | def v2i64 : N3VLIntExt<op24, op23, 0b10, op11_8, op4, itin, |
| 2114 | OpcodeStr, !strconcat(Dt, "32"), |
| 2115 | v2i64, v2i32, IntOp, ExtOp, Commutable>; |
| 2116 | } |
| 2117 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2118 | |
| 2119 | // Neon Wide 3-register vector intrinsics, |
| 2120 | // source operand element sizes of 8, 16 and 32 bits: |
| Bob Wilson | d0c0548 | 2010-08-29 05:57:34 +0000 | [diff] [blame] | 2121 | multiclass N3VW_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, |
| 2122 | string OpcodeStr, string Dt, |
| 2123 | SDNode OpNode, SDNode ExtOp, bit Commutable = 0> { |
| 2124 | def v8i16 : N3VW<op24, op23, 0b00, op11_8, op4, |
| 2125 | OpcodeStr, !strconcat(Dt, "8"), |
| 2126 | v8i16, v8i8, OpNode, ExtOp, Commutable>; |
| 2127 | def v4i32 : N3VW<op24, op23, 0b01, op11_8, op4, |
| 2128 | OpcodeStr, !strconcat(Dt, "16"), |
| 2129 | v4i32, v4i16, OpNode, ExtOp, Commutable>; |
| 2130 | def v2i64 : N3VW<op24, op23, 0b10, op11_8, op4, |
| 2131 | OpcodeStr, !strconcat(Dt, "32"), |
| 2132 | v2i64, v2i32, OpNode, ExtOp, Commutable>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2133 | } |
| 2134 | |
| 2135 | |
| 2136 | // Neon Multiply-Op vector operations, |
| 2137 | // element sizes of 8, 16 and 32 bits: |
| 2138 | multiclass N3VMulOp_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2139 | InstrItinClass itinD16, InstrItinClass itinD32, |
| 2140 | InstrItinClass itinQ16, InstrItinClass itinQ32, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2141 | string OpcodeStr, string Dt, SDNode OpNode> { |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2142 | // 64-bit vector types. |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2143 | def v8i8 : N3VDMulOp<op24, op23, 0b00, op11_8, op4, itinD16, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2144 | OpcodeStr, !strconcat(Dt, "8"), v8i8, mul, OpNode>; |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2145 | def v4i16 : N3VDMulOp<op24, op23, 0b01, op11_8, op4, itinD16, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2146 | OpcodeStr, !strconcat(Dt, "16"), v4i16, mul, OpNode>; |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2147 | def v2i32 : N3VDMulOp<op24, op23, 0b10, op11_8, op4, itinD32, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2148 | OpcodeStr, !strconcat(Dt, "32"), v2i32, mul, OpNode>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2149 | |
| 2150 | // 128-bit vector types. |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2151 | def v16i8 : N3VQMulOp<op24, op23, 0b00, op11_8, op4, itinQ16, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2152 | OpcodeStr, !strconcat(Dt, "8"), v16i8, mul, OpNode>; |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2153 | def v8i16 : N3VQMulOp<op24, op23, 0b01, op11_8, op4, itinQ16, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2154 | OpcodeStr, !strconcat(Dt, "16"), v8i16, mul, OpNode>; |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2155 | def v4i32 : N3VQMulOp<op24, op23, 0b10, op11_8, op4, itinQ32, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2156 | OpcodeStr, !strconcat(Dt, "32"), v4i32, mul, OpNode>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2157 | } |
| 2158 | |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2159 | multiclass N3VMulOpSL_HS<bits<4> op11_8, |
| 2160 | InstrItinClass itinD16, InstrItinClass itinD32, |
| 2161 | InstrItinClass itinQ16, InstrItinClass itinQ32, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2162 | string OpcodeStr, string Dt, SDNode ShOp> { |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2163 | def v4i16 : N3VDMulOpSL16<0b01, op11_8, itinD16, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2164 | OpcodeStr, !strconcat(Dt, "16"), v4i16, mul, ShOp>; |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2165 | def v2i32 : N3VDMulOpSL<0b10, op11_8, itinD32, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2166 | OpcodeStr, !strconcat(Dt, "32"), v2i32, mul, ShOp>; |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2167 | def v8i16 : N3VQMulOpSL16<0b01, op11_8, itinQ16, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2168 | OpcodeStr, !strconcat(Dt, "16"), v8i16, v4i16, |
| 2169 | mul, ShOp>; |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2170 | def v4i32 : N3VQMulOpSL<0b10, op11_8, itinQ32, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2171 | OpcodeStr, !strconcat(Dt, "32"), v4i32, v2i32, |
| 2172 | mul, ShOp>; |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2173 | } |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2174 | |
| Bob Wilson | f65c9ef | 2010-09-03 01:35:08 +0000 | [diff] [blame] | 2175 | // Neon Intrinsic-Op vector operations, |
| 2176 | // element sizes of 8, 16 and 32 bits: |
| 2177 | multiclass N3VIntOp_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, |
| 2178 | InstrItinClass itinD, InstrItinClass itinQ, |
| 2179 | string OpcodeStr, string Dt, Intrinsic IntOp, |
| 2180 | SDNode OpNode> { |
| 2181 | // 64-bit vector types. |
| 2182 | def v8i8 : N3VDIntOp<op24, op23, 0b00, op11_8, op4, itinD, |
| 2183 | OpcodeStr, !strconcat(Dt, "8"), v8i8, IntOp, OpNode>; |
| 2184 | def v4i16 : N3VDIntOp<op24, op23, 0b01, op11_8, op4, itinD, |
| 2185 | OpcodeStr, !strconcat(Dt, "16"), v4i16, IntOp, OpNode>; |
| 2186 | def v2i32 : N3VDIntOp<op24, op23, 0b10, op11_8, op4, itinD, |
| 2187 | OpcodeStr, !strconcat(Dt, "32"), v2i32, IntOp, OpNode>; |
| 2188 | |
| 2189 | // 128-bit vector types. |
| 2190 | def v16i8 : N3VQIntOp<op24, op23, 0b00, op11_8, op4, itinQ, |
| 2191 | OpcodeStr, !strconcat(Dt, "8"), v16i8, IntOp, OpNode>; |
| 2192 | def v8i16 : N3VQIntOp<op24, op23, 0b01, op11_8, op4, itinQ, |
| 2193 | OpcodeStr, !strconcat(Dt, "16"), v8i16, IntOp, OpNode>; |
| 2194 | def v4i32 : N3VQIntOp<op24, op23, 0b10, op11_8, op4, itinQ, |
| 2195 | OpcodeStr, !strconcat(Dt, "32"), v4i32, IntOp, OpNode>; |
| 2196 | } |
| 2197 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2198 | // Neon 3-argument intrinsics, |
| 2199 | // element sizes of 8, 16 and 32 bits: |
| 2200 | multiclass N3VInt3_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, |
| Anton Korobeynikov | a248bec | 2010-04-07 18:20:42 +0000 | [diff] [blame] | 2201 | InstrItinClass itinD, InstrItinClass itinQ, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2202 | string OpcodeStr, string Dt, Intrinsic IntOp> { |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2203 | // 64-bit vector types. |
| Anton Korobeynikov | a248bec | 2010-04-07 18:20:42 +0000 | [diff] [blame] | 2204 | def v8i8 : N3VDInt3<op24, op23, 0b00, op11_8, op4, itinD, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2205 | OpcodeStr, !strconcat(Dt, "8"), v8i8, v8i8, IntOp>; |
| Anton Korobeynikov | a248bec | 2010-04-07 18:20:42 +0000 | [diff] [blame] | 2206 | def v4i16 : N3VDInt3<op24, op23, 0b01, op11_8, op4, itinD, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2207 | OpcodeStr, !strconcat(Dt, "16"), v4i16, v4i16, IntOp>; |
| Anton Korobeynikov | a248bec | 2010-04-07 18:20:42 +0000 | [diff] [blame] | 2208 | def v2i32 : N3VDInt3<op24, op23, 0b10, op11_8, op4, itinD, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2209 | OpcodeStr, !strconcat(Dt, "32"), v2i32, v2i32, IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2210 | |
| 2211 | // 128-bit vector types. |
| Anton Korobeynikov | a248bec | 2010-04-07 18:20:42 +0000 | [diff] [blame] | 2212 | def v16i8 : N3VQInt3<op24, op23, 0b00, op11_8, op4, itinQ, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2213 | OpcodeStr, !strconcat(Dt, "8"), v16i8, v16i8, IntOp>; |
| Anton Korobeynikov | a248bec | 2010-04-07 18:20:42 +0000 | [diff] [blame] | 2214 | def v8i16 : N3VQInt3<op24, op23, 0b01, op11_8, op4, itinQ, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2215 | OpcodeStr, !strconcat(Dt, "16"), v8i16, v8i16, IntOp>; |
| Anton Korobeynikov | a248bec | 2010-04-07 18:20:42 +0000 | [diff] [blame] | 2216 | def v4i32 : N3VQInt3<op24, op23, 0b10, op11_8, op4, itinQ, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2217 | OpcodeStr, !strconcat(Dt, "32"), v4i32, v4i32, IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2218 | } |
| 2219 | |
| 2220 | |
| Bob Wilson | 38ab35a | 2010-09-01 23:50:19 +0000 | [diff] [blame] | 2221 | // Neon Long Multiply-Op vector operations, |
| 2222 | // element sizes of 8, 16 and 32 bits: |
| 2223 | multiclass N3VLMulOp_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, |
| 2224 | InstrItinClass itin16, InstrItinClass itin32, |
| 2225 | string OpcodeStr, string Dt, SDNode MulOp, |
| 2226 | SDNode OpNode> { |
| 2227 | def v8i16 : N3VLMulOp<op24, op23, 0b00, op11_8, op4, itin16, OpcodeStr, |
| 2228 | !strconcat(Dt, "8"), v8i16, v8i8, MulOp, OpNode>; |
| 2229 | def v4i32 : N3VLMulOp<op24, op23, 0b01, op11_8, op4, itin16, OpcodeStr, |
| 2230 | !strconcat(Dt, "16"), v4i32, v4i16, MulOp, OpNode>; |
| 2231 | def v2i64 : N3VLMulOp<op24, op23, 0b10, op11_8, op4, itin32, OpcodeStr, |
| 2232 | !strconcat(Dt, "32"), v2i64, v2i32, MulOp, OpNode>; |
| 2233 | } |
| 2234 | |
| 2235 | multiclass N3VLMulOpSL_HS<bit op24, bits<4> op11_8, string OpcodeStr, |
| 2236 | string Dt, SDNode MulOp, SDNode OpNode> { |
| 2237 | def v4i16 : N3VLMulOpSL16<op24, 0b01, op11_8, IIC_VMACi16D, OpcodeStr, |
| 2238 | !strconcat(Dt,"16"), v4i32, v4i16, MulOp, OpNode>; |
| 2239 | def v2i32 : N3VLMulOpSL<op24, 0b10, op11_8, IIC_VMACi32D, OpcodeStr, |
| 2240 | !strconcat(Dt, "32"), v2i64, v2i32, MulOp, OpNode>; |
| 2241 | } |
| 2242 | |
| 2243 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2244 | // Neon Long 3-argument intrinsics. |
| 2245 | |
| 2246 | // First with only element sizes of 16 and 32 bits: |
| 2247 | multiclass N3VLInt3_HS<bit op24, bit op23, bits<4> op11_8, bit op4, |
| Anton Korobeynikov | ceb54d5 | 2010-04-07 18:21:04 +0000 | [diff] [blame] | 2248 | InstrItinClass itin16, InstrItinClass itin32, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2249 | string OpcodeStr, string Dt, Intrinsic IntOp> { |
| Anton Korobeynikov | ceb54d5 | 2010-04-07 18:21:04 +0000 | [diff] [blame] | 2250 | def v4i32 : N3VLInt3<op24, op23, 0b01, op11_8, op4, itin16, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2251 | OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, IntOp>; |
| Anton Korobeynikov | ceb54d5 | 2010-04-07 18:21:04 +0000 | [diff] [blame] | 2252 | def v2i64 : N3VLInt3<op24, op23, 0b10, op11_8, op4, itin32, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2253 | OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2254 | } |
| 2255 | |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2256 | multiclass N3VLInt3SL_HS<bit op24, bits<4> op11_8, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2257 | string OpcodeStr, string Dt, Intrinsic IntOp> { |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2258 | def v4i16 : N3VLInt3SL16<op24, 0b01, op11_8, IIC_VMACi16D, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2259 | OpcodeStr, !strconcat(Dt,"16"), v4i32, v4i16, IntOp>; |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2260 | def v2i32 : N3VLInt3SL<op24, 0b10, op11_8, IIC_VMACi32D, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2261 | OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, IntOp>; |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2262 | } |
| 2263 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2264 | // ....then also with element size of 8 bits: |
| 2265 | multiclass N3VLInt3_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, |
| Anton Korobeynikov | ceb54d5 | 2010-04-07 18:21:04 +0000 | [diff] [blame] | 2266 | InstrItinClass itin16, InstrItinClass itin32, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2267 | string OpcodeStr, string Dt, Intrinsic IntOp> |
| Anton Korobeynikov | ceb54d5 | 2010-04-07 18:21:04 +0000 | [diff] [blame] | 2268 | : N3VLInt3_HS<op24, op23, op11_8, op4, itin16, itin32, OpcodeStr, Dt, IntOp> { |
| 2269 | def v8i16 : N3VLInt3<op24, op23, 0b00, op11_8, op4, itin16, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2270 | OpcodeStr, !strconcat(Dt, "8"), v8i16, v8i8, IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2271 | } |
| 2272 | |
| Bob Wilson | f65c9ef | 2010-09-03 01:35:08 +0000 | [diff] [blame] | 2273 | // ....with explicit extend (VABAL). |
| 2274 | multiclass N3VLIntExtOp_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, |
| 2275 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 2276 | Intrinsic IntOp, SDNode ExtOp, SDNode OpNode> { |
| 2277 | def v8i16 : N3VLIntExtOp<op24, op23, 0b00, op11_8, op4, itin, |
| 2278 | OpcodeStr, !strconcat(Dt, "8"), v8i16, v8i8, |
| 2279 | IntOp, ExtOp, OpNode>; |
| 2280 | def v4i32 : N3VLIntExtOp<op24, op23, 0b01, op11_8, op4, itin, |
| 2281 | OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, |
| 2282 | IntOp, ExtOp, OpNode>; |
| 2283 | def v2i64 : N3VLIntExtOp<op24, op23, 0b10, op11_8, op4, itin, |
| 2284 | OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, |
| 2285 | IntOp, ExtOp, OpNode>; |
| 2286 | } |
| 2287 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2288 | |
| 2289 | // Neon 2-register vector intrinsics, |
| 2290 | // element sizes of 8, 16 and 32 bits: |
| 2291 | multiclass N2VInt_QHS<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16, |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2292 | bits<5> op11_7, bit op4, |
| 2293 | InstrItinClass itinD, InstrItinClass itinQ, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2294 | string OpcodeStr, string Dt, Intrinsic IntOp> { |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2295 | // 64-bit vector types. |
| 2296 | def v8i8 : N2VDInt<op24_23, op21_20, 0b00, op17_16, op11_7, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2297 | itinD, OpcodeStr, !strconcat(Dt, "8"), v8i8, v8i8, IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2298 | def v4i16 : N2VDInt<op24_23, op21_20, 0b01, op17_16, op11_7, op4, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2299 | itinD, OpcodeStr, !strconcat(Dt, "16"),v4i16,v4i16,IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2300 | def v2i32 : N2VDInt<op24_23, op21_20, 0b10, op17_16, op11_7, op4, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2301 | itinD, OpcodeStr, !strconcat(Dt, "32"),v2i32,v2i32,IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2302 | |
| 2303 | // 128-bit vector types. |
| 2304 | def v16i8 : N2VQInt<op24_23, op21_20, 0b00, op17_16, op11_7, op4, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2305 | itinQ, OpcodeStr, !strconcat(Dt, "8"), v16i8,v16i8,IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2306 | def v8i16 : N2VQInt<op24_23, op21_20, 0b01, op17_16, op11_7, op4, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2307 | itinQ, OpcodeStr, !strconcat(Dt, "16"),v8i16,v8i16,IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2308 | def v4i32 : N2VQInt<op24_23, op21_20, 0b10, op17_16, op11_7, op4, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2309 | itinQ, OpcodeStr, !strconcat(Dt, "32"),v4i32,v4i32,IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2310 | } |
| 2311 | |
| 2312 | |
| 2313 | // Neon Pairwise long 2-register intrinsics, |
| 2314 | // element sizes of 8, 16 and 32 bits: |
| 2315 | multiclass N2VPLInt_QHS<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16, |
| 2316 | bits<5> op11_7, bit op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2317 | string OpcodeStr, string Dt, Intrinsic IntOp> { |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2318 | // 64-bit vector types. |
| 2319 | def v8i8 : N2VDPLInt<op24_23, op21_20, 0b00, op17_16, op11_7, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2320 | OpcodeStr, !strconcat(Dt, "8"), v4i16, v8i8, IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2321 | def v4i16 : N2VDPLInt<op24_23, op21_20, 0b01, op17_16, op11_7, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2322 | OpcodeStr, !strconcat(Dt, "16"), v2i32, v4i16, IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2323 | def v2i32 : N2VDPLInt<op24_23, op21_20, 0b10, op17_16, op11_7, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2324 | OpcodeStr, !strconcat(Dt, "32"), v1i64, v2i32, IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2325 | |
| 2326 | // 128-bit vector types. |
| 2327 | def v16i8 : N2VQPLInt<op24_23, op21_20, 0b00, op17_16, op11_7, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2328 | OpcodeStr, !strconcat(Dt, "8"), v8i16, v16i8, IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2329 | def v8i16 : N2VQPLInt<op24_23, op21_20, 0b01, op17_16, op11_7, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2330 | OpcodeStr, !strconcat(Dt, "16"), v4i32, v8i16, IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2331 | def v4i32 : N2VQPLInt<op24_23, op21_20, 0b10, op17_16, op11_7, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2332 | OpcodeStr, !strconcat(Dt, "32"), v2i64, v4i32, IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2333 | } |
| 2334 | |
| 2335 | |
| 2336 | // Neon Pairwise long 2-register accumulate intrinsics, |
| 2337 | // element sizes of 8, 16 and 32 bits: |
| 2338 | multiclass N2VPLInt2_QHS<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16, |
| 2339 | bits<5> op11_7, bit op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2340 | string OpcodeStr, string Dt, Intrinsic IntOp> { |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2341 | // 64-bit vector types. |
| 2342 | def v8i8 : N2VDPLInt2<op24_23, op21_20, 0b00, op17_16, op11_7, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2343 | OpcodeStr, !strconcat(Dt, "8"), v4i16, v8i8, IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2344 | def v4i16 : N2VDPLInt2<op24_23, op21_20, 0b01, op17_16, op11_7, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2345 | OpcodeStr, !strconcat(Dt, "16"), v2i32, v4i16, IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2346 | def v2i32 : N2VDPLInt2<op24_23, op21_20, 0b10, op17_16, op11_7, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2347 | OpcodeStr, !strconcat(Dt, "32"), v1i64, v2i32, IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2348 | |
| 2349 | // 128-bit vector types. |
| 2350 | def v16i8 : N2VQPLInt2<op24_23, op21_20, 0b00, op17_16, op11_7, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2351 | OpcodeStr, !strconcat(Dt, "8"), v8i16, v16i8, IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2352 | def v8i16 : N2VQPLInt2<op24_23, op21_20, 0b01, op17_16, op11_7, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2353 | OpcodeStr, !strconcat(Dt, "16"), v4i32, v8i16, IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2354 | def v4i32 : N2VQPLInt2<op24_23, op21_20, 0b10, op17_16, op11_7, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2355 | OpcodeStr, !strconcat(Dt, "32"), v2i64, v4i32, IntOp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2356 | } |
| 2357 | |
| 2358 | |
| 2359 | // Neon 2-register vector shift by immediate, |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2360 | // with f of either N2RegVShLFrm or N2RegVShRFrm |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2361 | // element sizes of 8, 16, 32 and 64 bits: |
| 2362 | multiclass N2VSh_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2363 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 2364 | SDNode OpNode, Format f> { |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2365 | // 64-bit vector types. |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2366 | def v8i8 : N2VDSh<op24, op23, op11_8, 0, op4, f, itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2367 | OpcodeStr, !strconcat(Dt, "8"), v8i8, OpNode> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2368 | let Inst{21-19} = 0b001; // imm6 = 001xxx |
| 2369 | } |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2370 | def v4i16 : N2VDSh<op24, op23, op11_8, 0, op4, f, itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2371 | OpcodeStr, !strconcat(Dt, "16"), v4i16, OpNode> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2372 | let Inst{21-20} = 0b01; // imm6 = 01xxxx |
| 2373 | } |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2374 | def v2i32 : N2VDSh<op24, op23, op11_8, 0, op4, f, itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2375 | OpcodeStr, !strconcat(Dt, "32"), v2i32, OpNode> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2376 | let Inst{21} = 0b1; // imm6 = 1xxxxx |
| 2377 | } |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2378 | def v1i64 : N2VDSh<op24, op23, op11_8, 1, op4, f, itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2379 | OpcodeStr, !strconcat(Dt, "64"), v1i64, OpNode>; |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2380 | // imm6 = xxxxxx |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2381 | |
| 2382 | // 128-bit vector types. |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2383 | def v16i8 : N2VQSh<op24, op23, op11_8, 0, op4, f, itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2384 | OpcodeStr, !strconcat(Dt, "8"), v16i8, OpNode> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2385 | let Inst{21-19} = 0b001; // imm6 = 001xxx |
| 2386 | } |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2387 | def v8i16 : N2VQSh<op24, op23, op11_8, 0, op4, f, itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2388 | OpcodeStr, !strconcat(Dt, "16"), v8i16, OpNode> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2389 | let Inst{21-20} = 0b01; // imm6 = 01xxxx |
| 2390 | } |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2391 | def v4i32 : N2VQSh<op24, op23, op11_8, 0, op4, f, itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2392 | OpcodeStr, !strconcat(Dt, "32"), v4i32, OpNode> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2393 | let Inst{21} = 0b1; // imm6 = 1xxxxx |
| 2394 | } |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2395 | def v2i64 : N2VQSh<op24, op23, op11_8, 1, op4, f, itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2396 | OpcodeStr, !strconcat(Dt, "64"), v2i64, OpNode>; |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2397 | // imm6 = xxxxxx |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2398 | } |
| 2399 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2400 | // Neon Shift-Accumulate vector operations, |
| 2401 | // element sizes of 8, 16, 32 and 64 bits: |
| 2402 | multiclass N2VShAdd_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2403 | string OpcodeStr, string Dt, SDNode ShOp> { |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2404 | // 64-bit vector types. |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2405 | def v8i8 : N2VDShAdd<op24, op23, op11_8, 0, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2406 | OpcodeStr, !strconcat(Dt, "8"), v8i8, ShOp> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2407 | let Inst{21-19} = 0b001; // imm6 = 001xxx |
| 2408 | } |
| 2409 | def v4i16 : N2VDShAdd<op24, op23, op11_8, 0, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2410 | OpcodeStr, !strconcat(Dt, "16"), v4i16, ShOp> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2411 | let Inst{21-20} = 0b01; // imm6 = 01xxxx |
| 2412 | } |
| 2413 | def v2i32 : N2VDShAdd<op24, op23, op11_8, 0, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2414 | OpcodeStr, !strconcat(Dt, "32"), v2i32, ShOp> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2415 | let Inst{21} = 0b1; // imm6 = 1xxxxx |
| 2416 | } |
| 2417 | def v1i64 : N2VDShAdd<op24, op23, op11_8, 1, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2418 | OpcodeStr, !strconcat(Dt, "64"), v1i64, ShOp>; |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2419 | // imm6 = xxxxxx |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2420 | |
| 2421 | // 128-bit vector types. |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2422 | def v16i8 : N2VQShAdd<op24, op23, op11_8, 0, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2423 | OpcodeStr, !strconcat(Dt, "8"), v16i8, ShOp> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2424 | let Inst{21-19} = 0b001; // imm6 = 001xxx |
| 2425 | } |
| 2426 | def v8i16 : N2VQShAdd<op24, op23, op11_8, 0, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2427 | OpcodeStr, !strconcat(Dt, "16"), v8i16, ShOp> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2428 | let Inst{21-20} = 0b01; // imm6 = 01xxxx |
| 2429 | } |
| 2430 | def v4i32 : N2VQShAdd<op24, op23, op11_8, 0, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2431 | OpcodeStr, !strconcat(Dt, "32"), v4i32, ShOp> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2432 | let Inst{21} = 0b1; // imm6 = 1xxxxx |
| 2433 | } |
| 2434 | def v2i64 : N2VQShAdd<op24, op23, op11_8, 1, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2435 | OpcodeStr, !strconcat(Dt, "64"), v2i64, ShOp>; |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2436 | // imm6 = xxxxxx |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2437 | } |
| 2438 | |
| 2439 | |
| 2440 | // Neon Shift-Insert vector operations, |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2441 | // with f of either N2RegVShLFrm or N2RegVShRFrm |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2442 | // element sizes of 8, 16, 32 and 64 bits: |
| 2443 | multiclass N2VShIns_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2444 | string OpcodeStr, SDNode ShOp, |
| 2445 | Format f> { |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2446 | // 64-bit vector types. |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2447 | def v8i8 : N2VDShIns<op24, op23, op11_8, 0, op4, |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2448 | f, OpcodeStr, "8", v8i8, ShOp> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2449 | let Inst{21-19} = 0b001; // imm6 = 001xxx |
| 2450 | } |
| 2451 | def v4i16 : N2VDShIns<op24, op23, op11_8, 0, op4, |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2452 | f, OpcodeStr, "16", v4i16, ShOp> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2453 | let Inst{21-20} = 0b01; // imm6 = 01xxxx |
| 2454 | } |
| 2455 | def v2i32 : N2VDShIns<op24, op23, op11_8, 0, op4, |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2456 | f, OpcodeStr, "32", v2i32, ShOp> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2457 | let Inst{21} = 0b1; // imm6 = 1xxxxx |
| 2458 | } |
| 2459 | def v1i64 : N2VDShIns<op24, op23, op11_8, 1, op4, |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2460 | f, OpcodeStr, "64", v1i64, ShOp>; |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2461 | // imm6 = xxxxxx |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2462 | |
| 2463 | // 128-bit vector types. |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2464 | def v16i8 : N2VQShIns<op24, op23, op11_8, 0, op4, |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2465 | f, OpcodeStr, "8", v16i8, ShOp> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2466 | let Inst{21-19} = 0b001; // imm6 = 001xxx |
| 2467 | } |
| 2468 | def v8i16 : N2VQShIns<op24, op23, op11_8, 0, op4, |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2469 | f, OpcodeStr, "16", v8i16, ShOp> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2470 | let Inst{21-20} = 0b01; // imm6 = 01xxxx |
| 2471 | } |
| 2472 | def v4i32 : N2VQShIns<op24, op23, op11_8, 0, op4, |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2473 | f, OpcodeStr, "32", v4i32, ShOp> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2474 | let Inst{21} = 0b1; // imm6 = 1xxxxx |
| 2475 | } |
| 2476 | def v2i64 : N2VQShIns<op24, op23, op11_8, 1, op4, |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2477 | f, OpcodeStr, "64", v2i64, ShOp>; |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2478 | // imm6 = xxxxxx |
| 2479 | } |
| 2480 | |
| 2481 | // Neon Shift Long operations, |
| 2482 | // element sizes of 8, 16, 32 bits: |
| 2483 | multiclass N2VLSh_QHS<bit op24, bit op23, bits<4> op11_8, bit op7, bit op6, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2484 | bit op4, string OpcodeStr, string Dt, SDNode OpNode> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2485 | def v8i16 : N2VLSh<op24, op23, op11_8, op7, op6, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2486 | OpcodeStr, !strconcat(Dt, "8"), v8i16, v8i8, OpNode> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2487 | let Inst{21-19} = 0b001; // imm6 = 001xxx |
| 2488 | } |
| 2489 | def v4i32 : N2VLSh<op24, op23, op11_8, op7, op6, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2490 | OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, OpNode> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2491 | let Inst{21-20} = 0b01; // imm6 = 01xxxx |
| 2492 | } |
| 2493 | def v2i64 : N2VLSh<op24, op23, op11_8, op7, op6, op4, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2494 | OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, OpNode> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2495 | let Inst{21} = 0b1; // imm6 = 1xxxxx |
| 2496 | } |
| 2497 | } |
| 2498 | |
| 2499 | // Neon Shift Narrow operations, |
| 2500 | // element sizes of 16, 32, 64 bits: |
| 2501 | multiclass N2VNSh_HSD<bit op24, bit op23, bits<4> op11_8, bit op7, bit op6, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2502 | bit op4, InstrItinClass itin, string OpcodeStr, string Dt, |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2503 | SDNode OpNode> { |
| 2504 | def v8i8 : N2VNSh<op24, op23, op11_8, op7, op6, op4, itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2505 | OpcodeStr, !strconcat(Dt, "16"), v8i8, v8i16, OpNode> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2506 | let Inst{21-19} = 0b001; // imm6 = 001xxx |
| 2507 | } |
| 2508 | def v4i16 : N2VNSh<op24, op23, op11_8, op7, op6, op4, itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2509 | OpcodeStr, !strconcat(Dt, "32"), v4i16, v4i32, OpNode> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2510 | let Inst{21-20} = 0b01; // imm6 = 01xxxx |
| 2511 | } |
| 2512 | def v2i32 : N2VNSh<op24, op23, op11_8, op7, op6, op4, itin, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2513 | OpcodeStr, !strconcat(Dt, "64"), v2i32, v2i64, OpNode> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2514 | let Inst{21} = 0b1; // imm6 = 1xxxxx |
| 2515 | } |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2516 | } |
| 2517 | |
| 2518 | //===----------------------------------------------------------------------===// |
| 2519 | // Instruction Definitions. |
| 2520 | //===----------------------------------------------------------------------===// |
| 2521 | |
| 2522 | // Vector Add Operations. |
| 2523 | |
| 2524 | // VADD : Vector Add (integer and floating-point) |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2525 | defm VADD : N3V_QHSD<0, 0, 0b1000, 0, IIC_VBINiD, IIC_VBINiQ, "vadd", "i", |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2526 | add, 1>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2527 | def VADDfd : N3VD<0, 0, 0b00, 0b1101, 0, IIC_VBIND, "vadd", "f32", |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2528 | v2f32, v2f32, fadd, 1>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2529 | def VADDfq : N3VQ<0, 0, 0b00, 0b1101, 0, IIC_VBINQ, "vadd", "f32", |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2530 | v4f32, v4f32, fadd, 1>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2531 | // VADDL : Vector Add Long (Q = D + D) |
| Bob Wilson | 38ab35a | 2010-09-01 23:50:19 +0000 | [diff] [blame] | 2532 | defm VADDLs : N3VLExt_QHS<0,1,0b0000,0, IIC_VSHLiD, IIC_VSHLiD, |
| 2533 | "vaddl", "s", add, sext, 1>; |
| 2534 | defm VADDLu : N3VLExt_QHS<1,1,0b0000,0, IIC_VSHLiD, IIC_VSHLiD, |
| 2535 | "vaddl", "u", add, zext, 1>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2536 | // VADDW : Vector Add Wide (Q = Q + D) |
| Bob Wilson | d0c0548 | 2010-08-29 05:57:34 +0000 | [diff] [blame] | 2537 | defm VADDWs : N3VW_QHS<0,1,0b0001,0, "vaddw", "s", add, sext, 0>; |
| 2538 | defm VADDWu : N3VW_QHS<1,1,0b0001,0, "vaddw", "u", add, zext, 0>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2539 | // VHADD : Vector Halving Add |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 2540 | defm VHADDs : N3VInt_QHS<0, 0, 0b0000, 0, N3RegFrm, |
| 2541 | IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q, |
| 2542 | "vhadd", "s", int_arm_neon_vhadds, 1>; |
| 2543 | defm VHADDu : N3VInt_QHS<1, 0, 0b0000, 0, N3RegFrm, |
| 2544 | IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q, |
| 2545 | "vhadd", "u", int_arm_neon_vhaddu, 1>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2546 | // VRHADD : Vector Rounding Halving Add |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 2547 | defm VRHADDs : N3VInt_QHS<0, 0, 0b0001, 0, N3RegFrm, |
| 2548 | IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q, |
| 2549 | "vrhadd", "s", int_arm_neon_vrhadds, 1>; |
| 2550 | defm VRHADDu : N3VInt_QHS<1, 0, 0b0001, 0, N3RegFrm, |
| 2551 | IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q, |
| 2552 | "vrhadd", "u", int_arm_neon_vrhaddu, 1>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2553 | // VQADD : Vector Saturating Add |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 2554 | defm VQADDs : N3VInt_QHSD<0, 0, 0b0000, 1, N3RegFrm, |
| 2555 | IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q, |
| 2556 | "vqadd", "s", int_arm_neon_vqadds, 1>; |
| 2557 | defm VQADDu : N3VInt_QHSD<1, 0, 0b0000, 1, N3RegFrm, |
| 2558 | IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q, |
| 2559 | "vqadd", "u", int_arm_neon_vqaddu, 1>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2560 | // VADDHN : Vector Add and Narrow Returning High Half (D = Q + Q) |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2561 | defm VADDHN : N3VNInt_HSD<0,1,0b0100,0, "vaddhn", "i", |
| 2562 | int_arm_neon_vaddhn, 1>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2563 | // VRADDHN : Vector Rounding Add and Narrow Returning High Half (D = Q + Q) |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2564 | defm VRADDHN : N3VNInt_HSD<1,1,0b0100,0, "vraddhn", "i", |
| 2565 | int_arm_neon_vraddhn, 1>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2566 | |
| 2567 | // Vector Multiply Operations. |
| 2568 | |
| 2569 | // VMUL : Vector Multiply (integer, polynomial and floating-point) |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2570 | defm VMUL : N3V_QHS<0, 0, 0b1001, 1, IIC_VMULi16D, IIC_VMULi32D, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2571 | IIC_VMULi16Q, IIC_VMULi32Q, "vmul", "i", mul, 1>; |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 2572 | def VMULpd : N3VDInt<1, 0, 0b00, 0b1001, 1, N3RegFrm, IIC_VMULi16D, "vmul", |
| 2573 | "p8", v8i8, v8i8, int_arm_neon_vmulp, 1>; |
| 2574 | def VMULpq : N3VQInt<1, 0, 0b00, 0b1001, 1, N3RegFrm, IIC_VMULi16Q, "vmul", |
| 2575 | "p8", v16i8, v16i8, int_arm_neon_vmulp, 1>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2576 | def VMULfd : N3VD<1, 0, 0b00, 0b1101, 1, IIC_VBIND, "vmul", "f32", |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2577 | v2f32, v2f32, fmul, 1>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2578 | def VMULfq : N3VQ<1, 0, 0b00, 0b1101, 1, IIC_VBINQ, "vmul", "f32", |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2579 | v4f32, v4f32, fmul, 1>; |
| 2580 | defm VMULsl : N3VSL_HS<0b1000, "vmul", "i", mul>; |
| 2581 | def VMULslfd : N3VDSL<0b10, 0b1001, IIC_VBIND, "vmul", "f32", v2f32, fmul>; |
| 2582 | def VMULslfq : N3VQSL<0b10, 0b1001, IIC_VBINQ, "vmul", "f32", v4f32, |
| 2583 | v2f32, fmul>; |
| 2584 | |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2585 | def : Pat<(v8i16 (mul (v8i16 QPR:$src1), |
| 2586 | (v8i16 (NEONvduplane (v8i16 QPR:$src2), imm:$lane)))), |
| 2587 | (v8i16 (VMULslv8i16 (v8i16 QPR:$src1), |
| 2588 | (v4i16 (EXTRACT_SUBREG QPR:$src2, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2589 | (DSubReg_i16_reg imm:$lane))), |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2590 | (SubReg_i16_lane imm:$lane)))>; |
| 2591 | def : Pat<(v4i32 (mul (v4i32 QPR:$src1), |
| 2592 | (v4i32 (NEONvduplane (v4i32 QPR:$src2), imm:$lane)))), |
| 2593 | (v4i32 (VMULslv4i32 (v4i32 QPR:$src1), |
| 2594 | (v2i32 (EXTRACT_SUBREG QPR:$src2, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2595 | (DSubReg_i32_reg imm:$lane))), |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2596 | (SubReg_i32_lane imm:$lane)))>; |
| 2597 | def : Pat<(v4f32 (fmul (v4f32 QPR:$src1), |
| 2598 | (v4f32 (NEONvduplane (v4f32 QPR:$src2), imm:$lane)))), |
| 2599 | (v4f32 (VMULslfq (v4f32 QPR:$src1), |
| 2600 | (v2f32 (EXTRACT_SUBREG QPR:$src2, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2601 | (DSubReg_i32_reg imm:$lane))), |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2602 | (SubReg_i32_lane imm:$lane)))>; |
| 2603 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2604 | // VQDMULH : Vector Saturating Doubling Multiply Returning High Half |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 2605 | defm VQDMULH : N3VInt_HS<0, 0, 0b1011, 0, N3RegFrm, IIC_VMULi16D, IIC_VMULi32D, |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2606 | IIC_VMULi16Q, IIC_VMULi32Q, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2607 | "vqdmulh", "s", int_arm_neon_vqdmulh, 1>; |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2608 | defm VQDMULHsl: N3VIntSL_HS<0b1100, IIC_VMULi16D, IIC_VMULi32D, |
| 2609 | IIC_VMULi16Q, IIC_VMULi32Q, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2610 | "vqdmulh", "s", int_arm_neon_vqdmulh>; |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2611 | def : Pat<(v8i16 (int_arm_neon_vqdmulh (v8i16 QPR:$src1), |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2612 | (v8i16 (NEONvduplane (v8i16 QPR:$src2), |
| 2613 | imm:$lane)))), |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2614 | (v8i16 (VQDMULHslv8i16 (v8i16 QPR:$src1), |
| 2615 | (v4i16 (EXTRACT_SUBREG QPR:$src2, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2616 | (DSubReg_i16_reg imm:$lane))), |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2617 | (SubReg_i16_lane imm:$lane)))>; |
| 2618 | def : Pat<(v4i32 (int_arm_neon_vqdmulh (v4i32 QPR:$src1), |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2619 | (v4i32 (NEONvduplane (v4i32 QPR:$src2), |
| 2620 | imm:$lane)))), |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2621 | (v4i32 (VQDMULHslv4i32 (v4i32 QPR:$src1), |
| 2622 | (v2i32 (EXTRACT_SUBREG QPR:$src2, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2623 | (DSubReg_i32_reg imm:$lane))), |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2624 | (SubReg_i32_lane imm:$lane)))>; |
| 2625 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2626 | // VQRDMULH : Vector Rounding Saturating Doubling Multiply Returning High Half |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 2627 | defm VQRDMULH : N3VInt_HS<1, 0, 0b1011, 0, N3RegFrm, |
| 2628 | IIC_VMULi16D,IIC_VMULi32D,IIC_VMULi16Q,IIC_VMULi32Q, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2629 | "vqrdmulh", "s", int_arm_neon_vqrdmulh, 1>; |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2630 | defm VQRDMULHsl : N3VIntSL_HS<0b1101, IIC_VMULi16D, IIC_VMULi32D, |
| 2631 | IIC_VMULi16Q, IIC_VMULi32Q, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2632 | "vqrdmulh", "s", int_arm_neon_vqrdmulh>; |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2633 | def : Pat<(v8i16 (int_arm_neon_vqrdmulh (v8i16 QPR:$src1), |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2634 | (v8i16 (NEONvduplane (v8i16 QPR:$src2), |
| 2635 | imm:$lane)))), |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2636 | (v8i16 (VQRDMULHslv8i16 (v8i16 QPR:$src1), |
| 2637 | (v4i16 (EXTRACT_SUBREG QPR:$src2, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2638 | (DSubReg_i16_reg imm:$lane))), |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2639 | (SubReg_i16_lane imm:$lane)))>; |
| 2640 | def : Pat<(v4i32 (int_arm_neon_vqrdmulh (v4i32 QPR:$src1), |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2641 | (v4i32 (NEONvduplane (v4i32 QPR:$src2), |
| 2642 | imm:$lane)))), |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2643 | (v4i32 (VQRDMULHslv4i32 (v4i32 QPR:$src1), |
| 2644 | (v2i32 (EXTRACT_SUBREG QPR:$src2, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2645 | (DSubReg_i32_reg imm:$lane))), |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2646 | (SubReg_i32_lane imm:$lane)))>; |
| 2647 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2648 | // VMULL : Vector Multiply Long (integer and polynomial) (Q = D * D) |
| Bob Wilson | 38ab35a | 2010-09-01 23:50:19 +0000 | [diff] [blame] | 2649 | defm VMULLs : N3VL_QHS<0,1,0b1100,0, IIC_VMULi16D, IIC_VMULi32D, |
| 2650 | "vmull", "s", NEONvmulls, 1>; |
| 2651 | defm VMULLu : N3VL_QHS<1,1,0b1100,0, IIC_VMULi16D, IIC_VMULi32D, |
| 2652 | "vmull", "u", NEONvmullu, 1>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2653 | def VMULLp : N3VLInt<0, 1, 0b00, 0b1110, 0, IIC_VMULi16D, "vmull", "p8", |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2654 | v8i16, v8i8, int_arm_neon_vmullp, 1>; |
| Bob Wilson | 38ab35a | 2010-09-01 23:50:19 +0000 | [diff] [blame] | 2655 | defm VMULLsls : N3VLSL_HS<0, 0b1010, IIC_VMULi16D, "vmull", "s", NEONvmulls>; |
| 2656 | defm VMULLslu : N3VLSL_HS<1, 0b1010, IIC_VMULi16D, "vmull", "u", NEONvmullu>; |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2657 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2658 | // VQDMULL : Vector Saturating Doubling Multiply Long (Q = D * D) |
| Anton Korobeynikov | 4d36f88 | 2010-04-07 18:21:10 +0000 | [diff] [blame] | 2659 | defm VQDMULL : N3VLInt_HS<0,1,0b1101,0, IIC_VMULi16D, IIC_VMULi32D, |
| 2660 | "vqdmull", "s", int_arm_neon_vqdmull, 1>; |
| 2661 | defm VQDMULLsl: N3VLIntSL_HS<0, 0b1011, IIC_VMULi16D, |
| 2662 | "vqdmull", "s", int_arm_neon_vqdmull>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2663 | |
| 2664 | // Vector Multiply-Accumulate and Multiply-Subtract Operations. |
| 2665 | |
| 2666 | // VMLA : Vector Multiply Accumulate (integer and floating-point) |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2667 | defm VMLA : N3VMulOp_QHS<0, 0, 0b1001, 0, IIC_VMACi16D, IIC_VMACi32D, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2668 | IIC_VMACi16Q, IIC_VMACi32Q, "vmla", "i", add>; |
| 2669 | def VMLAfd : N3VDMulOp<0, 0, 0b00, 0b1101, 1, IIC_VMACD, "vmla", "f32", |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2670 | v2f32, fmul, fadd>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2671 | def VMLAfq : N3VQMulOp<0, 0, 0b00, 0b1101, 1, IIC_VMACQ, "vmla", "f32", |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2672 | v4f32, fmul, fadd>; |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2673 | defm VMLAsl : N3VMulOpSL_HS<0b0000, IIC_VMACi16D, IIC_VMACi32D, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2674 | IIC_VMACi16Q, IIC_VMACi32Q, "vmla", "i", add>; |
| 2675 | def VMLAslfd : N3VDMulOpSL<0b10, 0b0001, IIC_VMACD, "vmla", "f32", |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2676 | v2f32, fmul, fadd>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2677 | def VMLAslfq : N3VQMulOpSL<0b10, 0b0001, IIC_VMACQ, "vmla", "f32", |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2678 | v4f32, v2f32, fmul, fadd>; |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2679 | |
| 2680 | def : Pat<(v8i16 (add (v8i16 QPR:$src1), |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2681 | (mul (v8i16 QPR:$src2), |
| 2682 | (v8i16 (NEONvduplane (v8i16 QPR:$src3), imm:$lane))))), |
| 2683 | (v8i16 (VMLAslv8i16 (v8i16 QPR:$src1), (v8i16 QPR:$src2), |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2684 | (v4i16 (EXTRACT_SUBREG QPR:$src3, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2685 | (DSubReg_i16_reg imm:$lane))), |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2686 | (SubReg_i16_lane imm:$lane)))>; |
| 2687 | |
| 2688 | def : Pat<(v4i32 (add (v4i32 QPR:$src1), |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2689 | (mul (v4i32 QPR:$src2), |
| 2690 | (v4i32 (NEONvduplane (v4i32 QPR:$src3), imm:$lane))))), |
| 2691 | (v4i32 (VMLAslv4i32 (v4i32 QPR:$src1), (v4i32 QPR:$src2), |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2692 | (v2i32 (EXTRACT_SUBREG QPR:$src3, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2693 | (DSubReg_i32_reg imm:$lane))), |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2694 | (SubReg_i32_lane imm:$lane)))>; |
| 2695 | |
| 2696 | def : Pat<(v4f32 (fadd (v4f32 QPR:$src1), |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2697 | (fmul (v4f32 QPR:$src2), |
| 2698 | (v4f32 (NEONvduplane (v4f32 QPR:$src3), imm:$lane))))), |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2699 | (v4f32 (VMLAslfq (v4f32 QPR:$src1), |
| 2700 | (v4f32 QPR:$src2), |
| 2701 | (v2f32 (EXTRACT_SUBREG QPR:$src3, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2702 | (DSubReg_i32_reg imm:$lane))), |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2703 | (SubReg_i32_lane imm:$lane)))>; |
| 2704 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2705 | // VMLAL : Vector Multiply Accumulate Long (Q += D * D) |
| Bob Wilson | 38ab35a | 2010-09-01 23:50:19 +0000 | [diff] [blame] | 2706 | defm VMLALs : N3VLMulOp_QHS<0,1,0b1000,0, IIC_VMACi16D, IIC_VMACi32D, |
| 2707 | "vmlal", "s", NEONvmulls, add>; |
| 2708 | defm VMLALu : N3VLMulOp_QHS<1,1,0b1000,0, IIC_VMACi16D, IIC_VMACi32D, |
| 2709 | "vmlal", "u", NEONvmullu, add>; |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2710 | |
| Bob Wilson | 38ab35a | 2010-09-01 23:50:19 +0000 | [diff] [blame] | 2711 | defm VMLALsls : N3VLMulOpSL_HS<0, 0b0010, "vmlal", "s", NEONvmulls, add>; |
| 2712 | defm VMLALslu : N3VLMulOpSL_HS<1, 0b0010, "vmlal", "u", NEONvmullu, add>; |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2713 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2714 | // VQDMLAL : Vector Saturating Doubling Multiply Accumulate Long (Q += D * D) |
| Anton Korobeynikov | ceb54d5 | 2010-04-07 18:21:04 +0000 | [diff] [blame] | 2715 | defm VQDMLAL : N3VLInt3_HS<0, 1, 0b1001, 0, IIC_VMACi16D, IIC_VMACi32D, |
| Anton Korobeynikov | a248bec | 2010-04-07 18:20:42 +0000 | [diff] [blame] | 2716 | "vqdmlal", "s", int_arm_neon_vqdmlal>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2717 | defm VQDMLALsl: N3VLInt3SL_HS<0, 0b0011, "vqdmlal", "s", int_arm_neon_vqdmlal>; |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2718 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2719 | // VMLS : Vector Multiply Subtract (integer and floating-point) |
| Bob Wilson | a9abf57 | 2009-10-03 04:41:21 +0000 | [diff] [blame] | 2720 | defm VMLS : N3VMulOp_QHS<1, 0, 0b1001, 0, IIC_VMACi16D, IIC_VMACi32D, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2721 | IIC_VMACi16Q, IIC_VMACi32Q, "vmls", "i", sub>; |
| 2722 | def VMLSfd : N3VDMulOp<0, 0, 0b10, 0b1101, 1, IIC_VMACD, "vmls", "f32", |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2723 | v2f32, fmul, fsub>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2724 | def VMLSfq : N3VQMulOp<0, 0, 0b10, 0b1101, 1, IIC_VMACQ, "vmls", "f32", |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2725 | v4f32, fmul, fsub>; |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2726 | defm VMLSsl : N3VMulOpSL_HS<0b0100, IIC_VMACi16D, IIC_VMACi32D, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2727 | IIC_VMACi16Q, IIC_VMACi32Q, "vmls", "i", sub>; |
| 2728 | def VMLSslfd : N3VDMulOpSL<0b10, 0b0101, IIC_VMACD, "vmls", "f32", |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2729 | v2f32, fmul, fsub>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2730 | def VMLSslfq : N3VQMulOpSL<0b10, 0b0101, IIC_VMACQ, "vmls", "f32", |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2731 | v4f32, v2f32, fmul, fsub>; |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2732 | |
| 2733 | def : Pat<(v8i16 (sub (v8i16 QPR:$src1), |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2734 | (mul (v8i16 QPR:$src2), |
| 2735 | (v8i16 (NEONvduplane (v8i16 QPR:$src3), imm:$lane))))), |
| 2736 | (v8i16 (VMLSslv8i16 (v8i16 QPR:$src1), (v8i16 QPR:$src2), |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2737 | (v4i16 (EXTRACT_SUBREG QPR:$src3, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2738 | (DSubReg_i16_reg imm:$lane))), |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2739 | (SubReg_i16_lane imm:$lane)))>; |
| 2740 | |
| 2741 | def : Pat<(v4i32 (sub (v4i32 QPR:$src1), |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2742 | (mul (v4i32 QPR:$src2), |
| 2743 | (v4i32 (NEONvduplane (v4i32 QPR:$src3), imm:$lane))))), |
| 2744 | (v4i32 (VMLSslv4i32 (v4i32 QPR:$src1), (v4i32 QPR:$src2), |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2745 | (v2i32 (EXTRACT_SUBREG QPR:$src3, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2746 | (DSubReg_i32_reg imm:$lane))), |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2747 | (SubReg_i32_lane imm:$lane)))>; |
| 2748 | |
| 2749 | def : Pat<(v4f32 (fsub (v4f32 QPR:$src1), |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2750 | (fmul (v4f32 QPR:$src2), |
| 2751 | (v4f32 (NEONvduplane (v4f32 QPR:$src3), imm:$lane))))), |
| 2752 | (v4f32 (VMLSslfq (v4f32 QPR:$src1), (v4f32 QPR:$src2), |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2753 | (v2f32 (EXTRACT_SUBREG QPR:$src3, |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2754 | (DSubReg_i32_reg imm:$lane))), |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2755 | (SubReg_i32_lane imm:$lane)))>; |
| 2756 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2757 | // VMLSL : Vector Multiply Subtract Long (Q -= D * D) |
| Bob Wilson | 38ab35a | 2010-09-01 23:50:19 +0000 | [diff] [blame] | 2758 | defm VMLSLs : N3VLMulOp_QHS<0,1,0b1010,0, IIC_VMACi16D, IIC_VMACi32D, |
| 2759 | "vmlsl", "s", NEONvmulls, sub>; |
| 2760 | defm VMLSLu : N3VLMulOp_QHS<1,1,0b1010,0, IIC_VMACi16D, IIC_VMACi32D, |
| 2761 | "vmlsl", "u", NEONvmullu, sub>; |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2762 | |
| Bob Wilson | 38ab35a | 2010-09-01 23:50:19 +0000 | [diff] [blame] | 2763 | defm VMLSLsls : N3VLMulOpSL_HS<0, 0b0110, "vmlsl", "s", NEONvmulls, sub>; |
| 2764 | defm VMLSLslu : N3VLMulOpSL_HS<1, 0b0110, "vmlsl", "u", NEONvmullu, sub>; |
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2765 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2766 | // VQDMLSL : Vector Saturating Doubling Multiply Subtract Long (Q -= D * D) |
| Anton Korobeynikov | ceb54d5 | 2010-04-07 18:21:04 +0000 | [diff] [blame] | 2767 | defm VQDMLSL : N3VLInt3_HS<0, 1, 0b1011, 0, IIC_VMACi16D, IIC_VMACi32D, |
| Anton Korobeynikov | a248bec | 2010-04-07 18:20:42 +0000 | [diff] [blame] | 2768 | "vqdmlsl", "s", int_arm_neon_vqdmlsl>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2769 | defm VQDMLSLsl: N3VLInt3SL_HS<0, 0b111, "vqdmlsl", "s", int_arm_neon_vqdmlsl>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2770 | |
| 2771 | // Vector Subtract Operations. |
| 2772 | |
| 2773 | // VSUB : Vector Subtract (integer and floating-point) |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2774 | defm VSUB : N3V_QHSD<1, 0, 0b1000, 0, IIC_VSUBiD, IIC_VSUBiQ, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2775 | "vsub", "i", sub, 0>; |
| 2776 | def VSUBfd : N3VD<0, 0, 0b10, 0b1101, 0, IIC_VBIND, "vsub", "f32", |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2777 | v2f32, v2f32, fsub, 0>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2778 | def VSUBfq : N3VQ<0, 0, 0b10, 0b1101, 0, IIC_VBINQ, "vsub", "f32", |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2779 | v4f32, v4f32, fsub, 0>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2780 | // VSUBL : Vector Subtract Long (Q = D - D) |
| Bob Wilson | 38ab35a | 2010-09-01 23:50:19 +0000 | [diff] [blame] | 2781 | defm VSUBLs : N3VLExt_QHS<0,1,0b0010,0, IIC_VSHLiD, IIC_VSHLiD, |
| 2782 | "vsubl", "s", sub, sext, 0>; |
| 2783 | defm VSUBLu : N3VLExt_QHS<1,1,0b0010,0, IIC_VSHLiD, IIC_VSHLiD, |
| 2784 | "vsubl", "u", sub, zext, 0>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2785 | // VSUBW : Vector Subtract Wide (Q = Q - D) |
| Bob Wilson | d0c0548 | 2010-08-29 05:57:34 +0000 | [diff] [blame] | 2786 | defm VSUBWs : N3VW_QHS<0,1,0b0011,0, "vsubw", "s", sub, sext, 0>; |
| 2787 | defm VSUBWu : N3VW_QHS<1,1,0b0011,0, "vsubw", "u", sub, zext, 0>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2788 | // VHSUB : Vector Halving Subtract |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 2789 | defm VHSUBs : N3VInt_QHS<0, 0, 0b0010, 0, N3RegFrm, |
| Anton Korobeynikov | 7d4fad5 | 2010-04-07 18:20:13 +0000 | [diff] [blame] | 2790 | IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2791 | "vhsub", "s", int_arm_neon_vhsubs, 0>; |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 2792 | defm VHSUBu : N3VInt_QHS<1, 0, 0b0010, 0, N3RegFrm, |
| Anton Korobeynikov | 7d4fad5 | 2010-04-07 18:20:13 +0000 | [diff] [blame] | 2793 | IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2794 | "vhsub", "u", int_arm_neon_vhsubu, 0>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2795 | // VQSUB : Vector Saturing Subtract |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 2796 | defm VQSUBs : N3VInt_QHSD<0, 0, 0b0010, 1, N3RegFrm, |
| Anton Korobeynikov | 7d4fad5 | 2010-04-07 18:20:13 +0000 | [diff] [blame] | 2797 | IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2798 | "vqsub", "s", int_arm_neon_vqsubs, 0>; |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 2799 | defm VQSUBu : N3VInt_QHSD<1, 0, 0b0010, 1, N3RegFrm, |
| Anton Korobeynikov | 7d4fad5 | 2010-04-07 18:20:13 +0000 | [diff] [blame] | 2800 | IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2801 | "vqsub", "u", int_arm_neon_vqsubu, 0>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2802 | // VSUBHN : Vector Subtract and Narrow Returning High Half (D = Q - Q) |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2803 | defm VSUBHN : N3VNInt_HSD<0,1,0b0110,0, "vsubhn", "i", |
| 2804 | int_arm_neon_vsubhn, 0>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2805 | // VRSUBHN : Vector Rounding Subtract and Narrow Returning High Half (D=Q-Q) |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2806 | defm VRSUBHN : N3VNInt_HSD<1,1,0b0110,0, "vrsubhn", "i", |
| 2807 | int_arm_neon_vrsubhn, 0>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2808 | |
| 2809 | // Vector Comparisons. |
| 2810 | |
| 2811 | // VCEQ : Vector Compare Equal |
| Anton Korobeynikov | 7d4fad5 | 2010-04-07 18:20:13 +0000 | [diff] [blame] | 2812 | defm VCEQ : N3V_QHS<1, 0, 0b1000, 1, IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, |
| 2813 | IIC_VSUBi4Q, "vceq", "i", NEONvceq, 1>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2814 | def VCEQfd : N3VD<0,0,0b00,0b1110,0, IIC_VBIND, "vceq", "f32", v2i32, v2f32, |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2815 | NEONvceq, 1>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2816 | def VCEQfq : N3VQ<0,0,0b00,0b1110,0, IIC_VBINQ, "vceq", "f32", v4i32, v4f32, |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2817 | NEONvceq, 1>; |
| Johnny Chen | 886915e | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 2818 | // For disassembly only. |
| Johnny Chen | 21dbd6f | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 2819 | defm VCEQz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00010, 0, "vceq", "i", |
| Bob Wilson | 574f68f | 2010-06-25 20:54:44 +0000 | [diff] [blame] | 2820 | "$dst, $src, #0">; |
| Johnny Chen | 886915e | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 2821 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2822 | // VCGE : Vector Compare Greater Than or Equal |
| Anton Korobeynikov | 7d4fad5 | 2010-04-07 18:20:13 +0000 | [diff] [blame] | 2823 | defm VCGEs : N3V_QHS<0, 0, 0b0011, 1, IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, |
| 2824 | IIC_VSUBi4Q, "vcge", "s", NEONvcge, 0>; |
| 2825 | defm VCGEu : N3V_QHS<1, 0, 0b0011, 1, IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, |
| 2826 | IIC_VSUBi4Q, "vcge", "u", NEONvcgeu, 0>; |
| Johnny Chen | bff23ca | 2010-03-24 21:25:07 +0000 | [diff] [blame] | 2827 | def VCGEfd : N3VD<1,0,0b00,0b1110,0, IIC_VBIND, "vcge", "f32", v2i32, v2f32, |
| 2828 | NEONvcge, 0>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2829 | def VCGEfq : N3VQ<1,0,0b00,0b1110,0, IIC_VBINQ, "vcge", "f32", v4i32, v4f32, |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2830 | NEONvcge, 0>; |
| Johnny Chen | 21dbd6f | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 2831 | // For disassembly only. |
| 2832 | defm VCGEz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00001, 0, "vcge", "s", |
| 2833 | "$dst, $src, #0">; |
| 2834 | // For disassembly only. |
| 2835 | defm VCLEz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00011, 0, "vcle", "s", |
| 2836 | "$dst, $src, #0">; |
| 2837 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2838 | // VCGT : Vector Compare Greater Than |
| Anton Korobeynikov | 7d4fad5 | 2010-04-07 18:20:13 +0000 | [diff] [blame] | 2839 | defm VCGTs : N3V_QHS<0, 0, 0b0011, 0, IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, |
| 2840 | IIC_VSUBi4Q, "vcgt", "s", NEONvcgt, 0>; |
| 2841 | defm VCGTu : N3V_QHS<1, 0, 0b0011, 0, IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, |
| 2842 | IIC_VSUBi4Q, "vcgt", "u", NEONvcgtu, 0>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2843 | def VCGTfd : N3VD<1,0,0b10,0b1110,0, IIC_VBIND, "vcgt", "f32", v2i32, v2f32, |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2844 | NEONvcgt, 0>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2845 | def VCGTfq : N3VQ<1,0,0b10,0b1110,0, IIC_VBINQ, "vcgt", "f32", v4i32, v4f32, |
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2846 | NEONvcgt, 0>; |
| Johnny Chen | 21dbd6f | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 2847 | // For disassembly only. |
| 2848 | defm VCGTz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00000, 0, "vcgt", "s", |
| 2849 | "$dst, $src, #0">; |
| 2850 | // For disassembly only. |
| 2851 | defm VCLTz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00100, 0, "vclt", "s", |
| 2852 | "$dst, $src, #0">; |
| 2853 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2854 | // VACGE : Vector Absolute Compare Greater Than or Equal (aka VCAGE) |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 2855 | def VACGEd : N3VDInt<1, 0, 0b00, 0b1110, 1, N3RegFrm, IIC_VBIND, "vacge", |
| 2856 | "f32", v2i32, v2f32, int_arm_neon_vacged, 0>; |
| 2857 | def VACGEq : N3VQInt<1, 0, 0b00, 0b1110, 1, N3RegFrm, IIC_VBINQ, "vacge", |
| 2858 | "f32", v4i32, v4f32, int_arm_neon_vacgeq, 0>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2859 | // VACGT : Vector Absolute Compare Greater Than (aka VCAGT) |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 2860 | def VACGTd : N3VDInt<1, 0, 0b10, 0b1110, 1, N3RegFrm, IIC_VBIND, "vacgt", |
| 2861 | "f32", v2i32, v2f32, int_arm_neon_vacgtd, 0>; |
| 2862 | def VACGTq : N3VQInt<1, 0, 0b10, 0b1110, 1, N3RegFrm, IIC_VBINQ, "vacgt", |
| 2863 | "f32", v4i32, v4f32, int_arm_neon_vacgtq, 0>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2864 | // VTST : Vector Test Bits |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2865 | defm VTST : N3V_QHS<0, 0, 0b1000, 1, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, |
| Bob Wilson | 9349437 | 2010-01-17 06:35:17 +0000 | [diff] [blame] | 2866 | IIC_VBINi4Q, "vtst", "", NEONvtst, 1>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2867 | |
| 2868 | // Vector Bitwise Operations. |
| 2869 | |
| Bob Wilson | a3f1901 | 2010-07-13 21:16:48 +0000 | [diff] [blame] | 2870 | def vnotd : PatFrag<(ops node:$in), |
| 2871 | (xor node:$in, (bitconvert (v8i8 NEONimmAllOnesV)))>; |
| 2872 | def vnotq : PatFrag<(ops node:$in), |
| 2873 | (xor node:$in, (bitconvert (v16i8 NEONimmAllOnesV)))>; |
| Chris Lattner | 6c223ee | 2010-03-28 08:08:07 +0000 | [diff] [blame] | 2874 | |
| 2875 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2876 | // VAND : Vector Bitwise AND |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2877 | def VANDd : N3VDX<0, 0, 0b00, 0b0001, 1, IIC_VBINiD, "vand", |
| 2878 | v2i32, v2i32, and, 1>; |
| 2879 | def VANDq : N3VQX<0, 0, 0b00, 0b0001, 1, IIC_VBINiQ, "vand", |
| 2880 | v4i32, v4i32, and, 1>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2881 | |
| 2882 | // VEOR : Vector Bitwise Exclusive OR |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2883 | def VEORd : N3VDX<1, 0, 0b00, 0b0001, 1, IIC_VBINiD, "veor", |
| 2884 | v2i32, v2i32, xor, 1>; |
| 2885 | def VEORq : N3VQX<1, 0, 0b00, 0b0001, 1, IIC_VBINiQ, "veor", |
| 2886 | v4i32, v4i32, xor, 1>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2887 | |
| 2888 | // VORR : Vector Bitwise OR |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2889 | def VORRd : N3VDX<0, 0, 0b10, 0b0001, 1, IIC_VBINiD, "vorr", |
| 2890 | v2i32, v2i32, or, 1>; |
| 2891 | def VORRq : N3VQX<0, 0, 0b10, 0b0001, 1, IIC_VBINiQ, "vorr", |
| 2892 | v4i32, v4i32, or, 1>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2893 | |
| 2894 | // VBIC : Vector Bitwise Bit Clear (AND NOT) |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2895 | def VBICd : N3VX<0, 0, 0b01, 0b0001, 0, 1, (outs DPR:$dst), |
| Bob Wilson | 0f8a028 | 2010-03-27 04:01:23 +0000 | [diff] [blame] | 2896 | (ins DPR:$src1, DPR:$src2), N3RegFrm, IIC_VBINiD, |
| 2897 | "vbic", "$dst, $src1, $src2", "", |
| 2898 | [(set DPR:$dst, (v2i32 (and DPR:$src1, |
| Bob Wilson | a3f1901 | 2010-07-13 21:16:48 +0000 | [diff] [blame] | 2899 | (vnotd DPR:$src2))))]>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2900 | def VBICq : N3VX<0, 0, 0b01, 0b0001, 1, 1, (outs QPR:$dst), |
| Bob Wilson | 0f8a028 | 2010-03-27 04:01:23 +0000 | [diff] [blame] | 2901 | (ins QPR:$src1, QPR:$src2), N3RegFrm, IIC_VBINiQ, |
| 2902 | "vbic", "$dst, $src1, $src2", "", |
| 2903 | [(set QPR:$dst, (v4i32 (and QPR:$src1, |
| Bob Wilson | a3f1901 | 2010-07-13 21:16:48 +0000 | [diff] [blame] | 2904 | (vnotq QPR:$src2))))]>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2905 | |
| 2906 | // VORN : Vector Bitwise OR NOT |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2907 | def VORNd : N3VX<0, 0, 0b11, 0b0001, 0, 1, (outs DPR:$dst), |
| Bob Wilson | 0f8a028 | 2010-03-27 04:01:23 +0000 | [diff] [blame] | 2908 | (ins DPR:$src1, DPR:$src2), N3RegFrm, IIC_VBINiD, |
| 2909 | "vorn", "$dst, $src1, $src2", "", |
| 2910 | [(set DPR:$dst, (v2i32 (or DPR:$src1, |
| Bob Wilson | a3f1901 | 2010-07-13 21:16:48 +0000 | [diff] [blame] | 2911 | (vnotd DPR:$src2))))]>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2912 | def VORNq : N3VX<0, 0, 0b11, 0b0001, 1, 1, (outs QPR:$dst), |
| Bob Wilson | 0f8a028 | 2010-03-27 04:01:23 +0000 | [diff] [blame] | 2913 | (ins QPR:$src1, QPR:$src2), N3RegFrm, IIC_VBINiQ, |
| 2914 | "vorn", "$dst, $src1, $src2", "", |
| 2915 | [(set QPR:$dst, (v4i32 (or QPR:$src1, |
| Bob Wilson | a3f1901 | 2010-07-13 21:16:48 +0000 | [diff] [blame] | 2916 | (vnotq QPR:$src2))))]>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2917 | |
| Bob Wilson | bad47f6 | 2010-07-14 06:31:50 +0000 | [diff] [blame] | 2918 | // VMVN : Vector Bitwise NOT (Immediate) |
| 2919 | |
| 2920 | let isReMaterializable = 1 in { |
| 2921 | def VMVNv4i16 : N1ModImm<1, 0b000, {1,0,?,0}, 0, 0, 1, 1, (outs DPR:$dst), |
| 2922 | (ins nModImm:$SIMM), IIC_VMOVImm, |
| 2923 | "vmvn", "i16", "$dst, $SIMM", "", |
| 2924 | [(set DPR:$dst, (v4i16 (NEONvmvnImm timm:$SIMM)))]>; |
| 2925 | def VMVNv8i16 : N1ModImm<1, 0b000, {1,0,?,0}, 0, 1, 1, 1, (outs QPR:$dst), |
| 2926 | (ins nModImm:$SIMM), IIC_VMOVImm, |
| 2927 | "vmvn", "i16", "$dst, $SIMM", "", |
| 2928 | [(set QPR:$dst, (v8i16 (NEONvmvnImm timm:$SIMM)))]>; |
| 2929 | |
| 2930 | def VMVNv2i32 : N1ModImm<1, 0b000, {?,?,?,?}, 0, 0, 1, 1, (outs DPR:$dst), |
| 2931 | (ins nModImm:$SIMM), IIC_VMOVImm, |
| 2932 | "vmvn", "i32", "$dst, $SIMM", "", |
| 2933 | [(set DPR:$dst, (v2i32 (NEONvmvnImm timm:$SIMM)))]>; |
| 2934 | def VMVNv4i32 : N1ModImm<1, 0b000, {?,?,?,?}, 0, 1, 1, 1, (outs QPR:$dst), |
| 2935 | (ins nModImm:$SIMM), IIC_VMOVImm, |
| 2936 | "vmvn", "i32", "$dst, $SIMM", "", |
| 2937 | [(set QPR:$dst, (v4i32 (NEONvmvnImm timm:$SIMM)))]>; |
| 2938 | } |
| 2939 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2940 | // VMVN : Vector Bitwise NOT |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2941 | def VMVNd : N2VX<0b11, 0b11, 0b00, 0b00, 0b01011, 0, 0, |
| Anton Korobeynikov | a3e4989 | 2010-04-07 18:20:36 +0000 | [diff] [blame] | 2942 | (outs DPR:$dst), (ins DPR:$src), IIC_VSUBiD, |
| Bob Wilson | 0f8a028 | 2010-03-27 04:01:23 +0000 | [diff] [blame] | 2943 | "vmvn", "$dst, $src", "", |
| Bob Wilson | a3f1901 | 2010-07-13 21:16:48 +0000 | [diff] [blame] | 2944 | [(set DPR:$dst, (v2i32 (vnotd DPR:$src)))]>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2945 | def VMVNq : N2VX<0b11, 0b11, 0b00, 0b00, 0b01011, 1, 0, |
| Anton Korobeynikov | a3e4989 | 2010-04-07 18:20:36 +0000 | [diff] [blame] | 2946 | (outs QPR:$dst), (ins QPR:$src), IIC_VSUBiD, |
| Bob Wilson | 0f8a028 | 2010-03-27 04:01:23 +0000 | [diff] [blame] | 2947 | "vmvn", "$dst, $src", "", |
| Bob Wilson | a3f1901 | 2010-07-13 21:16:48 +0000 | [diff] [blame] | 2948 | [(set QPR:$dst, (v4i32 (vnotq QPR:$src)))]>; |
| 2949 | def : Pat<(v2i32 (vnotd DPR:$src)), (VMVNd DPR:$src)>; |
| 2950 | def : Pat<(v4i32 (vnotq QPR:$src)), (VMVNq QPR:$src)>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2951 | |
| 2952 | // VBSL : Vector Bitwise Select |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2953 | def VBSLd : N3VX<1, 0, 0b01, 0b0001, 0, 1, (outs DPR:$dst), |
| Bob Wilson | 0f8a028 | 2010-03-27 04:01:23 +0000 | [diff] [blame] | 2954 | (ins DPR:$src1, DPR:$src2, DPR:$src3), |
| 2955 | N3RegFrm, IIC_VCNTiD, |
| 2956 | "vbsl", "$dst, $src2, $src3", "$src1 = $dst", |
| 2957 | [(set DPR:$dst, |
| 2958 | (v2i32 (or (and DPR:$src2, DPR:$src1), |
| Bob Wilson | a3f1901 | 2010-07-13 21:16:48 +0000 | [diff] [blame] | 2959 | (and DPR:$src3, (vnotd DPR:$src1)))))]>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2960 | def VBSLq : N3VX<1, 0, 0b01, 0b0001, 1, 1, (outs QPR:$dst), |
| Bob Wilson | 0f8a028 | 2010-03-27 04:01:23 +0000 | [diff] [blame] | 2961 | (ins QPR:$src1, QPR:$src2, QPR:$src3), |
| 2962 | N3RegFrm, IIC_VCNTiQ, |
| 2963 | "vbsl", "$dst, $src2, $src3", "$src1 = $dst", |
| 2964 | [(set QPR:$dst, |
| 2965 | (v4i32 (or (and QPR:$src2, QPR:$src1), |
| Bob Wilson | a3f1901 | 2010-07-13 21:16:48 +0000 | [diff] [blame] | 2966 | (and QPR:$src3, (vnotq QPR:$src1)))))]>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2967 | |
| 2968 | // VBIF : Vector Bitwise Insert if False |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2969 | // like VBSL but with: "vbif $dst, $src3, $src1", "$src2 = $dst", |
| Johnny Chen | 1215c77 | 2010-02-09 23:05:23 +0000 | [diff] [blame] | 2970 | def VBIFd : N3VX<1, 0, 0b11, 0b0001, 0, 1, |
| 2971 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2, DPR:$src3), |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 2972 | N3RegFrm, IIC_VBINiD, |
| 2973 | "vbif", "$dst, $src2, $src3", "$src1 = $dst", |
| Johnny Chen | 1215c77 | 2010-02-09 23:05:23 +0000 | [diff] [blame] | 2974 | [/* For disassembly only; pattern left blank */]>; |
| 2975 | def VBIFq : N3VX<1, 0, 0b11, 0b0001, 1, 1, |
| 2976 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2, QPR:$src3), |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 2977 | N3RegFrm, IIC_VBINiQ, |
| 2978 | "vbif", "$dst, $src2, $src3", "$src1 = $dst", |
| Johnny Chen | 1215c77 | 2010-02-09 23:05:23 +0000 | [diff] [blame] | 2979 | [/* For disassembly only; pattern left blank */]>; |
| 2980 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2981 | // VBIT : Vector Bitwise Insert if True |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2982 | // like VBSL but with: "vbit $dst, $src2, $src1", "$src3 = $dst", |
| Johnny Chen | 1215c77 | 2010-02-09 23:05:23 +0000 | [diff] [blame] | 2983 | def VBITd : N3VX<1, 0, 0b10, 0b0001, 0, 1, |
| 2984 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2, DPR:$src3), |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 2985 | N3RegFrm, IIC_VBINiD, |
| 2986 | "vbit", "$dst, $src2, $src3", "$src1 = $dst", |
| Johnny Chen | 1215c77 | 2010-02-09 23:05:23 +0000 | [diff] [blame] | 2987 | [/* For disassembly only; pattern left blank */]>; |
| 2988 | def VBITq : N3VX<1, 0, 0b10, 0b0001, 1, 1, |
| 2989 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2, QPR:$src3), |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 2990 | N3RegFrm, IIC_VBINiQ, |
| 2991 | "vbit", "$dst, $src2, $src3", "$src1 = $dst", |
| Johnny Chen | 1215c77 | 2010-02-09 23:05:23 +0000 | [diff] [blame] | 2992 | [/* For disassembly only; pattern left blank */]>; |
| 2993 | |
| 2994 | // VBIT/VBIF are not yet implemented. The TwoAddress pass will not go looking |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2995 | // for equivalent operations with different register constraints; it just |
| 2996 | // inserts copies. |
| 2997 | |
| 2998 | // Vector Absolute Differences. |
| 2999 | |
| 3000 | // VABD : Vector Absolute Difference |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3001 | defm VABDs : N3VInt_QHS<0, 0, 0b0111, 0, N3RegFrm, |
| Anton Korobeynikov | 4650fd5 | 2010-04-07 18:20:18 +0000 | [diff] [blame] | 3002 | IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q, |
| Bob Wilson | f65c9ef | 2010-09-03 01:35:08 +0000 | [diff] [blame] | 3003 | "vabd", "s", int_arm_neon_vabds, 1>; |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3004 | defm VABDu : N3VInt_QHS<1, 0, 0b0111, 0, N3RegFrm, |
| Anton Korobeynikov | 4650fd5 | 2010-04-07 18:20:18 +0000 | [diff] [blame] | 3005 | IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q, |
| Bob Wilson | f65c9ef | 2010-09-03 01:35:08 +0000 | [diff] [blame] | 3006 | "vabd", "u", int_arm_neon_vabdu, 1>; |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3007 | def VABDfd : N3VDInt<1, 0, 0b10, 0b1101, 0, N3RegFrm, IIC_VBIND, |
| Bob Wilson | f65c9ef | 2010-09-03 01:35:08 +0000 | [diff] [blame] | 3008 | "vabd", "f32", v2f32, v2f32, int_arm_neon_vabds, 1>; |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3009 | def VABDfq : N3VQInt<1, 0, 0b10, 0b1101, 0, N3RegFrm, IIC_VBINQ, |
| Bob Wilson | f65c9ef | 2010-09-03 01:35:08 +0000 | [diff] [blame] | 3010 | "vabd", "f32", v4f32, v4f32, int_arm_neon_vabds, 1>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3011 | |
| 3012 | // VABDL : Vector Absolute Difference Long (Q = | D - D |) |
| Bob Wilson | f65c9ef | 2010-09-03 01:35:08 +0000 | [diff] [blame] | 3013 | defm VABDLs : N3VLIntExt_QHS<0,1,0b0111,0, IIC_VSUBi4Q, |
| 3014 | "vabdl", "s", int_arm_neon_vabds, zext, 1>; |
| 3015 | defm VABDLu : N3VLIntExt_QHS<1,1,0b0111,0, IIC_VSUBi4Q, |
| 3016 | "vabdl", "u", int_arm_neon_vabdu, zext, 1>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3017 | |
| 3018 | // VABA : Vector Absolute Difference and Accumulate |
| Bob Wilson | f65c9ef | 2010-09-03 01:35:08 +0000 | [diff] [blame] | 3019 | defm VABAs : N3VIntOp_QHS<0,0,0b0111,1, IIC_VABAD, IIC_VABAQ, |
| 3020 | "vaba", "s", int_arm_neon_vabds, add>; |
| 3021 | defm VABAu : N3VIntOp_QHS<1,0,0b0111,1, IIC_VABAD, IIC_VABAQ, |
| 3022 | "vaba", "u", int_arm_neon_vabdu, add>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3023 | |
| 3024 | // VABAL : Vector Absolute Difference and Accumulate Long (Q += | D - D |) |
| Bob Wilson | f65c9ef | 2010-09-03 01:35:08 +0000 | [diff] [blame] | 3025 | defm VABALs : N3VLIntExtOp_QHS<0,1,0b0101,0, IIC_VABAD, |
| 3026 | "vabal", "s", int_arm_neon_vabds, zext, add>; |
| 3027 | defm VABALu : N3VLIntExtOp_QHS<1,1,0b0101,0, IIC_VABAD, |
| 3028 | "vabal", "u", int_arm_neon_vabdu, zext, add>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3029 | |
| 3030 | // Vector Maximum and Minimum. |
| 3031 | |
| 3032 | // VMAX : Vector Maximum |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3033 | defm VMAXs : N3VInt_QHS<0, 0, 0b0110, 0, N3RegFrm, |
| Anton Korobeynikov | 1a1af5a | 2010-04-07 18:20:24 +0000 | [diff] [blame] | 3034 | IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q, |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3035 | "vmax", "s", int_arm_neon_vmaxs, 1>; |
| 3036 | defm VMAXu : N3VInt_QHS<1, 0, 0b0110, 0, N3RegFrm, |
| Anton Korobeynikov | 1a1af5a | 2010-04-07 18:20:24 +0000 | [diff] [blame] | 3037 | IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q, |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3038 | "vmax", "u", int_arm_neon_vmaxu, 1>; |
| Anton Korobeynikov | 1a1af5a | 2010-04-07 18:20:24 +0000 | [diff] [blame] | 3039 | def VMAXfd : N3VDInt<0, 0, 0b00, 0b1111, 0, N3RegFrm, IIC_VBIND, |
| 3040 | "vmax", "f32", |
| Anton Korobeynikov | 7d4fad5 | 2010-04-07 18:20:13 +0000 | [diff] [blame] | 3041 | v2f32, v2f32, int_arm_neon_vmaxs, 1>; |
| Anton Korobeynikov | 1a1af5a | 2010-04-07 18:20:24 +0000 | [diff] [blame] | 3042 | def VMAXfq : N3VQInt<0, 0, 0b00, 0b1111, 0, N3RegFrm, IIC_VBINQ, |
| 3043 | "vmax", "f32", |
| Anton Korobeynikov | 7d4fad5 | 2010-04-07 18:20:13 +0000 | [diff] [blame] | 3044 | v4f32, v4f32, int_arm_neon_vmaxs, 1>; |
| 3045 | |
| 3046 | // VMIN : Vector Minimum |
| Anton Korobeynikov | 1a1af5a | 2010-04-07 18:20:24 +0000 | [diff] [blame] | 3047 | defm VMINs : N3VInt_QHS<0, 0, 0b0110, 1, N3RegFrm, |
| 3048 | IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q, |
| 3049 | "vmin", "s", int_arm_neon_vmins, 1>; |
| 3050 | defm VMINu : N3VInt_QHS<1, 0, 0b0110, 1, N3RegFrm, |
| 3051 | IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q, |
| 3052 | "vmin", "u", int_arm_neon_vminu, 1>; |
| 3053 | def VMINfd : N3VDInt<0, 0, 0b10, 0b1111, 0, N3RegFrm, IIC_VBIND, |
| 3054 | "vmin", "f32", |
| Anton Korobeynikov | 7d4fad5 | 2010-04-07 18:20:13 +0000 | [diff] [blame] | 3055 | v2f32, v2f32, int_arm_neon_vmins, 1>; |
| Anton Korobeynikov | 1a1af5a | 2010-04-07 18:20:24 +0000 | [diff] [blame] | 3056 | def VMINfq : N3VQInt<0, 0, 0b10, 0b1111, 0, N3RegFrm, IIC_VBINQ, |
| 3057 | "vmin", "f32", |
| Anton Korobeynikov | 7d4fad5 | 2010-04-07 18:20:13 +0000 | [diff] [blame] | 3058 | v4f32, v4f32, int_arm_neon_vmins, 1>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3059 | |
| 3060 | // Vector Pairwise Operations. |
| 3061 | |
| 3062 | // VPADD : Vector Pairwise Add |
| Anton Korobeynikov | 1a1af5a | 2010-04-07 18:20:24 +0000 | [diff] [blame] | 3063 | def VPADDi8 : N3VDInt<0, 0, 0b00, 0b1011, 1, N3RegFrm, IIC_VSHLiD, |
| 3064 | "vpadd", "i8", |
| 3065 | v8i8, v8i8, int_arm_neon_vpadd, 0>; |
| 3066 | def VPADDi16 : N3VDInt<0, 0, 0b01, 0b1011, 1, N3RegFrm, IIC_VSHLiD, |
| 3067 | "vpadd", "i16", |
| 3068 | v4i16, v4i16, int_arm_neon_vpadd, 0>; |
| 3069 | def VPADDi32 : N3VDInt<0, 0, 0b10, 0b1011, 1, N3RegFrm, IIC_VSHLiD, |
| 3070 | "vpadd", "i32", |
| 3071 | v2i32, v2i32, int_arm_neon_vpadd, 0>; |
| Anton Korobeynikov | 140a65c | 2010-04-07 18:20:29 +0000 | [diff] [blame] | 3072 | def VPADDf : N3VDInt<1, 0, 0b00, 0b1101, 0, N3RegFrm, |
| 3073 | IIC_VBIND, "vpadd", "f32", |
| Anton Korobeynikov | 1a1af5a | 2010-04-07 18:20:24 +0000 | [diff] [blame] | 3074 | v2f32, v2f32, int_arm_neon_vpadd, 0>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3075 | |
| 3076 | // VPADDL : Vector Pairwise Add Long |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3077 | defm VPADDLs : N2VPLInt_QHS<0b11, 0b11, 0b00, 0b00100, 0, "vpaddl", "s", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3078 | int_arm_neon_vpaddls>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3079 | defm VPADDLu : N2VPLInt_QHS<0b11, 0b11, 0b00, 0b00101, 0, "vpaddl", "u", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3080 | int_arm_neon_vpaddlu>; |
| 3081 | |
| 3082 | // VPADAL : Vector Pairwise Add and Accumulate Long |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3083 | defm VPADALs : N2VPLInt2_QHS<0b11, 0b11, 0b00, 0b01100, 0, "vpadal", "s", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3084 | int_arm_neon_vpadals>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3085 | defm VPADALu : N2VPLInt2_QHS<0b11, 0b11, 0b00, 0b01101, 0, "vpadal", "u", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3086 | int_arm_neon_vpadalu>; |
| 3087 | |
| 3088 | // VPMAX : Vector Pairwise Maximum |
| Anton Korobeynikov | 1a1af5a | 2010-04-07 18:20:24 +0000 | [diff] [blame] | 3089 | def VPMAXs8 : N3VDInt<0, 0, 0b00, 0b1010, 0, N3RegFrm, IIC_VSUBi4D, "vpmax", |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3090 | "s8", v8i8, v8i8, int_arm_neon_vpmaxs, 0>; |
| Anton Korobeynikov | 1a1af5a | 2010-04-07 18:20:24 +0000 | [diff] [blame] | 3091 | def VPMAXs16 : N3VDInt<0, 0, 0b01, 0b1010, 0, N3RegFrm, IIC_VSUBi4D, "vpmax", |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3092 | "s16", v4i16, v4i16, int_arm_neon_vpmaxs, 0>; |
| Anton Korobeynikov | 1a1af5a | 2010-04-07 18:20:24 +0000 | [diff] [blame] | 3093 | def VPMAXs32 : N3VDInt<0, 0, 0b10, 0b1010, 0, N3RegFrm, IIC_VSUBi4D, "vpmax", |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3094 | "s32", v2i32, v2i32, int_arm_neon_vpmaxs, 0>; |
| Anton Korobeynikov | 1a1af5a | 2010-04-07 18:20:24 +0000 | [diff] [blame] | 3095 | def VPMAXu8 : N3VDInt<1, 0, 0b00, 0b1010, 0, N3RegFrm, IIC_VSUBi4D, "vpmax", |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3096 | "u8", v8i8, v8i8, int_arm_neon_vpmaxu, 0>; |
| Anton Korobeynikov | 1a1af5a | 2010-04-07 18:20:24 +0000 | [diff] [blame] | 3097 | def VPMAXu16 : N3VDInt<1, 0, 0b01, 0b1010, 0, N3RegFrm, IIC_VSUBi4D, "vpmax", |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3098 | "u16", v4i16, v4i16, int_arm_neon_vpmaxu, 0>; |
| Anton Korobeynikov | 1a1af5a | 2010-04-07 18:20:24 +0000 | [diff] [blame] | 3099 | def VPMAXu32 : N3VDInt<1, 0, 0b10, 0b1010, 0, N3RegFrm, IIC_VSUBi4D, "vpmax", |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3100 | "u32", v2i32, v2i32, int_arm_neon_vpmaxu, 0>; |
| Anton Korobeynikov | 1a1af5a | 2010-04-07 18:20:24 +0000 | [diff] [blame] | 3101 | def VPMAXf : N3VDInt<1, 0, 0b00, 0b1111, 0, N3RegFrm, IIC_VSUBi4D, "vpmax", |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3102 | "f32", v2f32, v2f32, int_arm_neon_vpmaxs, 0>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3103 | |
| 3104 | // VPMIN : Vector Pairwise Minimum |
| Anton Korobeynikov | 1a1af5a | 2010-04-07 18:20:24 +0000 | [diff] [blame] | 3105 | def VPMINs8 : N3VDInt<0, 0, 0b00, 0b1010, 1, N3RegFrm, IIC_VSUBi4D, "vpmin", |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3106 | "s8", v8i8, v8i8, int_arm_neon_vpmins, 0>; |
| Anton Korobeynikov | 1a1af5a | 2010-04-07 18:20:24 +0000 | [diff] [blame] | 3107 | def VPMINs16 : N3VDInt<0, 0, 0b01, 0b1010, 1, N3RegFrm, IIC_VSUBi4D, "vpmin", |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3108 | "s16", v4i16, v4i16, int_arm_neon_vpmins, 0>; |
| Anton Korobeynikov | 1a1af5a | 2010-04-07 18:20:24 +0000 | [diff] [blame] | 3109 | def VPMINs32 : N3VDInt<0, 0, 0b10, 0b1010, 1, N3RegFrm, IIC_VSUBi4D, "vpmin", |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3110 | "s32", v2i32, v2i32, int_arm_neon_vpmins, 0>; |
| Anton Korobeynikov | 1a1af5a | 2010-04-07 18:20:24 +0000 | [diff] [blame] | 3111 | def VPMINu8 : N3VDInt<1, 0, 0b00, 0b1010, 1, N3RegFrm, IIC_VSUBi4D, "vpmin", |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3112 | "u8", v8i8, v8i8, int_arm_neon_vpminu, 0>; |
| Anton Korobeynikov | 1a1af5a | 2010-04-07 18:20:24 +0000 | [diff] [blame] | 3113 | def VPMINu16 : N3VDInt<1, 0, 0b01, 0b1010, 1, N3RegFrm, IIC_VSUBi4D, "vpmin", |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3114 | "u16", v4i16, v4i16, int_arm_neon_vpminu, 0>; |
| Anton Korobeynikov | 1a1af5a | 2010-04-07 18:20:24 +0000 | [diff] [blame] | 3115 | def VPMINu32 : N3VDInt<1, 0, 0b10, 0b1010, 1, N3RegFrm, IIC_VSUBi4D, "vpmin", |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3116 | "u32", v2i32, v2i32, int_arm_neon_vpminu, 0>; |
| Anton Korobeynikov | 1a1af5a | 2010-04-07 18:20:24 +0000 | [diff] [blame] | 3117 | def VPMINf : N3VDInt<1, 0, 0b10, 0b1111, 0, N3RegFrm, IIC_VSUBi4D, "vpmin", |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3118 | "f32", v2f32, v2f32, int_arm_neon_vpmins, 0>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3119 | |
| 3120 | // Vector Reciprocal and Reciprocal Square Root Estimate and Step. |
| 3121 | |
| 3122 | // VRECPE : Vector Reciprocal Estimate |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 3123 | def VRECPEd : N2VDInt<0b11, 0b11, 0b10, 0b11, 0b01000, 0, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3124 | IIC_VUNAD, "vrecpe", "u32", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3125 | v2i32, v2i32, int_arm_neon_vrecpe>; |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 3126 | def VRECPEq : N2VQInt<0b11, 0b11, 0b10, 0b11, 0b01000, 0, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3127 | IIC_VUNAQ, "vrecpe", "u32", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3128 | v4i32, v4i32, int_arm_neon_vrecpe>; |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 3129 | def VRECPEfd : N2VDInt<0b11, 0b11, 0b10, 0b11, 0b01010, 0, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3130 | IIC_VUNAD, "vrecpe", "f32", |
| Bob Wilson | 12842f9 | 2009-08-11 05:39:44 +0000 | [diff] [blame] | 3131 | v2f32, v2f32, int_arm_neon_vrecpe>; |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 3132 | def VRECPEfq : N2VQInt<0b11, 0b11, 0b10, 0b11, 0b01010, 0, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3133 | IIC_VUNAQ, "vrecpe", "f32", |
| Bob Wilson | 12842f9 | 2009-08-11 05:39:44 +0000 | [diff] [blame] | 3134 | v4f32, v4f32, int_arm_neon_vrecpe>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3135 | |
| 3136 | // VRECPS : Vector Reciprocal Step |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3137 | def VRECPSfd : N3VDInt<0, 0, 0b00, 0b1111, 1, N3RegFrm, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3138 | IIC_VRECSD, "vrecps", "f32", |
| 3139 | v2f32, v2f32, int_arm_neon_vrecps, 1>; |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3140 | def VRECPSfq : N3VQInt<0, 0, 0b00, 0b1111, 1, N3RegFrm, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3141 | IIC_VRECSQ, "vrecps", "f32", |
| 3142 | v4f32, v4f32, int_arm_neon_vrecps, 1>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3143 | |
| 3144 | // VRSQRTE : Vector Reciprocal Square Root Estimate |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 3145 | def VRSQRTEd : N2VDInt<0b11, 0b11, 0b10, 0b11, 0b01001, 0, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3146 | IIC_VUNAD, "vrsqrte", "u32", |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 3147 | v2i32, v2i32, int_arm_neon_vrsqrte>; |
| 3148 | def VRSQRTEq : N2VQInt<0b11, 0b11, 0b10, 0b11, 0b01001, 0, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3149 | IIC_VUNAQ, "vrsqrte", "u32", |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 3150 | v4i32, v4i32, int_arm_neon_vrsqrte>; |
| 3151 | def VRSQRTEfd : N2VDInt<0b11, 0b11, 0b10, 0b11, 0b01011, 0, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3152 | IIC_VUNAD, "vrsqrte", "f32", |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 3153 | v2f32, v2f32, int_arm_neon_vrsqrte>; |
| 3154 | def VRSQRTEfq : N2VQInt<0b11, 0b11, 0b10, 0b11, 0b01011, 0, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3155 | IIC_VUNAQ, "vrsqrte", "f32", |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 3156 | v4f32, v4f32, int_arm_neon_vrsqrte>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3157 | |
| 3158 | // VRSQRTS : Vector Reciprocal Square Root Step |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3159 | def VRSQRTSfd : N3VDInt<0, 0, 0b10, 0b1111, 1, N3RegFrm, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3160 | IIC_VRECSD, "vrsqrts", "f32", |
| 3161 | v2f32, v2f32, int_arm_neon_vrsqrts, 1>; |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3162 | def VRSQRTSfq : N3VQInt<0, 0, 0b10, 0b1111, 1, N3RegFrm, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3163 | IIC_VRECSQ, "vrsqrts", "f32", |
| 3164 | v4f32, v4f32, int_arm_neon_vrsqrts, 1>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3165 | |
| 3166 | // Vector Shifts. |
| 3167 | |
| 3168 | // VSHL : Vector Shift |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3169 | defm VSHLs : N3VInt_QHSD<0, 0, 0b0100, 0, N3RegVShFrm, |
| 3170 | IIC_VSHLiD, IIC_VSHLiD, IIC_VSHLiQ, IIC_VSHLiQ, |
| 3171 | "vshl", "s", int_arm_neon_vshifts, 0>; |
| 3172 | defm VSHLu : N3VInt_QHSD<1, 0, 0b0100, 0, N3RegVShFrm, |
| 3173 | IIC_VSHLiD, IIC_VSHLiD, IIC_VSHLiQ, IIC_VSHLiQ, |
| 3174 | "vshl", "u", int_arm_neon_vshiftu, 0>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3175 | // VSHL : Vector Shift Left (Immediate) |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 3176 | defm VSHLi : N2VSh_QHSD<0, 1, 0b0101, 1, IIC_VSHLiD, "vshl", "i", NEONvshl, |
| 3177 | N2RegVShLFrm>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3178 | // VSHR : Vector Shift Right (Immediate) |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 3179 | defm VSHRs : N2VSh_QHSD<0, 1, 0b0000, 1, IIC_VSHLiD, "vshr", "s", NEONvshrs, |
| 3180 | N2RegVShRFrm>; |
| 3181 | defm VSHRu : N2VSh_QHSD<1, 1, 0b0000, 1, IIC_VSHLiD, "vshr", "u", NEONvshru, |
| 3182 | N2RegVShRFrm>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3183 | |
| 3184 | // VSHLL : Vector Shift Left Long |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3185 | defm VSHLLs : N2VLSh_QHS<0, 1, 0b1010, 0, 0, 1, "vshll", "s", NEONvshlls>; |
| 3186 | defm VSHLLu : N2VLSh_QHS<1, 1, 0b1010, 0, 0, 1, "vshll", "u", NEONvshllu>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3187 | |
| 3188 | // VSHLL : Vector Shift Left Long (with maximum shift count) |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 3189 | class N2VLShMax<bit op24, bit op23, bits<6> op21_16, bits<4> op11_8, bit op7, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3190 | bit op6, bit op4, string OpcodeStr, string Dt, ValueType ResTy, |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 3191 | ValueType OpTy, SDNode OpNode> |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3192 | : N2VLSh<op24, op23, op11_8, op7, op6, op4, OpcodeStr, Dt, |
| 3193 | ResTy, OpTy, OpNode> { |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 3194 | let Inst{21-16} = op21_16; |
| 3195 | } |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3196 | def VSHLLi8 : N2VLShMax<1, 1, 0b110010, 0b0011, 0, 0, 0, "vshll", "i8", |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 3197 | v8i16, v8i8, NEONvshlli>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3198 | def VSHLLi16 : N2VLShMax<1, 1, 0b110110, 0b0011, 0, 0, 0, "vshll", "i16", |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 3199 | v4i32, v4i16, NEONvshlli>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3200 | def VSHLLi32 : N2VLShMax<1, 1, 0b111010, 0b0011, 0, 0, 0, "vshll", "i32", |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 3201 | v2i64, v2i32, NEONvshlli>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3202 | |
| 3203 | // VSHRN : Vector Shift Right and Narrow |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 3204 | defm VSHRN : N2VNSh_HSD<0,1,0b1000,0,0,1, IIC_VSHLiD, "vshrn", "i", |
| 3205 | NEONvshrn>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3206 | |
| 3207 | // VRSHL : Vector Rounding Shift |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3208 | defm VRSHLs : N3VInt_QHSD<0, 0, 0b0101, 0, N3RegVShFrm, |
| 3209 | IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, IIC_VSHLi4Q, |
| 3210 | "vrshl", "s", int_arm_neon_vrshifts, 0>; |
| 3211 | defm VRSHLu : N3VInt_QHSD<1, 0, 0b0101, 0, N3RegVShFrm, |
| 3212 | IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, IIC_VSHLi4Q, |
| 3213 | "vrshl", "u", int_arm_neon_vrshiftu, 0>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3214 | // VRSHR : Vector Rounding Shift Right |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 3215 | defm VRSHRs : N2VSh_QHSD<0,1,0b0010,1, IIC_VSHLi4D, "vrshr", "s", NEONvrshrs, |
| 3216 | N2RegVShRFrm>; |
| 3217 | defm VRSHRu : N2VSh_QHSD<1,1,0b0010,1, IIC_VSHLi4D, "vrshr", "u", NEONvrshru, |
| 3218 | N2RegVShRFrm>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3219 | |
| 3220 | // VRSHRN : Vector Rounding Shift Right and Narrow |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3221 | defm VRSHRN : N2VNSh_HSD<0, 1, 0b1000, 0, 1, 1, IIC_VSHLi4D, "vrshrn", "i", |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 3222 | NEONvrshrn>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3223 | |
| 3224 | // VQSHL : Vector Saturating Shift |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3225 | defm VQSHLs : N3VInt_QHSD<0, 0, 0b0100, 1, N3RegVShFrm, |
| 3226 | IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, IIC_VSHLi4Q, |
| 3227 | "vqshl", "s", int_arm_neon_vqshifts, 0>; |
| 3228 | defm VQSHLu : N3VInt_QHSD<1, 0, 0b0100, 1, N3RegVShFrm, |
| 3229 | IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, IIC_VSHLi4Q, |
| 3230 | "vqshl", "u", int_arm_neon_vqshiftu, 0>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3231 | // VQSHL : Vector Saturating Shift Left (Immediate) |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 3232 | defm VQSHLsi : N2VSh_QHSD<0,1,0b0111,1, IIC_VSHLi4D, "vqshl", "s",NEONvqshls, |
| 3233 | N2RegVShLFrm>; |
| 3234 | defm VQSHLui : N2VSh_QHSD<1,1,0b0111,1, IIC_VSHLi4D, "vqshl", "u",NEONvqshlu, |
| 3235 | N2RegVShLFrm>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3236 | // VQSHLU : Vector Saturating Shift Left (Immediate, Unsigned) |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 3237 | defm VQSHLsu : N2VSh_QHSD<1,1,0b0110,1, IIC_VSHLi4D,"vqshlu","s",NEONvqshlsu, |
| 3238 | N2RegVShLFrm>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3239 | |
| 3240 | // VQSHRN : Vector Saturating Shift Right and Narrow |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3241 | defm VQSHRNs : N2VNSh_HSD<0, 1, 0b1001, 0, 0, 1, IIC_VSHLi4D, "vqshrn", "s", |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 3242 | NEONvqshrns>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3243 | defm VQSHRNu : N2VNSh_HSD<1, 1, 0b1001, 0, 0, 1, IIC_VSHLi4D, "vqshrn", "u", |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 3244 | NEONvqshrnu>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3245 | |
| 3246 | // VQSHRUN : Vector Saturating Shift Right and Narrow (Unsigned) |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3247 | defm VQSHRUN : N2VNSh_HSD<1, 1, 0b1000, 0, 0, 1, IIC_VSHLi4D, "vqshrun", "s", |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 3248 | NEONvqshrnsu>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3249 | |
| 3250 | // VQRSHL : Vector Saturating Rounding Shift |
| Johnny Chen | 93acfbf | 2010-03-26 23:49:07 +0000 | [diff] [blame] | 3251 | defm VQRSHLs : N3VInt_QHSD<0, 0, 0b0101, 1, N3RegVShFrm, |
| 3252 | IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, IIC_VSHLi4Q, |
| 3253 | "vqrshl", "s", int_arm_neon_vqrshifts, 0>; |
| 3254 | defm VQRSHLu : N3VInt_QHSD<1, 0, 0b0101, 1, N3RegVShFrm, |
| 3255 | IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, IIC_VSHLi4Q, |
| 3256 | "vqrshl", "u", int_arm_neon_vqrshiftu, 0>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3257 | |
| 3258 | // VQRSHRN : Vector Saturating Rounding Shift Right and Narrow |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3259 | defm VQRSHRNs : N2VNSh_HSD<0, 1, 0b1001, 0, 1, 1, IIC_VSHLi4D, "vqrshrn", "s", |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 3260 | NEONvqrshrns>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3261 | defm VQRSHRNu : N2VNSh_HSD<1, 1, 0b1001, 0, 1, 1, IIC_VSHLi4D, "vqrshrn", "u", |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 3262 | NEONvqrshrnu>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3263 | |
| 3264 | // VQRSHRUN : Vector Saturating Rounding Shift Right and Narrow (Unsigned) |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3265 | defm VQRSHRUN : N2VNSh_HSD<1, 1, 0b1000, 0, 1, 1, IIC_VSHLi4D, "vqrshrun", "s", |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 3266 | NEONvqrshrnsu>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3267 | |
| 3268 | // VSRA : Vector Shift Right and Accumulate |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3269 | defm VSRAs : N2VShAdd_QHSD<0, 1, 0b0001, 1, "vsra", "s", NEONvshrs>; |
| 3270 | defm VSRAu : N2VShAdd_QHSD<1, 1, 0b0001, 1, "vsra", "u", NEONvshru>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3271 | // VRSRA : Vector Rounding Shift Right and Accumulate |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3272 | defm VRSRAs : N2VShAdd_QHSD<0, 1, 0b0011, 1, "vrsra", "s", NEONvrshrs>; |
| 3273 | defm VRSRAu : N2VShAdd_QHSD<1, 1, 0b0011, 1, "vrsra", "u", NEONvrshru>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3274 | |
| 3275 | // VSLI : Vector Shift Left and Insert |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 3276 | defm VSLI : N2VShIns_QHSD<1, 1, 0b0101, 1, "vsli", NEONvsli, N2RegVShLFrm>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3277 | // VSRI : Vector Shift Right and Insert |
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 3278 | defm VSRI : N2VShIns_QHSD<1, 1, 0b0100, 1, "vsri", NEONvsri, N2RegVShRFrm>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3279 | |
| 3280 | // Vector Absolute and Saturating Absolute. |
| 3281 | |
| 3282 | // VABS : Vector Absolute Value |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 3283 | defm VABS : N2VInt_QHS<0b11, 0b11, 0b01, 0b00110, 0, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3284 | IIC_VUNAiD, IIC_VUNAiQ, "vabs", "s", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3285 | int_arm_neon_vabs>; |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 3286 | def VABSfd : N2VDInt<0b11, 0b11, 0b10, 0b01, 0b01110, 0, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3287 | IIC_VUNAD, "vabs", "f32", |
| Bob Wilson | 12842f9 | 2009-08-11 05:39:44 +0000 | [diff] [blame] | 3288 | v2f32, v2f32, int_arm_neon_vabs>; |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 3289 | def VABSfq : N2VQInt<0b11, 0b11, 0b10, 0b01, 0b01110, 0, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3290 | IIC_VUNAQ, "vabs", "f32", |
| Bob Wilson | 12842f9 | 2009-08-11 05:39:44 +0000 | [diff] [blame] | 3291 | v4f32, v4f32, int_arm_neon_vabs>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3292 | |
| 3293 | // VQABS : Vector Saturating Absolute Value |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 3294 | defm VQABS : N2VInt_QHS<0b11, 0b11, 0b00, 0b01110, 0, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3295 | IIC_VQUNAiD, IIC_VQUNAiQ, "vqabs", "s", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3296 | int_arm_neon_vqabs>; |
| 3297 | |
| 3298 | // Vector Negate. |
| 3299 | |
| Bob Wilson | a3f1901 | 2010-07-13 21:16:48 +0000 | [diff] [blame] | 3300 | def vnegd : PatFrag<(ops node:$in), |
| 3301 | (sub (bitconvert (v2i32 NEONimmAllZerosV)), node:$in)>; |
| 3302 | def vnegq : PatFrag<(ops node:$in), |
| 3303 | (sub (bitconvert (v4i32 NEONimmAllZerosV)), node:$in)>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3304 | |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3305 | class VNEGD<bits<2> size, string OpcodeStr, string Dt, ValueType Ty> |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3306 | : N2V<0b11, 0b11, size, 0b01, 0b00111, 0, 0, (outs DPR:$dst), (ins DPR:$src), |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3307 | IIC_VSHLiD, OpcodeStr, Dt, "$dst, $src", "", |
| Bob Wilson | a3f1901 | 2010-07-13 21:16:48 +0000 | [diff] [blame] | 3308 | [(set DPR:$dst, (Ty (vnegd DPR:$src)))]>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3309 | class VNEGQ<bits<2> size, string OpcodeStr, string Dt, ValueType Ty> |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3310 | : N2V<0b11, 0b11, size, 0b01, 0b00111, 1, 0, (outs QPR:$dst), (ins QPR:$src), |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3311 | IIC_VSHLiD, OpcodeStr, Dt, "$dst, $src", "", |
| Bob Wilson | a3f1901 | 2010-07-13 21:16:48 +0000 | [diff] [blame] | 3312 | [(set QPR:$dst, (Ty (vnegq QPR:$src)))]>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3313 | |
| Chris Lattner | 3dad5fb | 2010-03-28 08:39:10 +0000 | [diff] [blame] | 3314 | // VNEG : Vector Negate (integer) |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3315 | def VNEGs8d : VNEGD<0b00, "vneg", "s8", v8i8>; |
| 3316 | def VNEGs16d : VNEGD<0b01, "vneg", "s16", v4i16>; |
| 3317 | def VNEGs32d : VNEGD<0b10, "vneg", "s32", v2i32>; |
| 3318 | def VNEGs8q : VNEGQ<0b00, "vneg", "s8", v16i8>; |
| 3319 | def VNEGs16q : VNEGQ<0b01, "vneg", "s16", v8i16>; |
| 3320 | def VNEGs32q : VNEGQ<0b10, "vneg", "s32", v4i32>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3321 | |
| 3322 | // VNEG : Vector Negate (floating-point) |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3323 | def VNEGfd : N2V<0b11, 0b11, 0b10, 0b01, 0b01111, 0, 0, |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3324 | (outs DPR:$dst), (ins DPR:$src), IIC_VUNAD, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3325 | "vneg", "f32", "$dst, $src", "", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3326 | [(set DPR:$dst, (v2f32 (fneg DPR:$src)))]>; |
| 3327 | def VNEGf32q : N2V<0b11, 0b11, 0b10, 0b01, 0b01111, 1, 0, |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3328 | (outs QPR:$dst), (ins QPR:$src), IIC_VUNAQ, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3329 | "vneg", "f32", "$dst, $src", "", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3330 | [(set QPR:$dst, (v4f32 (fneg QPR:$src)))]>; |
| 3331 | |
| Bob Wilson | a3f1901 | 2010-07-13 21:16:48 +0000 | [diff] [blame] | 3332 | def : Pat<(v8i8 (vnegd DPR:$src)), (VNEGs8d DPR:$src)>; |
| 3333 | def : Pat<(v4i16 (vnegd DPR:$src)), (VNEGs16d DPR:$src)>; |
| 3334 | def : Pat<(v2i32 (vnegd DPR:$src)), (VNEGs32d DPR:$src)>; |
| 3335 | def : Pat<(v16i8 (vnegq QPR:$src)), (VNEGs8q QPR:$src)>; |
| 3336 | def : Pat<(v8i16 (vnegq QPR:$src)), (VNEGs16q QPR:$src)>; |
| 3337 | def : Pat<(v4i32 (vnegq QPR:$src)), (VNEGs32q QPR:$src)>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3338 | |
| 3339 | // VQNEG : Vector Saturating Negate |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 3340 | defm VQNEG : N2VInt_QHS<0b11, 0b11, 0b00, 0b01111, 0, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3341 | IIC_VQUNAiD, IIC_VQUNAiQ, "vqneg", "s", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3342 | int_arm_neon_vqneg>; |
| 3343 | |
| 3344 | // Vector Bit Counting Operations. |
| 3345 | |
| 3346 | // VCLS : Vector Count Leading Sign Bits |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 3347 | defm VCLS : N2VInt_QHS<0b11, 0b11, 0b00, 0b01000, 0, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3348 | IIC_VCNTiD, IIC_VCNTiQ, "vcls", "s", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3349 | int_arm_neon_vcls>; |
| 3350 | // VCLZ : Vector Count Leading Zeros |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 3351 | defm VCLZ : N2VInt_QHS<0b11, 0b11, 0b00, 0b01001, 0, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3352 | IIC_VCNTiD, IIC_VCNTiQ, "vclz", "i", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3353 | int_arm_neon_vclz>; |
| 3354 | // VCNT : Vector Count One Bits |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 3355 | def VCNTd : N2VDInt<0b11, 0b11, 0b00, 0b00, 0b01010, 0, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3356 | IIC_VCNTiD, "vcnt", "8", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3357 | v8i8, v8i8, int_arm_neon_vcnt>; |
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 3358 | def VCNTq : N2VQInt<0b11, 0b11, 0b00, 0b00, 0b01010, 0, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3359 | IIC_VCNTiQ, "vcnt", "8", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3360 | v16i8, v16i8, int_arm_neon_vcnt>; |
| 3361 | |
| Johnny Chen | 86ba44a | 2010-02-24 20:06:07 +0000 | [diff] [blame] | 3362 | // Vector Swap -- for disassembly only. |
| 3363 | def VSWPd : N2VX<0b11, 0b11, 0b00, 0b10, 0b00000, 0, 0, |
| 3364 | (outs DPR:$dst), (ins DPR:$src), NoItinerary, |
| 3365 | "vswp", "$dst, $src", "", []>; |
| 3366 | def VSWPq : N2VX<0b11, 0b11, 0b00, 0b10, 0b00000, 1, 0, |
| 3367 | (outs QPR:$dst), (ins QPR:$src), NoItinerary, |
| 3368 | "vswp", "$dst, $src", "", []>; |
| 3369 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3370 | // Vector Move Operations. |
| 3371 | |
| 3372 | // VMOV : Vector Move (Register) |
| 3373 | |
| Evan Cheng | 79efd71 | 2010-05-13 00:16:46 +0000 | [diff] [blame] | 3374 | let neverHasSideEffects = 1 in { |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3375 | def VMOVDneon: N3VX<0, 0, 0b10, 0b0001, 0, 1, (outs DPR:$dst), (ins DPR:$src), |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 3376 | N3RegFrm, IIC_VMOVD, "vmov", "$dst, $src", "", []>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3377 | def VMOVQ : N3VX<0, 0, 0b10, 0b0001, 1, 1, (outs QPR:$dst), (ins QPR:$src), |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 3378 | N3RegFrm, IIC_VMOVD, "vmov", "$dst, $src", "", []>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3379 | |
| Evan Cheng | cd67c21 | 2010-05-14 02:13:41 +0000 | [diff] [blame] | 3380 | // Pseudo vector move instructions for QQ and QQQQ registers. This should |
| Evan Cheng | 31cdcd4 | 2010-05-06 06:36:08 +0000 | [diff] [blame] | 3381 | // be expanded after register allocation is completed. |
| 3382 | def VMOVQQ : PseudoInst<(outs QQPR:$dst), (ins QQPR:$src), |
| Anton Korobeynikov | 497d831 | 2010-05-16 09:15:36 +0000 | [diff] [blame] | 3383 | NoItinerary, "${:comment} vmov\t$dst, $src", []>; |
| Evan Cheng | cd67c21 | 2010-05-14 02:13:41 +0000 | [diff] [blame] | 3384 | |
| 3385 | def VMOVQQQQ : PseudoInst<(outs QQQQPR:$dst), (ins QQQQPR:$src), |
| Anton Korobeynikov | 497d831 | 2010-05-16 09:15:36 +0000 | [diff] [blame] | 3386 | NoItinerary, "${:comment} vmov\t$dst, $src", []>; |
| Evan Cheng | 79efd71 | 2010-05-13 00:16:46 +0000 | [diff] [blame] | 3387 | } // neverHasSideEffects |
| Evan Cheng | 31cdcd4 | 2010-05-06 06:36:08 +0000 | [diff] [blame] | 3388 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3389 | // VMOV : Vector Move (Immediate) |
| 3390 | |
| Evan Cheng | cd04ed3 | 2010-05-17 21:54:50 +0000 | [diff] [blame] | 3391 | let isReMaterializable = 1 in { |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3392 | def VMOVv8i8 : N1ModImm<1, 0b000, 0b1110, 0, 0, 0, 1, (outs DPR:$dst), |
| Bob Wilson | 6eae520 | 2010-06-11 21:34:50 +0000 | [diff] [blame] | 3393 | (ins nModImm:$SIMM), IIC_VMOVImm, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3394 | "vmov", "i8", "$dst, $SIMM", "", |
| Bob Wilson | a3f1901 | 2010-07-13 21:16:48 +0000 | [diff] [blame] | 3395 | [(set DPR:$dst, (v8i8 (NEONvmovImm timm:$SIMM)))]>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3396 | def VMOVv16i8 : N1ModImm<1, 0b000, 0b1110, 0, 1, 0, 1, (outs QPR:$dst), |
| Bob Wilson | 6eae520 | 2010-06-11 21:34:50 +0000 | [diff] [blame] | 3397 | (ins nModImm:$SIMM), IIC_VMOVImm, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3398 | "vmov", "i8", "$dst, $SIMM", "", |
| Bob Wilson | a3f1901 | 2010-07-13 21:16:48 +0000 | [diff] [blame] | 3399 | [(set QPR:$dst, (v16i8 (NEONvmovImm timm:$SIMM)))]>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3400 | |
| Bob Wilson | 6eae520 | 2010-06-11 21:34:50 +0000 | [diff] [blame] | 3401 | def VMOVv4i16 : N1ModImm<1, 0b000, {1,0,?,0}, 0, 0, 0, 1, (outs DPR:$dst), |
| 3402 | (ins nModImm:$SIMM), IIC_VMOVImm, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3403 | "vmov", "i16", "$dst, $SIMM", "", |
| Bob Wilson | a3f1901 | 2010-07-13 21:16:48 +0000 | [diff] [blame] | 3404 | [(set DPR:$dst, (v4i16 (NEONvmovImm timm:$SIMM)))]>; |
| Bob Wilson | 6eae520 | 2010-06-11 21:34:50 +0000 | [diff] [blame] | 3405 | def VMOVv8i16 : N1ModImm<1, 0b000, {1,0,?,0}, 0, 1, 0, 1, (outs QPR:$dst), |
| 3406 | (ins nModImm:$SIMM), IIC_VMOVImm, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3407 | "vmov", "i16", "$dst, $SIMM", "", |
| Bob Wilson | a3f1901 | 2010-07-13 21:16:48 +0000 | [diff] [blame] | 3408 | [(set QPR:$dst, (v8i16 (NEONvmovImm timm:$SIMM)))]>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3409 | |
| Bob Wilson | bd54a53 | 2010-07-14 06:30:44 +0000 | [diff] [blame] | 3410 | def VMOVv2i32 : N1ModImm<1, 0b000, {?,?,?,?}, 0, 0, 0, 1, (outs DPR:$dst), |
| Bob Wilson | 6eae520 | 2010-06-11 21:34:50 +0000 | [diff] [blame] | 3411 | (ins nModImm:$SIMM), IIC_VMOVImm, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3412 | "vmov", "i32", "$dst, $SIMM", "", |
| Bob Wilson | a3f1901 | 2010-07-13 21:16:48 +0000 | [diff] [blame] | 3413 | [(set DPR:$dst, (v2i32 (NEONvmovImm timm:$SIMM)))]>; |
| Bob Wilson | bd54a53 | 2010-07-14 06:30:44 +0000 | [diff] [blame] | 3414 | def VMOVv4i32 : N1ModImm<1, 0b000, {?,?,?,?}, 0, 1, 0, 1, (outs QPR:$dst), |
| Bob Wilson | 6eae520 | 2010-06-11 21:34:50 +0000 | [diff] [blame] | 3415 | (ins nModImm:$SIMM), IIC_VMOVImm, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3416 | "vmov", "i32", "$dst, $SIMM", "", |
| Bob Wilson | a3f1901 | 2010-07-13 21:16:48 +0000 | [diff] [blame] | 3417 | [(set QPR:$dst, (v4i32 (NEONvmovImm timm:$SIMM)))]>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3418 | |
| 3419 | def VMOVv1i64 : N1ModImm<1, 0b000, 0b1110, 0, 0, 1, 1, (outs DPR:$dst), |
| Bob Wilson | 6eae520 | 2010-06-11 21:34:50 +0000 | [diff] [blame] | 3420 | (ins nModImm:$SIMM), IIC_VMOVImm, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3421 | "vmov", "i64", "$dst, $SIMM", "", |
| Bob Wilson | a3f1901 | 2010-07-13 21:16:48 +0000 | [diff] [blame] | 3422 | [(set DPR:$dst, (v1i64 (NEONvmovImm timm:$SIMM)))]>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3423 | def VMOVv2i64 : N1ModImm<1, 0b000, 0b1110, 0, 1, 1, 1, (outs QPR:$dst), |
| Bob Wilson | 6eae520 | 2010-06-11 21:34:50 +0000 | [diff] [blame] | 3424 | (ins nModImm:$SIMM), IIC_VMOVImm, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3425 | "vmov", "i64", "$dst, $SIMM", "", |
| Bob Wilson | a3f1901 | 2010-07-13 21:16:48 +0000 | [diff] [blame] | 3426 | [(set QPR:$dst, (v2i64 (NEONvmovImm timm:$SIMM)))]>; |
| Evan Cheng | cd04ed3 | 2010-05-17 21:54:50 +0000 | [diff] [blame] | 3427 | } // isReMaterializable |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3428 | |
| 3429 | // VMOV : Vector Get Lane (move scalar to ARM core register) |
| 3430 | |
| Johnny Chen | ebc60ef | 2009-11-23 17:48:17 +0000 | [diff] [blame] | 3431 | def VGETLNs8 : NVGetLane<{1,1,1,0,0,1,?,1}, 0b1011, {?,?}, |
| Bob Wilson | ceffeb6 | 2009-08-21 21:58:55 +0000 | [diff] [blame] | 3432 | (outs GPR:$dst), (ins DPR:$src, nohash_imm:$lane), |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3433 | IIC_VMOVSI, "vmov", "s8", "$dst, $src[$lane]", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3434 | [(set GPR:$dst, (NEONvgetlanes (v8i8 DPR:$src), |
| 3435 | imm:$lane))]>; |
| Johnny Chen | ebc60ef | 2009-11-23 17:48:17 +0000 | [diff] [blame] | 3436 | def VGETLNs16 : NVGetLane<{1,1,1,0,0,0,?,1}, 0b1011, {?,1}, |
| Bob Wilson | ceffeb6 | 2009-08-21 21:58:55 +0000 | [diff] [blame] | 3437 | (outs GPR:$dst), (ins DPR:$src, nohash_imm:$lane), |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3438 | IIC_VMOVSI, "vmov", "s16", "$dst, $src[$lane]", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3439 | [(set GPR:$dst, (NEONvgetlanes (v4i16 DPR:$src), |
| 3440 | imm:$lane))]>; |
| Johnny Chen | ebc60ef | 2009-11-23 17:48:17 +0000 | [diff] [blame] | 3441 | def VGETLNu8 : NVGetLane<{1,1,1,0,1,1,?,1}, 0b1011, {?,?}, |
| Bob Wilson | ceffeb6 | 2009-08-21 21:58:55 +0000 | [diff] [blame] | 3442 | (outs GPR:$dst), (ins DPR:$src, nohash_imm:$lane), |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3443 | IIC_VMOVSI, "vmov", "u8", "$dst, $src[$lane]", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3444 | [(set GPR:$dst, (NEONvgetlaneu (v8i8 DPR:$src), |
| 3445 | imm:$lane))]>; |
| Johnny Chen | ebc60ef | 2009-11-23 17:48:17 +0000 | [diff] [blame] | 3446 | def VGETLNu16 : NVGetLane<{1,1,1,0,1,0,?,1}, 0b1011, {?,1}, |
| Bob Wilson | ceffeb6 | 2009-08-21 21:58:55 +0000 | [diff] [blame] | 3447 | (outs GPR:$dst), (ins DPR:$src, nohash_imm:$lane), |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3448 | IIC_VMOVSI, "vmov", "u16", "$dst, $src[$lane]", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3449 | [(set GPR:$dst, (NEONvgetlaneu (v4i16 DPR:$src), |
| 3450 | imm:$lane))]>; |
| Johnny Chen | ebc60ef | 2009-11-23 17:48:17 +0000 | [diff] [blame] | 3451 | def VGETLNi32 : NVGetLane<{1,1,1,0,0,0,?,1}, 0b1011, 0b00, |
| Bob Wilson | ceffeb6 | 2009-08-21 21:58:55 +0000 | [diff] [blame] | 3452 | (outs GPR:$dst), (ins DPR:$src, nohash_imm:$lane), |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3453 | IIC_VMOVSI, "vmov", "32", "$dst, $src[$lane]", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3454 | [(set GPR:$dst, (extractelt (v2i32 DPR:$src), |
| 3455 | imm:$lane))]>; |
| 3456 | // def VGETLNf32: see FMRDH and FMRDL in ARMInstrVFP.td |
| 3457 | def : Pat<(NEONvgetlanes (v16i8 QPR:$src), imm:$lane), |
| 3458 | (VGETLNs8 (v8i8 (EXTRACT_SUBREG QPR:$src, |
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 3459 | (DSubReg_i8_reg imm:$lane))), |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3460 | (SubReg_i8_lane imm:$lane))>; |
| 3461 | def : Pat<(NEONvgetlanes (v8i16 QPR:$src), imm:$lane), |
| 3462 | (VGETLNs16 (v4i16 (EXTRACT_SUBREG QPR:$src, |
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 3463 | (DSubReg_i16_reg imm:$lane))), |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3464 | (SubReg_i16_lane imm:$lane))>; |
| 3465 | def : Pat<(NEONvgetlaneu (v16i8 QPR:$src), imm:$lane), |
| 3466 | (VGETLNu8 (v8i8 (EXTRACT_SUBREG QPR:$src, |
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 3467 | (DSubReg_i8_reg imm:$lane))), |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3468 | (SubReg_i8_lane imm:$lane))>; |
| 3469 | def : Pat<(NEONvgetlaneu (v8i16 QPR:$src), imm:$lane), |
| 3470 | (VGETLNu16 (v4i16 (EXTRACT_SUBREG QPR:$src, |
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 3471 | (DSubReg_i16_reg imm:$lane))), |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3472 | (SubReg_i16_lane imm:$lane))>; |
| 3473 | def : Pat<(extractelt (v4i32 QPR:$src), imm:$lane), |
| 3474 | (VGETLNi32 (v2i32 (EXTRACT_SUBREG QPR:$src, |
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 3475 | (DSubReg_i32_reg imm:$lane))), |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3476 | (SubReg_i32_lane imm:$lane))>; |
| Anton Korobeynikov | cd41d07 | 2009-08-28 23:41:26 +0000 | [diff] [blame] | 3477 | def : Pat<(extractelt (v2f32 DPR:$src1), imm:$src2), |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 3478 | (EXTRACT_SUBREG (v2f32 (COPY_TO_REGCLASS (v2f32 DPR:$src1),DPR_VFP2)), |
| Anton Korobeynikov | 8d0fbeb | 2009-09-12 22:21:08 +0000 | [diff] [blame] | 3479 | (SSubReg_f32_reg imm:$src2))>; |
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 3480 | def : Pat<(extractelt (v4f32 QPR:$src1), imm:$src2), |
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 3481 | (EXTRACT_SUBREG (v4f32 (COPY_TO_REGCLASS (v4f32 QPR:$src1),QPR_VFP2)), |
| Anton Korobeynikov | 8d0fbeb | 2009-09-12 22:21:08 +0000 | [diff] [blame] | 3482 | (SSubReg_f32_reg imm:$src2))>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3483 | //def : Pat<(extractelt (v2i64 QPR:$src1), imm:$src2), |
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 3484 | // (EXTRACT_SUBREG QPR:$src1, (DSubReg_f64_reg imm:$src2))>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3485 | def : Pat<(extractelt (v2f64 QPR:$src1), imm:$src2), |
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 3486 | (EXTRACT_SUBREG QPR:$src1, (DSubReg_f64_reg imm:$src2))>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3487 | |
| 3488 | |
| 3489 | // VMOV : Vector Set Lane (move ARM core register to scalar) |
| 3490 | |
| 3491 | let Constraints = "$src1 = $dst" in { |
| Johnny Chen | ebc60ef | 2009-11-23 17:48:17 +0000 | [diff] [blame] | 3492 | def VSETLNi8 : NVSetLane<{1,1,1,0,0,1,?,0}, 0b1011, {?,?}, (outs DPR:$dst), |
| Bob Wilson | ceffeb6 | 2009-08-21 21:58:55 +0000 | [diff] [blame] | 3493 | (ins DPR:$src1, GPR:$src2, nohash_imm:$lane), |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3494 | IIC_VMOVISL, "vmov", "8", "$dst[$lane], $src2", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3495 | [(set DPR:$dst, (vector_insert (v8i8 DPR:$src1), |
| 3496 | GPR:$src2, imm:$lane))]>; |
| Johnny Chen | ebc60ef | 2009-11-23 17:48:17 +0000 | [diff] [blame] | 3497 | def VSETLNi16 : NVSetLane<{1,1,1,0,0,0,?,0}, 0b1011, {?,1}, (outs DPR:$dst), |
| Bob Wilson | ceffeb6 | 2009-08-21 21:58:55 +0000 | [diff] [blame] | 3498 | (ins DPR:$src1, GPR:$src2, nohash_imm:$lane), |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3499 | IIC_VMOVISL, "vmov", "16", "$dst[$lane], $src2", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3500 | [(set DPR:$dst, (vector_insert (v4i16 DPR:$src1), |
| 3501 | GPR:$src2, imm:$lane))]>; |
| Johnny Chen | ebc60ef | 2009-11-23 17:48:17 +0000 | [diff] [blame] | 3502 | def VSETLNi32 : NVSetLane<{1,1,1,0,0,0,?,0}, 0b1011, 0b00, (outs DPR:$dst), |
| Bob Wilson | ceffeb6 | 2009-08-21 21:58:55 +0000 | [diff] [blame] | 3503 | (ins DPR:$src1, GPR:$src2, nohash_imm:$lane), |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3504 | IIC_VMOVISL, "vmov", "32", "$dst[$lane], $src2", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3505 | [(set DPR:$dst, (insertelt (v2i32 DPR:$src1), |
| 3506 | GPR:$src2, imm:$lane))]>; |
| 3507 | } |
| 3508 | def : Pat<(vector_insert (v16i8 QPR:$src1), GPR:$src2, imm:$lane), |
| 3509 | (v16i8 (INSERT_SUBREG QPR:$src1, |
| Chris Lattner | b8a7427 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 3510 | (v8i8 (VSETLNi8 (v8i8 (EXTRACT_SUBREG QPR:$src1, |
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 3511 | (DSubReg_i8_reg imm:$lane))), |
| Chris Lattner | b8a7427 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 3512 | GPR:$src2, (SubReg_i8_lane imm:$lane))), |
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 3513 | (DSubReg_i8_reg imm:$lane)))>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3514 | def : Pat<(vector_insert (v8i16 QPR:$src1), GPR:$src2, imm:$lane), |
| 3515 | (v8i16 (INSERT_SUBREG QPR:$src1, |
| Chris Lattner | b8a7427 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 3516 | (v4i16 (VSETLNi16 (v4i16 (EXTRACT_SUBREG QPR:$src1, |
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 3517 | (DSubReg_i16_reg imm:$lane))), |
| Chris Lattner | b8a7427 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 3518 | GPR:$src2, (SubReg_i16_lane imm:$lane))), |
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 3519 | (DSubReg_i16_reg imm:$lane)))>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3520 | def : Pat<(insertelt (v4i32 QPR:$src1), GPR:$src2, imm:$lane), |
| 3521 | (v4i32 (INSERT_SUBREG QPR:$src1, |
| Chris Lattner | b8a7427 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 3522 | (v2i32 (VSETLNi32 (v2i32 (EXTRACT_SUBREG QPR:$src1, |
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 3523 | (DSubReg_i32_reg imm:$lane))), |
| Chris Lattner | b8a7427 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 3524 | GPR:$src2, (SubReg_i32_lane imm:$lane))), |
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 3525 | (DSubReg_i32_reg imm:$lane)))>; |
| 3526 | |
| Anton Korobeynikov | 3681144 | 2009-08-30 19:06:39 +0000 | [diff] [blame] | 3527 | def : Pat<(v2f32 (insertelt DPR:$src1, SPR:$src2, imm:$src3)), |
| Anton Korobeynikov | 0f38d98 | 2009-11-02 00:11:39 +0000 | [diff] [blame] | 3528 | (INSERT_SUBREG (v2f32 (COPY_TO_REGCLASS DPR:$src1, DPR_VFP2)), |
| 3529 | SPR:$src2, (SSubReg_f32_reg imm:$src3))>; |
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 3530 | def : Pat<(v4f32 (insertelt QPR:$src1, SPR:$src2, imm:$src3)), |
| Anton Korobeynikov | 0f38d98 | 2009-11-02 00:11:39 +0000 | [diff] [blame] | 3531 | (INSERT_SUBREG (v4f32 (COPY_TO_REGCLASS QPR:$src1, QPR_VFP2)), |
| 3532 | SPR:$src2, (SSubReg_f32_reg imm:$src3))>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3533 | |
| 3534 | //def : Pat<(v2i64 (insertelt QPR:$src1, DPR:$src2, imm:$src3)), |
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 3535 | // (INSERT_SUBREG QPR:$src1, DPR:$src2, (DSubReg_f64_reg imm:$src3))>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3536 | def : Pat<(v2f64 (insertelt QPR:$src1, DPR:$src2, imm:$src3)), |
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 3537 | (INSERT_SUBREG QPR:$src1, DPR:$src2, (DSubReg_f64_reg imm:$src3))>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3538 | |
| Anton Korobeynikov | 58ebae4 | 2009-08-27 14:38:44 +0000 | [diff] [blame] | 3539 | def : Pat<(v2f32 (scalar_to_vector SPR:$src)), |
| Jakob Stoklund Olesen | 6c47d64 | 2010-05-24 16:54:32 +0000 | [diff] [blame] | 3540 | (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), SPR:$src, ssub_0)>; |
| Chris Lattner | ce81b3c | 2010-03-15 00:52:43 +0000 | [diff] [blame] | 3541 | def : Pat<(v2f64 (scalar_to_vector (f64 DPR:$src))), |
| Jakob Stoklund Olesen | 6c47d64 | 2010-05-24 16:54:32 +0000 | [diff] [blame] | 3542 | (INSERT_SUBREG (v2f64 (IMPLICIT_DEF)), DPR:$src, dsub_0)>; |
| Anton Korobeynikov | 58ebae4 | 2009-08-27 14:38:44 +0000 | [diff] [blame] | 3543 | def : Pat<(v4f32 (scalar_to_vector SPR:$src)), |
| Jakob Stoklund Olesen | 6c47d64 | 2010-05-24 16:54:32 +0000 | [diff] [blame] | 3544 | (INSERT_SUBREG (v4f32 (IMPLICIT_DEF)), SPR:$src, ssub_0)>; |
| Anton Korobeynikov | 58ebae4 | 2009-08-27 14:38:44 +0000 | [diff] [blame] | 3545 | |
| Anton Korobeynikov | 076f105 | 2009-08-27 16:10:17 +0000 | [diff] [blame] | 3546 | def : Pat<(v8i8 (scalar_to_vector GPR:$src)), |
| 3547 | (VSETLNi8 (v8i8 (IMPLICIT_DEF)), GPR:$src, (i32 0))>; |
| 3548 | def : Pat<(v4i16 (scalar_to_vector GPR:$src)), |
| 3549 | (VSETLNi16 (v4i16 (IMPLICIT_DEF)), GPR:$src, (i32 0))>; |
| 3550 | def : Pat<(v2i32 (scalar_to_vector GPR:$src)), |
| 3551 | (VSETLNi32 (v2i32 (IMPLICIT_DEF)), GPR:$src, (i32 0))>; |
| 3552 | |
| 3553 | def : Pat<(v16i8 (scalar_to_vector GPR:$src)), |
| 3554 | (INSERT_SUBREG (v16i8 (IMPLICIT_DEF)), |
| 3555 | (VSETLNi8 (v8i8 (IMPLICIT_DEF)), GPR:$src, (i32 0)), |
| Jakob Stoklund Olesen | 6c47d64 | 2010-05-24 16:54:32 +0000 | [diff] [blame] | 3556 | dsub_0)>; |
| Anton Korobeynikov | 076f105 | 2009-08-27 16:10:17 +0000 | [diff] [blame] | 3557 | def : Pat<(v8i16 (scalar_to_vector GPR:$src)), |
| 3558 | (INSERT_SUBREG (v8i16 (IMPLICIT_DEF)), |
| 3559 | (VSETLNi16 (v4i16 (IMPLICIT_DEF)), GPR:$src, (i32 0)), |
| Jakob Stoklund Olesen | 6c47d64 | 2010-05-24 16:54:32 +0000 | [diff] [blame] | 3560 | dsub_0)>; |
| Anton Korobeynikov | 076f105 | 2009-08-27 16:10:17 +0000 | [diff] [blame] | 3561 | def : Pat<(v4i32 (scalar_to_vector GPR:$src)), |
| 3562 | (INSERT_SUBREG (v4i32 (IMPLICIT_DEF)), |
| 3563 | (VSETLNi32 (v2i32 (IMPLICIT_DEF)), GPR:$src, (i32 0)), |
| Jakob Stoklund Olesen | 6c47d64 | 2010-05-24 16:54:32 +0000 | [diff] [blame] | 3564 | dsub_0)>; |
| Anton Korobeynikov | 076f105 | 2009-08-27 16:10:17 +0000 | [diff] [blame] | 3565 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3566 | // VDUP : Vector Duplicate (from ARM core register to all elements) |
| 3567 | |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3568 | class VDUPD<bits<8> opcod1, bits<2> opcod3, string Dt, ValueType Ty> |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3569 | : NVDup<opcod1, 0b1011, opcod3, (outs DPR:$dst), (ins GPR:$src), |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3570 | IIC_VMOVIS, "vdup", Dt, "$dst, $src", |
| Bob Wilson | eb54d51 | 2009-08-14 05:13:08 +0000 | [diff] [blame] | 3571 | [(set DPR:$dst, (Ty (NEONvdup (i32 GPR:$src))))]>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3572 | class VDUPQ<bits<8> opcod1, bits<2> opcod3, string Dt, ValueType Ty> |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3573 | : NVDup<opcod1, 0b1011, opcod3, (outs QPR:$dst), (ins GPR:$src), |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3574 | IIC_VMOVIS, "vdup", Dt, "$dst, $src", |
| Bob Wilson | eb54d51 | 2009-08-14 05:13:08 +0000 | [diff] [blame] | 3575 | [(set QPR:$dst, (Ty (NEONvdup (i32 GPR:$src))))]>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3576 | |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3577 | def VDUP8d : VDUPD<0b11101100, 0b00, "8", v8i8>; |
| 3578 | def VDUP16d : VDUPD<0b11101000, 0b01, "16", v4i16>; |
| 3579 | def VDUP32d : VDUPD<0b11101000, 0b00, "32", v2i32>; |
| 3580 | def VDUP8q : VDUPQ<0b11101110, 0b00, "8", v16i8>; |
| 3581 | def VDUP16q : VDUPQ<0b11101010, 0b01, "16", v8i16>; |
| 3582 | def VDUP32q : VDUPQ<0b11101010, 0b00, "32", v4i32>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3583 | |
| 3584 | def VDUPfd : NVDup<0b11101000, 0b1011, 0b00, (outs DPR:$dst), (ins GPR:$src), |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3585 | IIC_VMOVIS, "vdup", "32", "$dst, $src", |
| Bob Wilson | eb54d51 | 2009-08-14 05:13:08 +0000 | [diff] [blame] | 3586 | [(set DPR:$dst, (v2f32 (NEONvdup |
| 3587 | (f32 (bitconvert GPR:$src)))))]>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3588 | def VDUPfq : NVDup<0b11101010, 0b1011, 0b00, (outs QPR:$dst), (ins GPR:$src), |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3589 | IIC_VMOVIS, "vdup", "32", "$dst, $src", |
| Bob Wilson | eb54d51 | 2009-08-14 05:13:08 +0000 | [diff] [blame] | 3590 | [(set QPR:$dst, (v4f32 (NEONvdup |
| 3591 | (f32 (bitconvert GPR:$src)))))]>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3592 | |
| 3593 | // VDUP : Vector Duplicate Lane (from scalar to all elements) |
| 3594 | |
| Johnny Chen | 45ab3f3 | 2010-03-25 17:01:27 +0000 | [diff] [blame] | 3595 | class VDUPLND<bits<4> op19_16, string OpcodeStr, string Dt, |
| 3596 | ValueType Ty> |
| 3597 | : NVDupLane<op19_16, 0, (outs DPR:$dst), (ins DPR:$src, nohash_imm:$lane), |
| 3598 | IIC_VMOVD, OpcodeStr, Dt, "$dst, $src[$lane]", |
| 3599 | [(set DPR:$dst, (Ty (NEONvduplane (Ty DPR:$src), imm:$lane)))]>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3600 | |
| Johnny Chen | 45ab3f3 | 2010-03-25 17:01:27 +0000 | [diff] [blame] | 3601 | class VDUPLNQ<bits<4> op19_16, string OpcodeStr, string Dt, |
| Johnny Chen | b6528d3 | 2009-11-23 21:00:43 +0000 | [diff] [blame] | 3602 | ValueType ResTy, ValueType OpTy> |
| Johnny Chen | 45ab3f3 | 2010-03-25 17:01:27 +0000 | [diff] [blame] | 3603 | : NVDupLane<op19_16, 1, (outs QPR:$dst), (ins DPR:$src, nohash_imm:$lane), |
| 3604 | IIC_VMOVD, OpcodeStr, Dt, "$dst, $src[$lane]", |
| 3605 | [(set QPR:$dst, (ResTy (NEONvduplane (OpTy DPR:$src), |
| 3606 | imm:$lane)))]>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3607 | |
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 3608 | // Inst{19-16} is partially specified depending on the element size. |
| 3609 | |
| Johnny Chen | 45ab3f3 | 2010-03-25 17:01:27 +0000 | [diff] [blame] | 3610 | def VDUPLN8d : VDUPLND<{?,?,?,1}, "vdup", "8", v8i8>; |
| 3611 | def VDUPLN16d : VDUPLND<{?,?,1,0}, "vdup", "16", v4i16>; |
| 3612 | def VDUPLN32d : VDUPLND<{?,1,0,0}, "vdup", "32", v2i32>; |
| 3613 | def VDUPLNfd : VDUPLND<{?,1,0,0}, "vdup", "32", v2f32>; |
| 3614 | def VDUPLN8q : VDUPLNQ<{?,?,?,1}, "vdup", "8", v16i8, v8i8>; |
| 3615 | def VDUPLN16q : VDUPLNQ<{?,?,1,0}, "vdup", "16", v8i16, v4i16>; |
| 3616 | def VDUPLN32q : VDUPLNQ<{?,1,0,0}, "vdup", "32", v4i32, v2i32>; |
| 3617 | def VDUPLNfq : VDUPLNQ<{?,1,0,0}, "vdup", "32", v4f32, v2f32>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3618 | |
| Bob Wilson | cce31f6 | 2009-08-14 05:08:32 +0000 | [diff] [blame] | 3619 | def : Pat<(v16i8 (NEONvduplane (v16i8 QPR:$src), imm:$lane)), |
| 3620 | (v16i8 (VDUPLN8q (v8i8 (EXTRACT_SUBREG QPR:$src, |
| 3621 | (DSubReg_i8_reg imm:$lane))), |
| 3622 | (SubReg_i8_lane imm:$lane)))>; |
| 3623 | def : Pat<(v8i16 (NEONvduplane (v8i16 QPR:$src), imm:$lane)), |
| 3624 | (v8i16 (VDUPLN16q (v4i16 (EXTRACT_SUBREG QPR:$src, |
| 3625 | (DSubReg_i16_reg imm:$lane))), |
| 3626 | (SubReg_i16_lane imm:$lane)))>; |
| 3627 | def : Pat<(v4i32 (NEONvduplane (v4i32 QPR:$src), imm:$lane)), |
| 3628 | (v4i32 (VDUPLN32q (v2i32 (EXTRACT_SUBREG QPR:$src, |
| 3629 | (DSubReg_i32_reg imm:$lane))), |
| 3630 | (SubReg_i32_lane imm:$lane)))>; |
| 3631 | def : Pat<(v4f32 (NEONvduplane (v4f32 QPR:$src), imm:$lane)), |
| 3632 | (v4f32 (VDUPLNfq (v2f32 (EXTRACT_SUBREG QPR:$src, |
| 3633 | (DSubReg_i32_reg imm:$lane))), |
| 3634 | (SubReg_i32_lane imm:$lane)))>; |
| 3635 | |
| Johnny Chen | b6528d3 | 2009-11-23 21:00:43 +0000 | [diff] [blame] | 3636 | def VDUPfdf : N2V<0b11, 0b11, {?,1}, {0,0}, 0b11000, 0, 0, |
| 3637 | (outs DPR:$dst), (ins SPR:$src), |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3638 | IIC_VMOVD, "vdup", "32", "$dst, ${src:lane}", "", |
| Johnny Chen | b6528d3 | 2009-11-23 21:00:43 +0000 | [diff] [blame] | 3639 | [(set DPR:$dst, (v2f32 (NEONvdup (f32 SPR:$src))))]>; |
| Anton Korobeynikov | 23b28cb | 2009-08-07 22:36:50 +0000 | [diff] [blame] | 3640 | |
| Johnny Chen | b6528d3 | 2009-11-23 21:00:43 +0000 | [diff] [blame] | 3641 | def VDUPfqf : N2V<0b11, 0b11, {?,1}, {0,0}, 0b11000, 1, 0, |
| 3642 | (outs QPR:$dst), (ins SPR:$src), |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3643 | IIC_VMOVD, "vdup", "32", "$dst, ${src:lane}", "", |
| Johnny Chen | b6528d3 | 2009-11-23 21:00:43 +0000 | [diff] [blame] | 3644 | [(set QPR:$dst, (v4f32 (NEONvdup (f32 SPR:$src))))]>; |
| Anton Korobeynikov | 23b28cb | 2009-08-07 22:36:50 +0000 | [diff] [blame] | 3645 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3646 | // VMOVN : Vector Narrowing Move |
| Bob Wilson | 4cd8a12 | 2010-08-30 20:02:30 +0000 | [diff] [blame] | 3647 | defm VMOVN : N2VN_HSD<0b11,0b11,0b10,0b00100,0,0, IIC_VMOVD, |
| 3648 | "vmovn", "i", trunc>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3649 | // VQMOVN : Vector Saturating Narrowing Move |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3650 | defm VQMOVNs : N2VNInt_HSD<0b11,0b11,0b10,0b00101,0,0, IIC_VQUNAiD, |
| 3651 | "vqmovn", "s", int_arm_neon_vqmovns>; |
| 3652 | defm VQMOVNu : N2VNInt_HSD<0b11,0b11,0b10,0b00101,1,0, IIC_VQUNAiD, |
| 3653 | "vqmovn", "u", int_arm_neon_vqmovnu>; |
| 3654 | defm VQMOVNsu : N2VNInt_HSD<0b11,0b11,0b10,0b00100,1,0, IIC_VQUNAiD, |
| 3655 | "vqmovun", "s", int_arm_neon_vqmovnsu>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3656 | // VMOVL : Vector Lengthening Move |
| Bob Wilson | 9a511c0 | 2010-08-20 04:54:02 +0000 | [diff] [blame] | 3657 | defm VMOVLs : N2VL_QHS<0b01,0b10100,0,1, "vmovl", "s", sext>; |
| 3658 | defm VMOVLu : N2VL_QHS<0b11,0b10100,0,1, "vmovl", "u", zext>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3659 | |
| 3660 | // Vector Conversions. |
| 3661 | |
| Johnny Chen | 8f3004c | 2010-03-17 17:52:21 +0000 | [diff] [blame] | 3662 | // VCVT : Vector Convert Between Floating-Point and Integers |
| Johnny Chen | 274a0d3 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 3663 | def VCVTf2sd : N2VD<0b11, 0b11, 0b10, 0b11, 0b01110, 0, "vcvt", "s32.f32", |
| 3664 | v2i32, v2f32, fp_to_sint>; |
| 3665 | def VCVTf2ud : N2VD<0b11, 0b11, 0b10, 0b11, 0b01111, 0, "vcvt", "u32.f32", |
| 3666 | v2i32, v2f32, fp_to_uint>; |
| 3667 | def VCVTs2fd : N2VD<0b11, 0b11, 0b10, 0b11, 0b01100, 0, "vcvt", "f32.s32", |
| 3668 | v2f32, v2i32, sint_to_fp>; |
| 3669 | def VCVTu2fd : N2VD<0b11, 0b11, 0b10, 0b11, 0b01101, 0, "vcvt", "f32.u32", |
| 3670 | v2f32, v2i32, uint_to_fp>; |
| Johnny Chen | 8f3004c | 2010-03-17 17:52:21 +0000 | [diff] [blame] | 3671 | |
| Johnny Chen | 274a0d3 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 3672 | def VCVTf2sq : N2VQ<0b11, 0b11, 0b10, 0b11, 0b01110, 0, "vcvt", "s32.f32", |
| 3673 | v4i32, v4f32, fp_to_sint>; |
| 3674 | def VCVTf2uq : N2VQ<0b11, 0b11, 0b10, 0b11, 0b01111, 0, "vcvt", "u32.f32", |
| 3675 | v4i32, v4f32, fp_to_uint>; |
| 3676 | def VCVTs2fq : N2VQ<0b11, 0b11, 0b10, 0b11, 0b01100, 0, "vcvt", "f32.s32", |
| 3677 | v4f32, v4i32, sint_to_fp>; |
| 3678 | def VCVTu2fq : N2VQ<0b11, 0b11, 0b10, 0b11, 0b01101, 0, "vcvt", "f32.u32", |
| 3679 | v4f32, v4i32, uint_to_fp>; |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3680 | |
| 3681 | // VCVT : Vector Convert Between Floating-Point and Fixed-Point. |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3682 | def VCVTf2xsd : N2VCvtD<0, 1, 0b1111, 0, 1, "vcvt", "s32.f32", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3683 | v2i32, v2f32, int_arm_neon_vcvtfp2fxs>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3684 | def VCVTf2xud : N2VCvtD<1, 1, 0b1111, 0, 1, "vcvt", "u32.f32", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3685 | v2i32, v2f32, int_arm_neon_vcvtfp2fxu>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3686 | def VCVTxs2fd : N2VCvtD<0, 1, 0b1110, 0, 1, "vcvt", "f32.s32", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3687 | v2f32, v2i32, int_arm_neon_vcvtfxs2fp>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3688 | def VCVTxu2fd : N2VCvtD<1, 1, 0b1110, 0, 1, "vcvt", "f32.u32", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3689 | v2f32, v2i32, int_arm_neon_vcvtfxu2fp>; |
| 3690 | |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3691 | def VCVTf2xsq : N2VCvtQ<0, 1, 0b1111, 0, 1, "vcvt", "s32.f32", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3692 | v4i32, v4f32, int_arm_neon_vcvtfp2fxs>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3693 | def VCVTf2xuq : N2VCvtQ<1, 1, 0b1111, 0, 1, "vcvt", "u32.f32", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3694 | v4i32, v4f32, int_arm_neon_vcvtfp2fxu>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3695 | def VCVTxs2fq : N2VCvtQ<0, 1, 0b1110, 0, 1, "vcvt", "f32.s32", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3696 | v4f32, v4i32, int_arm_neon_vcvtfxs2fp>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3697 | def VCVTxu2fq : N2VCvtQ<1, 1, 0b1110, 0, 1, "vcvt", "f32.u32", |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3698 | v4f32, v4i32, int_arm_neon_vcvtfxu2fp>; |
| 3699 | |
| Bob Wilson | ea3a402 | 2009-08-12 22:31:50 +0000 | [diff] [blame] | 3700 | // Vector Reverse. |
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3701 | |
| 3702 | // VREV64 : Vector Reverse elements within 64-bit doublewords |
| 3703 | |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3704 | class VREV64D<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty> |
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3705 | : N2V<0b11, 0b11, op19_18, 0b00, 0b00000, 0, 0, (outs DPR:$dst), |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3706 | (ins DPR:$src), IIC_VMOVD, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3707 | OpcodeStr, Dt, "$dst, $src", "", |
| Bob Wilson | ea3a402 | 2009-08-12 22:31:50 +0000 | [diff] [blame] | 3708 | [(set DPR:$dst, (Ty (NEONvrev64 (Ty DPR:$src))))]>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3709 | class VREV64Q<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty> |
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3710 | : N2V<0b11, 0b11, op19_18, 0b00, 0b00000, 1, 0, (outs QPR:$dst), |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3711 | (ins QPR:$src), IIC_VMOVD, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3712 | OpcodeStr, Dt, "$dst, $src", "", |
| Bob Wilson | ea3a402 | 2009-08-12 22:31:50 +0000 | [diff] [blame] | 3713 | [(set QPR:$dst, (Ty (NEONvrev64 (Ty QPR:$src))))]>; |
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3714 | |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3715 | def VREV64d8 : VREV64D<0b00, "vrev64", "8", v8i8>; |
| 3716 | def VREV64d16 : VREV64D<0b01, "vrev64", "16", v4i16>; |
| 3717 | def VREV64d32 : VREV64D<0b10, "vrev64", "32", v2i32>; |
| 3718 | def VREV64df : VREV64D<0b10, "vrev64", "32", v2f32>; |
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3719 | |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3720 | def VREV64q8 : VREV64Q<0b00, "vrev64", "8", v16i8>; |
| 3721 | def VREV64q16 : VREV64Q<0b01, "vrev64", "16", v8i16>; |
| 3722 | def VREV64q32 : VREV64Q<0b10, "vrev64", "32", v4i32>; |
| 3723 | def VREV64qf : VREV64Q<0b10, "vrev64", "32", v4f32>; |
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3724 | |
| 3725 | // VREV32 : Vector Reverse elements within 32-bit words |
| 3726 | |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3727 | class VREV32D<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty> |
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3728 | : N2V<0b11, 0b11, op19_18, 0b00, 0b00001, 0, 0, (outs DPR:$dst), |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3729 | (ins DPR:$src), IIC_VMOVD, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3730 | OpcodeStr, Dt, "$dst, $src", "", |
| Bob Wilson | ea3a402 | 2009-08-12 22:31:50 +0000 | [diff] [blame] | 3731 | [(set DPR:$dst, (Ty (NEONvrev32 (Ty DPR:$src))))]>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3732 | class VREV32Q<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty> |
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3733 | : N2V<0b11, 0b11, op19_18, 0b00, 0b00001, 1, 0, (outs QPR:$dst), |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3734 | (ins QPR:$src), IIC_VMOVD, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3735 | OpcodeStr, Dt, "$dst, $src", "", |
| Bob Wilson | ea3a402 | 2009-08-12 22:31:50 +0000 | [diff] [blame] | 3736 | [(set QPR:$dst, (Ty (NEONvrev32 (Ty QPR:$src))))]>; |
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3737 | |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3738 | def VREV32d8 : VREV32D<0b00, "vrev32", "8", v8i8>; |
| 3739 | def VREV32d16 : VREV32D<0b01, "vrev32", "16", v4i16>; |
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3740 | |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3741 | def VREV32q8 : VREV32Q<0b00, "vrev32", "8", v16i8>; |
| 3742 | def VREV32q16 : VREV32Q<0b01, "vrev32", "16", v8i16>; |
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3743 | |
| 3744 | // VREV16 : Vector Reverse elements within 16-bit halfwords |
| 3745 | |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3746 | class VREV16D<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty> |
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3747 | : N2V<0b11, 0b11, op19_18, 0b00, 0b00010, 0, 0, (outs DPR:$dst), |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3748 | (ins DPR:$src), IIC_VMOVD, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3749 | OpcodeStr, Dt, "$dst, $src", "", |
| Bob Wilson | ea3a402 | 2009-08-12 22:31:50 +0000 | [diff] [blame] | 3750 | [(set DPR:$dst, (Ty (NEONvrev16 (Ty DPR:$src))))]>; |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3751 | class VREV16Q<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty> |
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3752 | : N2V<0b11, 0b11, op19_18, 0b00, 0b00010, 1, 0, (outs QPR:$dst), |
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3753 | (ins QPR:$src), IIC_VMOVD, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3754 | OpcodeStr, Dt, "$dst, $src", "", |
| Bob Wilson | ea3a402 | 2009-08-12 22:31:50 +0000 | [diff] [blame] | 3755 | [(set QPR:$dst, (Ty (NEONvrev16 (Ty QPR:$src))))]>; |
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3756 | |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3757 | def VREV16d8 : VREV16D<0b00, "vrev16", "8", v8i8>; |
| 3758 | def VREV16q8 : VREV16Q<0b00, "vrev16", "8", v16i8>; |
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3759 | |
| Bob Wilson | 32cd855 | 2009-08-19 17:03:43 +0000 | [diff] [blame] | 3760 | // Other Vector Shuffles. |
| 3761 | |
| 3762 | // VEXT : Vector Extract |
| 3763 | |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3764 | class VEXTd<string OpcodeStr, string Dt, ValueType Ty> |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 3765 | : N3V<0,1,0b11,{?,?,?,?},0,0, (outs DPR:$dst), |
| 3766 | (ins DPR:$lhs, DPR:$rhs, i32imm:$index), NVExtFrm, |
| 3767 | IIC_VEXTD, OpcodeStr, Dt, "$dst, $lhs, $rhs, $index", "", |
| 3768 | [(set DPR:$dst, (Ty (NEONvext (Ty DPR:$lhs), |
| 3769 | (Ty DPR:$rhs), imm:$index)))]>; |
| Anton Korobeynikov | 38f284f | 2009-08-21 12:40:21 +0000 | [diff] [blame] | 3770 | |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3771 | class VEXTq<string OpcodeStr, string Dt, ValueType Ty> |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 3772 | : N3V<0,1,0b11,{?,?,?,?},1,0, (outs QPR:$dst), |
| 3773 | (ins QPR:$lhs, QPR:$rhs, i32imm:$index), NVExtFrm, |
| 3774 | IIC_VEXTQ, OpcodeStr, Dt, "$dst, $lhs, $rhs, $index", "", |
| 3775 | [(set QPR:$dst, (Ty (NEONvext (Ty QPR:$lhs), |
| 3776 | (Ty QPR:$rhs), imm:$index)))]>; |
| Anton Korobeynikov | 38f284f | 2009-08-21 12:40:21 +0000 | [diff] [blame] | 3777 | |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3778 | def VEXTd8 : VEXTd<"vext", "8", v8i8>; |
| 3779 | def VEXTd16 : VEXTd<"vext", "16", v4i16>; |
| 3780 | def VEXTd32 : VEXTd<"vext", "32", v2i32>; |
| 3781 | def VEXTdf : VEXTd<"vext", "32", v2f32>; |
| Anton Korobeynikov | 38f284f | 2009-08-21 12:40:21 +0000 | [diff] [blame] | 3782 | |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3783 | def VEXTq8 : VEXTq<"vext", "8", v16i8>; |
| 3784 | def VEXTq16 : VEXTq<"vext", "16", v8i16>; |
| 3785 | def VEXTq32 : VEXTq<"vext", "32", v4i32>; |
| 3786 | def VEXTqf : VEXTq<"vext", "32", v4f32>; |
| Bob Wilson | 32cd855 | 2009-08-19 17:03:43 +0000 | [diff] [blame] | 3787 | |
| Bob Wilson | db46af0 | 2009-08-08 05:53:00 +0000 | [diff] [blame] | 3788 | // VTRN : Vector Transpose |
| 3789 | |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3790 | def VTRNd8 : N2VDShuffle<0b00, 0b00001, "vtrn", "8">; |
| 3791 | def VTRNd16 : N2VDShuffle<0b01, 0b00001, "vtrn", "16">; |
| 3792 | def VTRNd32 : N2VDShuffle<0b10, 0b00001, "vtrn", "32">; |
| Bob Wilson | db46af0 | 2009-08-08 05:53:00 +0000 | [diff] [blame] | 3793 | |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3794 | def VTRNq8 : N2VQShuffle<0b00, 0b00001, IIC_VPERMQ, "vtrn", "8">; |
| 3795 | def VTRNq16 : N2VQShuffle<0b01, 0b00001, IIC_VPERMQ, "vtrn", "16">; |
| 3796 | def VTRNq32 : N2VQShuffle<0b10, 0b00001, IIC_VPERMQ, "vtrn", "32">; |
| Bob Wilson | db46af0 | 2009-08-08 05:53:00 +0000 | [diff] [blame] | 3797 | |
| Bob Wilson | e223107 | 2009-08-08 06:13:25 +0000 | [diff] [blame] | 3798 | // VUZP : Vector Unzip (Deinterleave) |
| 3799 | |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3800 | def VUZPd8 : N2VDShuffle<0b00, 0b00010, "vuzp", "8">; |
| 3801 | def VUZPd16 : N2VDShuffle<0b01, 0b00010, "vuzp", "16">; |
| 3802 | def VUZPd32 : N2VDShuffle<0b10, 0b00010, "vuzp", "32">; |
| Bob Wilson | e223107 | 2009-08-08 06:13:25 +0000 | [diff] [blame] | 3803 | |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3804 | def VUZPq8 : N2VQShuffle<0b00, 0b00010, IIC_VPERMQ3, "vuzp", "8">; |
| 3805 | def VUZPq16 : N2VQShuffle<0b01, 0b00010, IIC_VPERMQ3, "vuzp", "16">; |
| 3806 | def VUZPq32 : N2VQShuffle<0b10, 0b00010, IIC_VPERMQ3, "vuzp", "32">; |
| Bob Wilson | e223107 | 2009-08-08 06:13:25 +0000 | [diff] [blame] | 3807 | |
| 3808 | // VZIP : Vector Zip (Interleave) |
| 3809 | |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3810 | def VZIPd8 : N2VDShuffle<0b00, 0b00011, "vzip", "8">; |
| 3811 | def VZIPd16 : N2VDShuffle<0b01, 0b00011, "vzip", "16">; |
| 3812 | def VZIPd32 : N2VDShuffle<0b10, 0b00011, "vzip", "32">; |
| Bob Wilson | e223107 | 2009-08-08 06:13:25 +0000 | [diff] [blame] | 3813 | |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3814 | def VZIPq8 : N2VQShuffle<0b00, 0b00011, IIC_VPERMQ3, "vzip", "8">; |
| 3815 | def VZIPq16 : N2VQShuffle<0b01, 0b00011, IIC_VPERMQ3, "vzip", "16">; |
| 3816 | def VZIPq32 : N2VQShuffle<0b10, 0b00011, IIC_VPERMQ3, "vzip", "32">; |
| Bob Wilson | db46af0 | 2009-08-08 05:53:00 +0000 | [diff] [blame] | 3817 | |
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3818 | // Vector Table Lookup and Table Extension. |
| 3819 | |
| 3820 | // VTBL : Vector Table Lookup |
| 3821 | def VTBL1 |
| 3822 | : N3V<1,1,0b11,0b1000,0,0, (outs DPR:$dst), |
| Johnny Chen | c86256f | 2010-03-29 01:14:22 +0000 | [diff] [blame] | 3823 | (ins DPR:$tbl1, DPR:$src), NVTBLFrm, IIC_VTB1, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3824 | "vtbl", "8", "$dst, \\{$tbl1\\}, $src", "", |
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3825 | [(set DPR:$dst, (v8i8 (int_arm_neon_vtbl1 DPR:$tbl1, DPR:$src)))]>; |
| Evan Cheng | 1b2b64f | 2009-10-01 08:22:27 +0000 | [diff] [blame] | 3826 | let hasExtraSrcRegAllocReq = 1 in { |
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3827 | def VTBL2 |
| 3828 | : N3V<1,1,0b11,0b1001,0,0, (outs DPR:$dst), |
| Johnny Chen | c86256f | 2010-03-29 01:14:22 +0000 | [diff] [blame] | 3829 | (ins DPR:$tbl1, DPR:$tbl2, DPR:$src), NVTBLFrm, IIC_VTB2, |
| Bob Wilson | 3ed511b | 2010-07-06 23:36:25 +0000 | [diff] [blame] | 3830 | "vtbl", "8", "$dst, \\{$tbl1, $tbl2\\}, $src", "", []>; |
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3831 | def VTBL3 |
| 3832 | : N3V<1,1,0b11,0b1010,0,0, (outs DPR:$dst), |
| Johnny Chen | c86256f | 2010-03-29 01:14:22 +0000 | [diff] [blame] | 3833 | (ins DPR:$tbl1, DPR:$tbl2, DPR:$tbl3, DPR:$src), NVTBLFrm, IIC_VTB3, |
| Bob Wilson | 3ed511b | 2010-07-06 23:36:25 +0000 | [diff] [blame] | 3834 | "vtbl", "8", "$dst, \\{$tbl1, $tbl2, $tbl3\\}, $src", "", []>; |
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3835 | def VTBL4 |
| 3836 | : N3V<1,1,0b11,0b1011,0,0, (outs DPR:$dst), |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 3837 | (ins DPR:$tbl1, DPR:$tbl2, DPR:$tbl3, DPR:$tbl4, DPR:$src), |
| Johnny Chen | c86256f | 2010-03-29 01:14:22 +0000 | [diff] [blame] | 3838 | NVTBLFrm, IIC_VTB4, |
| Bob Wilson | 3ed511b | 2010-07-06 23:36:25 +0000 | [diff] [blame] | 3839 | "vtbl", "8", "$dst, \\{$tbl1, $tbl2, $tbl3, $tbl4\\}, $src", "", []>; |
| Evan Cheng | 1b2b64f | 2009-10-01 08:22:27 +0000 | [diff] [blame] | 3840 | } // hasExtraSrcRegAllocReq = 1 |
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3841 | |
| Bob Wilson | c597fd3b | 2010-09-13 23:55:10 +0000 | [diff] [blame] | 3842 | def VTBL2Pseudo |
| 3843 | : PseudoNeonI<(outs DPR:$dst), (ins QPR:$tbl, DPR:$src), IIC_VTB2, "">; |
| 3844 | def VTBL3Pseudo |
| 3845 | : PseudoNeonI<(outs DPR:$dst), (ins QQPR:$tbl, DPR:$src), IIC_VTB3, "">; |
| 3846 | def VTBL4Pseudo |
| 3847 | : PseudoNeonI<(outs DPR:$dst), (ins QQPR:$tbl, DPR:$src), IIC_VTB4, "">; |
| 3848 | |
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3849 | // VTBX : Vector Table Extension |
| 3850 | def VTBX1 |
| 3851 | : N3V<1,1,0b11,0b1000,1,0, (outs DPR:$dst), |
| Johnny Chen | c86256f | 2010-03-29 01:14:22 +0000 | [diff] [blame] | 3852 | (ins DPR:$orig, DPR:$tbl1, DPR:$src), NVTBLFrm, IIC_VTBX1, |
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3853 | "vtbx", "8", "$dst, \\{$tbl1\\}, $src", "$orig = $dst", |
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3854 | [(set DPR:$dst, (v8i8 (int_arm_neon_vtbx1 |
| 3855 | DPR:$orig, DPR:$tbl1, DPR:$src)))]>; |
| Evan Cheng | 1b2b64f | 2009-10-01 08:22:27 +0000 | [diff] [blame] | 3856 | let hasExtraSrcRegAllocReq = 1 in { |
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3857 | def VTBX2 |
| 3858 | : N3V<1,1,0b11,0b1001,1,0, (outs DPR:$dst), |
| Johnny Chen | c86256f | 2010-03-29 01:14:22 +0000 | [diff] [blame] | 3859 | (ins DPR:$orig, DPR:$tbl1, DPR:$tbl2, DPR:$src), NVTBLFrm, IIC_VTBX2, |
| Bob Wilson | 5bc8a79 | 2010-07-07 00:08:54 +0000 | [diff] [blame] | 3860 | "vtbx", "8", "$dst, \\{$tbl1, $tbl2\\}, $src", "$orig = $dst", []>; |
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3861 | def VTBX3 |
| 3862 | : N3V<1,1,0b11,0b1010,1,0, (outs DPR:$dst), |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 3863 | (ins DPR:$orig, DPR:$tbl1, DPR:$tbl2, DPR:$tbl3, DPR:$src), |
| Johnny Chen | c86256f | 2010-03-29 01:14:22 +0000 | [diff] [blame] | 3864 | NVTBLFrm, IIC_VTBX3, |
| Bob Wilson | 5bc8a79 | 2010-07-07 00:08:54 +0000 | [diff] [blame] | 3865 | "vtbx", "8", "$dst, \\{$tbl1, $tbl2, $tbl3\\}, $src", |
| 3866 | "$orig = $dst", []>; |
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3867 | def VTBX4 |
| 3868 | : N3V<1,1,0b11,0b1011,1,0, (outs DPR:$dst), (ins DPR:$orig, DPR:$tbl1, |
| Johnny Chen | c86256f | 2010-03-29 01:14:22 +0000 | [diff] [blame] | 3869 | DPR:$tbl2, DPR:$tbl3, DPR:$tbl4, DPR:$src), NVTBLFrm, IIC_VTBX4, |
| Bob Wilson | 7430a98 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 3870 | "vtbx", "8", "$dst, \\{$tbl1, $tbl2, $tbl3, $tbl4\\}, $src", |
| Bob Wilson | 5bc8a79 | 2010-07-07 00:08:54 +0000 | [diff] [blame] | 3871 | "$orig = $dst", []>; |
| Evan Cheng | 1b2b64f | 2009-10-01 08:22:27 +0000 | [diff] [blame] | 3872 | } // hasExtraSrcRegAllocReq = 1 |
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3873 | |
| Bob Wilson | c597fd3b | 2010-09-13 23:55:10 +0000 | [diff] [blame] | 3874 | def VTBX2Pseudo |
| 3875 | : PseudoNeonI<(outs DPR:$dst), (ins DPR:$orig, QPR:$tbl, DPR:$src), |
| 3876 | IIC_VTBX2, "$orig = $dst">; |
| 3877 | def VTBX3Pseudo |
| 3878 | : PseudoNeonI<(outs DPR:$dst), (ins DPR:$orig, QQPR:$tbl, DPR:$src), |
| 3879 | IIC_VTBX3, "$orig = $dst">; |
| 3880 | def VTBX4Pseudo |
| 3881 | : PseudoNeonI<(outs DPR:$dst), (ins DPR:$orig, QQPR:$tbl, DPR:$src), |
| 3882 | IIC_VTBX4, "$orig = $dst">; |
| 3883 | |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3884 | //===----------------------------------------------------------------------===// |
| Evan Cheng | 4c3b1ca | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3885 | // NEON instructions for single-precision FP math |
| 3886 | //===----------------------------------------------------------------------===// |
| 3887 | |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3888 | class N2VSPat<SDNode OpNode, ValueType ResTy, ValueType OpTy, NeonI Inst> |
| 3889 | : NEONFPPat<(ResTy (OpNode SPR:$a)), |
| Chris Lattner | b8a7427 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 3890 | (EXTRACT_SUBREG (OpTy (Inst (INSERT_SUBREG (OpTy (IMPLICIT_DEF)), |
| Jakob Stoklund Olesen | 6c47d64 | 2010-05-24 16:54:32 +0000 | [diff] [blame] | 3891 | SPR:$a, ssub_0))), |
| 3892 | ssub_0)>; |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3893 | |
| 3894 | class N3VSPat<SDNode OpNode, NeonI Inst> |
| 3895 | : NEONFPPat<(f32 (OpNode SPR:$a, SPR:$b)), |
| Chris Lattner | b8a7427 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 3896 | (EXTRACT_SUBREG (v2f32 |
| 3897 | (Inst (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), |
| Jakob Stoklund Olesen | 6c47d64 | 2010-05-24 16:54:32 +0000 | [diff] [blame] | 3898 | SPR:$a, ssub_0), |
| Chris Lattner | b8a7427 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 3899 | (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), |
| Jakob Stoklund Olesen | 6c47d64 | 2010-05-24 16:54:32 +0000 | [diff] [blame] | 3900 | SPR:$b, ssub_0))), |
| 3901 | ssub_0)>; |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3902 | |
| 3903 | class N3VSMulOpPat<SDNode MulNode, SDNode OpNode, NeonI Inst> |
| 3904 | : NEONFPPat<(f32 (OpNode SPR:$acc, (f32 (MulNode SPR:$a, SPR:$b)))), |
| 3905 | (EXTRACT_SUBREG (Inst (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), |
| Jakob Stoklund Olesen | 6c47d64 | 2010-05-24 16:54:32 +0000 | [diff] [blame] | 3906 | SPR:$acc, ssub_0), |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3907 | (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), |
| Jakob Stoklund Olesen | 6c47d64 | 2010-05-24 16:54:32 +0000 | [diff] [blame] | 3908 | SPR:$a, ssub_0), |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3909 | (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), |
| Jakob Stoklund Olesen | 6c47d64 | 2010-05-24 16:54:32 +0000 | [diff] [blame] | 3910 | SPR:$b, ssub_0)), |
| 3911 | ssub_0)>; |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3912 | |
| Evan Cheng | 4c3b1ca | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3913 | // These need separate instructions because they must use DPR_VFP2 register |
| 3914 | // class which have SPR sub-registers. |
| 3915 | |
| 3916 | // Vector Add Operations used for single-precision FP |
| 3917 | let neverHasSideEffects = 1 in |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3918 | def VADDfd_sfp : N3VS<0,0,0b00,0b1101,0, "vadd", "f32", v2f32, v2f32, fadd, 1>; |
| 3919 | def : N3VSPat<fadd, VADDfd_sfp>; |
| Evan Cheng | 4c3b1ca | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3920 | |
| David Goodwin | 85b5b02 | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3921 | // Vector Sub Operations used for single-precision FP |
| 3922 | let neverHasSideEffects = 1 in |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3923 | def VSUBfd_sfp : N3VS<0,0,0b10,0b1101,0, "vsub", "f32", v2f32, v2f32, fsub, 0>; |
| 3924 | def : N3VSPat<fsub, VSUBfd_sfp>; |
| David Goodwin | 85b5b02 | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3925 | |
| Evan Cheng | 4c3b1ca | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3926 | // Vector Multiply Operations used for single-precision FP |
| 3927 | let neverHasSideEffects = 1 in |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3928 | def VMULfd_sfp : N3VS<1,0,0b00,0b1101,1, "vmul", "f32", v2f32, v2f32, fmul, 1>; |
| 3929 | def : N3VSPat<fmul, VMULfd_sfp>; |
| Evan Cheng | 4c3b1ca | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3930 | |
| 3931 | // Vector Multiply-Accumulate/Subtract used for single-precision FP |
| Jim Grosbach | 5cba8de | 2009-10-31 22:57:36 +0000 | [diff] [blame] | 3932 | // vml[as].f32 can cause 4-8 cycle stalls in following ASIMD instructions, so |
| 3933 | // we want to avoid them for now. e.g., alternating vmla/vadd instructions. |
| Evan Cheng | 4c3b1ca | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3934 | |
| Jim Grosbach | 5cba8de | 2009-10-31 22:57:36 +0000 | [diff] [blame] | 3935 | //let neverHasSideEffects = 1 in |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3936 | //def VMLAfd_sfp : N3VSMulOp<0,0,0b00,0b1101,1, IIC_VMACD, "vmla", "f32", |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 3937 | // v2f32, fmul, fadd>; |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3938 | //def : N3VSMulOpPat<fmul, fadd, VMLAfd_sfp>; |
| Jim Grosbach | 5cba8de | 2009-10-31 22:57:36 +0000 | [diff] [blame] | 3939 | |
| 3940 | //let neverHasSideEffects = 1 in |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3941 | //def VMLSfd_sfp : N3VSMulOp<0,0,0b10,0b1101,1, IIC_VMACD, "vmls", "f32", |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 3942 | // v2f32, fmul, fsub>; |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3943 | //def : N3VSMulOpPat<fmul, fsub, VMLSfd_sfp>; |
| Evan Cheng | 4c3b1ca | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3944 | |
| David Goodwin | 85b5b02 | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3945 | // Vector Absolute used for single-precision FP |
| Evan Cheng | 4c3b1ca | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3946 | let neverHasSideEffects = 1 in |
| Bob Wilson | cb2deb2 | 2010-02-17 22:42:54 +0000 | [diff] [blame] | 3947 | def VABSfd_sfp : N2V<0b11, 0b11, 0b10, 0b01, 0b01110, 0, 0, |
| 3948 | (outs DPR_VFP2:$dst), (ins DPR_VFP2:$src), IIC_VUNAD, |
| 3949 | "vabs", "f32", "$dst, $src", "", []>; |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3950 | def : N2VSPat<fabs, f32, v2f32, VABSfd_sfp>; |
| Evan Cheng | 4c3b1ca | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3951 | |
| David Goodwin | 85b5b02 | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3952 | // Vector Negate used for single-precision FP |
| Evan Cheng | 4c3b1ca | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3953 | let neverHasSideEffects = 1 in |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3954 | def VNEGfd_sfp : N2V<0b11, 0b11, 0b10, 0b01, 0b01111, 0, 0, |
| 3955 | (outs DPR_VFP2:$dst), (ins DPR_VFP2:$src), IIC_VUNAD, |
| 3956 | "vneg", "f32", "$dst, $src", "", []>; |
| 3957 | def : N2VSPat<fneg, f32, v2f32, VNEGfd_sfp>; |
| Evan Cheng | 4c3b1ca | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3958 | |
| Bob Wilson | c6c13a3 | 2010-02-18 06:05:53 +0000 | [diff] [blame] | 3959 | // Vector Maximum used for single-precision FP |
| 3960 | let neverHasSideEffects = 1 in |
| 3961 | def VMAXfd_sfp : N3V<0, 0, 0b00, 0b1111, 0, 0, (outs DPR_VFP2:$dst), |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 3962 | (ins DPR_VFP2:$src1, DPR_VFP2:$src2), N3RegFrm, IIC_VBIND, |
| Bob Wilson | c6c13a3 | 2010-02-18 06:05:53 +0000 | [diff] [blame] | 3963 | "vmax", "f32", "$dst, $src1, $src2", "", []>; |
| 3964 | def : N3VSPat<NEONfmax, VMAXfd_sfp>; |
| 3965 | |
| 3966 | // Vector Minimum used for single-precision FP |
| 3967 | let neverHasSideEffects = 1 in |
| 3968 | def VMINfd_sfp : N3V<0, 0, 0b00, 0b1111, 0, 0, (outs DPR_VFP2:$dst), |
| Bob Wilson | cf603fb | 2010-03-27 03:56:52 +0000 | [diff] [blame] | 3969 | (ins DPR_VFP2:$src1, DPR_VFP2:$src2), N3RegFrm, IIC_VBIND, |
| Bob Wilson | c6c13a3 | 2010-02-18 06:05:53 +0000 | [diff] [blame] | 3970 | "vmin", "f32", "$dst, $src1, $src2", "", []>; |
| 3971 | def : N3VSPat<NEONfmin, VMINfd_sfp>; |
| 3972 | |
| David Goodwin | 85b5b02 | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3973 | // Vector Convert between single-precision FP and integer |
| 3974 | let neverHasSideEffects = 1 in |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3975 | def VCVTf2sd_sfp : N2VS<0b11, 0b11, 0b10, 0b11, 0b01110, 0, "vcvt", "s32.f32", |
| 3976 | v2i32, v2f32, fp_to_sint>; |
| Bob Wilson | e4191e7 | 2010-03-19 22:51:32 +0000 | [diff] [blame] | 3977 | def : N2VSPat<arm_ftosi, f32, v2f32, VCVTf2sd_sfp>; |
| David Goodwin | 85b5b02 | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3978 | |
| 3979 | let neverHasSideEffects = 1 in |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3980 | def VCVTf2ud_sfp : N2VS<0b11, 0b11, 0b10, 0b11, 0b01111, 0, "vcvt", "u32.f32", |
| 3981 | v2i32, v2f32, fp_to_uint>; |
| Bob Wilson | e4191e7 | 2010-03-19 22:51:32 +0000 | [diff] [blame] | 3982 | def : N2VSPat<arm_ftoui, f32, v2f32, VCVTf2ud_sfp>; |
| David Goodwin | 85b5b02 | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3983 | |
| 3984 | let neverHasSideEffects = 1 in |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3985 | def VCVTs2fd_sfp : N2VS<0b11, 0b11, 0b10, 0b11, 0b01100, 0, "vcvt", "f32.s32", |
| 3986 | v2f32, v2i32, sint_to_fp>; |
| Bob Wilson | e4191e7 | 2010-03-19 22:51:32 +0000 | [diff] [blame] | 3987 | def : N2VSPat<arm_sitof, f32, v2i32, VCVTs2fd_sfp>; |
| David Goodwin | 85b5b02 | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3988 | |
| 3989 | let neverHasSideEffects = 1 in |
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3990 | def VCVTu2fd_sfp : N2VS<0b11, 0b11, 0b10, 0b11, 0b01101, 0, "vcvt", "f32.u32", |
| 3991 | v2f32, v2i32, uint_to_fp>; |
| Bob Wilson | e4191e7 | 2010-03-19 22:51:32 +0000 | [diff] [blame] | 3992 | def : N2VSPat<arm_uitof, f32, v2i32, VCVTu2fd_sfp>; |
| David Goodwin | 85b5b02 | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3993 | |
| Evan Cheng | 4c3b1ca | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3994 | //===----------------------------------------------------------------------===// |
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3995 | // Non-Instruction Patterns |
| 3996 | //===----------------------------------------------------------------------===// |
| 3997 | |
| 3998 | // bit_convert |
| 3999 | def : Pat<(v1i64 (bitconvert (v2i32 DPR:$src))), (v1i64 DPR:$src)>; |
| 4000 | def : Pat<(v1i64 (bitconvert (v4i16 DPR:$src))), (v1i64 DPR:$src)>; |
| 4001 | def : Pat<(v1i64 (bitconvert (v8i8 DPR:$src))), (v1i64 DPR:$src)>; |
| 4002 | def : Pat<(v1i64 (bitconvert (f64 DPR:$src))), (v1i64 DPR:$src)>; |
| 4003 | def : Pat<(v1i64 (bitconvert (v2f32 DPR:$src))), (v1i64 DPR:$src)>; |
| 4004 | def : Pat<(v2i32 (bitconvert (v1i64 DPR:$src))), (v2i32 DPR:$src)>; |
| 4005 | def : Pat<(v2i32 (bitconvert (v4i16 DPR:$src))), (v2i32 DPR:$src)>; |
| 4006 | def : Pat<(v2i32 (bitconvert (v8i8 DPR:$src))), (v2i32 DPR:$src)>; |
| 4007 | def : Pat<(v2i32 (bitconvert (f64 DPR:$src))), (v2i32 DPR:$src)>; |
| 4008 | def : Pat<(v2i32 (bitconvert (v2f32 DPR:$src))), (v2i32 DPR:$src)>; |
| 4009 | def : Pat<(v4i16 (bitconvert (v1i64 DPR:$src))), (v4i16 DPR:$src)>; |
| 4010 | def : Pat<(v4i16 (bitconvert (v2i32 DPR:$src))), (v4i16 DPR:$src)>; |
| 4011 | def : Pat<(v4i16 (bitconvert (v8i8 DPR:$src))), (v4i16 DPR:$src)>; |
| 4012 | def : Pat<(v4i16 (bitconvert (f64 DPR:$src))), (v4i16 DPR:$src)>; |
| 4013 | def : Pat<(v4i16 (bitconvert (v2f32 DPR:$src))), (v4i16 DPR:$src)>; |
| 4014 | def : Pat<(v8i8 (bitconvert (v1i64 DPR:$src))), (v8i8 DPR:$src)>; |
| 4015 | def : Pat<(v8i8 (bitconvert (v2i32 DPR:$src))), (v8i8 DPR:$src)>; |
| 4016 | def : Pat<(v8i8 (bitconvert (v4i16 DPR:$src))), (v8i8 DPR:$src)>; |
| 4017 | def : Pat<(v8i8 (bitconvert (f64 DPR:$src))), (v8i8 DPR:$src)>; |
| 4018 | def : Pat<(v8i8 (bitconvert (v2f32 DPR:$src))), (v8i8 DPR:$src)>; |
| 4019 | def : Pat<(f64 (bitconvert (v1i64 DPR:$src))), (f64 DPR:$src)>; |
| 4020 | def : Pat<(f64 (bitconvert (v2i32 DPR:$src))), (f64 DPR:$src)>; |
| 4021 | def : Pat<(f64 (bitconvert (v4i16 DPR:$src))), (f64 DPR:$src)>; |
| 4022 | def : Pat<(f64 (bitconvert (v8i8 DPR:$src))), (f64 DPR:$src)>; |
| 4023 | def : Pat<(f64 (bitconvert (v2f32 DPR:$src))), (f64 DPR:$src)>; |
| 4024 | def : Pat<(v2f32 (bitconvert (f64 DPR:$src))), (v2f32 DPR:$src)>; |
| 4025 | def : Pat<(v2f32 (bitconvert (v1i64 DPR:$src))), (v2f32 DPR:$src)>; |
| 4026 | def : Pat<(v2f32 (bitconvert (v2i32 DPR:$src))), (v2f32 DPR:$src)>; |
| 4027 | def : Pat<(v2f32 (bitconvert (v4i16 DPR:$src))), (v2f32 DPR:$src)>; |
| 4028 | def : Pat<(v2f32 (bitconvert (v8i8 DPR:$src))), (v2f32 DPR:$src)>; |
| 4029 | |
| 4030 | def : Pat<(v2i64 (bitconvert (v4i32 QPR:$src))), (v2i64 QPR:$src)>; |
| 4031 | def : Pat<(v2i64 (bitconvert (v8i16 QPR:$src))), (v2i64 QPR:$src)>; |
| 4032 | def : Pat<(v2i64 (bitconvert (v16i8 QPR:$src))), (v2i64 QPR:$src)>; |
| 4033 | def : Pat<(v2i64 (bitconvert (v2f64 QPR:$src))), (v2i64 QPR:$src)>; |
| 4034 | def : Pat<(v2i64 (bitconvert (v4f32 QPR:$src))), (v2i64 QPR:$src)>; |
| 4035 | def : Pat<(v4i32 (bitconvert (v2i64 QPR:$src))), (v4i32 QPR:$src)>; |
| 4036 | def : Pat<(v4i32 (bitconvert (v8i16 QPR:$src))), (v4i32 QPR:$src)>; |
| 4037 | def : Pat<(v4i32 (bitconvert (v16i8 QPR:$src))), (v4i32 QPR:$src)>; |
| 4038 | def : Pat<(v4i32 (bitconvert (v2f64 QPR:$src))), (v4i32 QPR:$src)>; |
| 4039 | def : Pat<(v4i32 (bitconvert (v4f32 QPR:$src))), (v4i32 QPR:$src)>; |
| 4040 | def : Pat<(v8i16 (bitconvert (v2i64 QPR:$src))), (v8i16 QPR:$src)>; |
| 4041 | def : Pat<(v8i16 (bitconvert (v4i32 QPR:$src))), (v8i16 QPR:$src)>; |
| 4042 | def : Pat<(v8i16 (bitconvert (v16i8 QPR:$src))), (v8i16 QPR:$src)>; |
| 4043 | def : Pat<(v8i16 (bitconvert (v2f64 QPR:$src))), (v8i16 QPR:$src)>; |
| 4044 | def : Pat<(v8i16 (bitconvert (v4f32 QPR:$src))), (v8i16 QPR:$src)>; |
| 4045 | def : Pat<(v16i8 (bitconvert (v2i64 QPR:$src))), (v16i8 QPR:$src)>; |
| 4046 | def : Pat<(v16i8 (bitconvert (v4i32 QPR:$src))), (v16i8 QPR:$src)>; |
| 4047 | def : Pat<(v16i8 (bitconvert (v8i16 QPR:$src))), (v16i8 QPR:$src)>; |
| 4048 | def : Pat<(v16i8 (bitconvert (v2f64 QPR:$src))), (v16i8 QPR:$src)>; |
| 4049 | def : Pat<(v16i8 (bitconvert (v4f32 QPR:$src))), (v16i8 QPR:$src)>; |
| 4050 | def : Pat<(v4f32 (bitconvert (v2i64 QPR:$src))), (v4f32 QPR:$src)>; |
| 4051 | def : Pat<(v4f32 (bitconvert (v4i32 QPR:$src))), (v4f32 QPR:$src)>; |
| 4052 | def : Pat<(v4f32 (bitconvert (v8i16 QPR:$src))), (v4f32 QPR:$src)>; |
| 4053 | def : Pat<(v4f32 (bitconvert (v16i8 QPR:$src))), (v4f32 QPR:$src)>; |
| 4054 | def : Pat<(v4f32 (bitconvert (v2f64 QPR:$src))), (v4f32 QPR:$src)>; |
| 4055 | def : Pat<(v2f64 (bitconvert (v2i64 QPR:$src))), (v2f64 QPR:$src)>; |
| 4056 | def : Pat<(v2f64 (bitconvert (v4i32 QPR:$src))), (v2f64 QPR:$src)>; |
| 4057 | def : Pat<(v2f64 (bitconvert (v8i16 QPR:$src))), (v2f64 QPR:$src)>; |
| 4058 | def : Pat<(v2f64 (bitconvert (v16i8 QPR:$src))), (v2f64 QPR:$src)>; |
| 4059 | def : Pat<(v2f64 (bitconvert (v4f32 QPR:$src))), (v2f64 QPR:$src)>; |