Bob Wilson | e60fee0 | 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 | f4f1a27 | 2009-08-14 05:13:08 +0000 | [diff] [blame] | 68 | def NEONvdup : SDNode<"ARMISD::VDUP", SDTypeProfile<1, 1, [SDTCisVec<0>]>>; |
| 69 | |
Bob Wilson | 206f6c4 | 2009-08-14 05:08:32 +0000 | [diff] [blame] | 70 | // VDUPLANE can produce a quad-register result from a double-register source, |
| 71 | // so the result is not constrained to match the source. |
| 72 | def NEONvduplane : SDNode<"ARMISD::VDUPLANE", |
| 73 | SDTypeProfile<1, 2, [SDTCisVec<0>, SDTCisVec<1>, |
| 74 | SDTCisVT<2, i32>]>>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 75 | |
Bob Wilson | 3ac3913 | 2009-08-19 17:03:43 +0000 | [diff] [blame] | 76 | def SDTARMVEXT : SDTypeProfile<1, 3, [SDTCisVec<0>, SDTCisSameAs<0, 1>, |
| 77 | SDTCisSameAs<0, 2>, SDTCisVT<3, i32>]>; |
| 78 | def NEONvext : SDNode<"ARMISD::VEXT", SDTARMVEXT>; |
| 79 | |
Bob Wilson | 0847927 | 2009-08-12 22:31:50 +0000 | [diff] [blame] | 80 | def SDTARMVSHUF : SDTypeProfile<1, 1, [SDTCisVec<0>, SDTCisSameAs<0, 1>]>; |
| 81 | def NEONvrev64 : SDNode<"ARMISD::VREV64", SDTARMVSHUF>; |
| 82 | def NEONvrev32 : SDNode<"ARMISD::VREV32", SDTARMVSHUF>; |
| 83 | def NEONvrev16 : SDNode<"ARMISD::VREV16", SDTARMVSHUF>; |
| 84 | |
Anton Korobeynikov | be262ae | 2009-08-21 12:40:50 +0000 | [diff] [blame] | 85 | def SDTARMVSHUF2 : SDTypeProfile<2, 2, [SDTCisVec<0>, SDTCisSameAs<0, 1>, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 86 | SDTCisSameAs<0, 2>, |
| 87 | SDTCisSameAs<0, 3>]>; |
Anton Korobeynikov | 394bbb8 | 2009-08-21 12:41:42 +0000 | [diff] [blame] | 88 | def NEONzip : SDNode<"ARMISD::VZIP", SDTARMVSHUF2>; |
| 89 | def NEONuzp : SDNode<"ARMISD::VUZP", SDTARMVSHUF2>; |
| 90 | def NEONtrn : SDNode<"ARMISD::VTRN", SDTARMVSHUF2>; |
Anton Korobeynikov | be262ae | 2009-08-21 12:40:50 +0000 | [diff] [blame] | 91 | |
Bob Wilson | bc1d2dc | 2010-02-18 06:05:53 +0000 | [diff] [blame] | 92 | def SDTARMFMAX : SDTypeProfile<1, 2, [SDTCisVT<0, f32>, SDTCisSameAs<0, 1>, |
| 93 | SDTCisSameAs<0, 2>]>; |
| 94 | def NEONfmax : SDNode<"ARMISD::FMAX", SDTARMFMAX>; |
| 95 | def NEONfmin : SDNode<"ARMISD::FMIN", SDTARMFMAX>; |
| 96 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 97 | //===----------------------------------------------------------------------===// |
| 98 | // NEON operand definitions |
| 99 | //===----------------------------------------------------------------------===// |
| 100 | |
Bob Wilson | 6a14a00 | 2009-11-06 23:33:28 +0000 | [diff] [blame] | 101 | def h8imm : Operand<i8> { |
| 102 | let PrintMethod = "printHex8ImmOperand"; |
| 103 | } |
| 104 | def h16imm : Operand<i16> { |
| 105 | let PrintMethod = "printHex16ImmOperand"; |
| 106 | } |
| 107 | def h32imm : Operand<i32> { |
| 108 | let PrintMethod = "printHex32ImmOperand"; |
| 109 | } |
| 110 | def h64imm : Operand<i64> { |
| 111 | let PrintMethod = "printHex64ImmOperand"; |
| 112 | } |
| 113 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 114 | //===----------------------------------------------------------------------===// |
| 115 | // NEON load / store instructions |
| 116 | //===----------------------------------------------------------------------===// |
| 117 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 118 | // Use vldmia to load a Q register as a D register pair. |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 119 | def VLDRQ : NI4<(outs QPR:$dst), (ins addrmode4:$addr), IIC_fpLoadm, |
| 120 | "vldmia", "$addr, ${dst:dregpair}", |
| 121 | [(set QPR:$dst, (v2f64 (load addrmode4:$addr)))]> { |
Evan Cheng | dabc6c0 | 2009-07-08 22:51:32 +0000 | [diff] [blame] | 122 | let Inst{27-25} = 0b110; |
| 123 | let Inst{24} = 0; // P bit |
| 124 | let Inst{23} = 1; // U bit |
| 125 | let Inst{20} = 1; |
Johnny Chen | 6e1b1ad | 2009-12-01 17:37:06 +0000 | [diff] [blame] | 126 | let Inst{11-8} = 0b1011; |
Evan Cheng | dabc6c0 | 2009-07-08 22:51:32 +0000 | [diff] [blame] | 127 | } |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 128 | |
Bob Wilson | 66b3400 | 2009-08-12 17:04:56 +0000 | [diff] [blame] | 129 | // Use vstmia to store a Q register as a D register pair. |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 130 | def VSTRQ : NI4<(outs), (ins QPR:$src, addrmode4:$addr), IIC_fpStorem, |
| 131 | "vstmia", "$addr, ${src:dregpair}", |
| 132 | [(store (v2f64 QPR:$src), addrmode4:$addr)]> { |
Bob Wilson | 66b3400 | 2009-08-12 17:04:56 +0000 | [diff] [blame] | 133 | let Inst{27-25} = 0b110; |
| 134 | let Inst{24} = 0; // P bit |
| 135 | let Inst{23} = 1; // U bit |
| 136 | let Inst{20} = 0; |
Johnny Chen | 6e1b1ad | 2009-12-01 17:37:06 +0000 | [diff] [blame] | 137 | let Inst{11-8} = 0b1011; |
Bob Wilson | 66b3400 | 2009-08-12 17:04:56 +0000 | [diff] [blame] | 138 | } |
| 139 | |
Bob Wilson | ed592c0 | 2009-07-08 18:11:30 +0000 | [diff] [blame] | 140 | // VLD1 : Vector Load (multiple single elements) |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 141 | class VLD1D<bits<4> op7_4, string Dt, ValueType Ty> |
Bob Wilson | b172116 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 142 | : NLdSt<0,0b10,0b0111,op7_4, (outs DPR:$dst), (ins addrmode6:$addr), IIC_VLD1, |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 143 | "vld1", Dt, "\\{$dst\\}, $addr", "", |
| 144 | [(set DPR:$dst, (Ty (int_arm_neon_vld1 addrmode6:$addr)))]>; |
| 145 | class VLD1Q<bits<4> op7_4, string Dt, ValueType Ty> |
Bob Wilson | b172116 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 146 | : NLdSt<0,0b10,0b1010,op7_4, (outs QPR:$dst), (ins addrmode6:$addr), IIC_VLD1, |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 147 | "vld1", Dt, "${dst:dregpair}, $addr", "", |
| 148 | [(set QPR:$dst, (Ty (int_arm_neon_vld1 addrmode6:$addr)))]>; |
Bob Wilson | ed592c0 | 2009-07-08 18:11:30 +0000 | [diff] [blame] | 149 | |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 150 | def VLD1d8 : VLD1D<0b0000, "8", v8i8>; |
| 151 | def VLD1d16 : VLD1D<0b0100, "16", v4i16>; |
| 152 | def VLD1d32 : VLD1D<0b1000, "32", v2i32>; |
| 153 | def VLD1df : VLD1D<0b1000, "32", v2f32>; |
| 154 | def VLD1d64 : VLD1D<0b1100, "64", v1i64>; |
Bob Wilson | ed592c0 | 2009-07-08 18:11:30 +0000 | [diff] [blame] | 155 | |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 156 | def VLD1q8 : VLD1Q<0b0000, "8", v16i8>; |
| 157 | def VLD1q16 : VLD1Q<0b0100, "16", v8i16>; |
| 158 | def VLD1q32 : VLD1Q<0b1000, "32", v4i32>; |
| 159 | def VLD1qf : VLD1Q<0b1000, "32", v4f32>; |
| 160 | def VLD1q64 : VLD1Q<0b1100, "64", v2i64>; |
Bob Wilson | ed592c0 | 2009-07-08 18:11:30 +0000 | [diff] [blame] | 161 | |
Johnny Chen | 39fb124 | 2010-02-23 20:51:23 +0000 | [diff] [blame] | 162 | // These (dreg triple/quadruple) are for disassembly only. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 163 | class VLD1D3<bits<4> op7_4, string Dt> |
Johnny Chen | 39fb124 | 2010-02-23 20:51:23 +0000 | [diff] [blame] | 164 | : NLdSt<0, 0b10, 0b0110, op7_4, (outs DPR:$dst1, DPR:$dst2, DPR:$dst3), |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 165 | (ins addrmode6:$addr), IIC_VLD1, "vld1", Dt, |
Johnny Chen | 39fb124 | 2010-02-23 20:51:23 +0000 | [diff] [blame] | 166 | "\\{$dst1, $dst2, $dst3\\}, $addr", "", |
| 167 | [/* For disassembly only; pattern left blank */]>; |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 168 | class VLD1D4<bits<4> op7_4, string Dt> |
Johnny Chen | 39fb124 | 2010-02-23 20:51:23 +0000 | [diff] [blame] | 169 | : NLdSt<0,0b10,0b0010,op7_4,(outs DPR:$dst1, DPR:$dst2, DPR:$dst3, DPR:$dst4), |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 170 | (ins addrmode6:$addr), IIC_VLD1, "vld1", Dt, |
Johnny Chen | 39fb124 | 2010-02-23 20:51:23 +0000 | [diff] [blame] | 171 | "\\{$dst1, $dst2, $dst3, $dst4\\}, $addr", "", |
| 172 | [/* For disassembly only; pattern left blank */]>; |
| 173 | |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 174 | def VLD1d8T : VLD1D3<0b0000, "8">; |
| 175 | def VLD1d16T : VLD1D3<0b0100, "16">; |
| 176 | def VLD1d32T : VLD1D3<0b1000, "32">; |
| 177 | //def VLD1d64T : VLD1D3<0b1100, "64">; |
Johnny Chen | 39fb124 | 2010-02-23 20:51:23 +0000 | [diff] [blame] | 178 | |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 179 | def VLD1d8Q : VLD1D4<0b0000, "8">; |
| 180 | def VLD1d16Q : VLD1D4<0b0100, "16">; |
| 181 | def VLD1d32Q : VLD1D4<0b1000, "32">; |
| 182 | //def VLD1d64Q : VLD1D4<0b1100, "64">; |
Johnny Chen | 39fb124 | 2010-02-23 20:51:23 +0000 | [diff] [blame] | 183 | |
| 184 | |
Evan Cheng | 7c8d5ea | 2009-10-01 08:22:27 +0000 | [diff] [blame] | 185 | let mayLoad = 1, hasExtraDefRegAllocReq = 1 in { |
Bob Wilson | 66b3400 | 2009-08-12 17:04:56 +0000 | [diff] [blame] | 186 | |
Bob Wilson | 055a90d | 2009-08-05 00:49:09 +0000 | [diff] [blame] | 187 | // VLD2 : Vector Load (multiple 2-element structures) |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 188 | class VLD2D<bits<4> op7_4, string Dt> |
Bob Wilson | b172116 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 189 | : NLdSt<0,0b10,0b1000,op7_4, (outs DPR:$dst1, DPR:$dst2), |
| 190 | (ins addrmode6:$addr), IIC_VLD2, |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 191 | "vld2", Dt, "\\{$dst1, $dst2\\}, $addr", "", []>; |
| 192 | class VLD2Q<bits<4> op7_4, string Dt> |
Bob Wilson | b172116 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 193 | : NLdSt<0,0b10,0b0011,op7_4, |
| 194 | (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, DPR:$dst4), |
Bob Wilson | e9829ca | 2009-10-06 22:01:59 +0000 | [diff] [blame] | 195 | (ins addrmode6:$addr), IIC_VLD2, |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 196 | "vld2", Dt, "\\{$dst1, $dst2, $dst3, $dst4\\}, $addr", "", []>; |
Bob Wilson | 055a90d | 2009-08-05 00:49:09 +0000 | [diff] [blame] | 197 | |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 198 | def VLD2d8 : VLD2D<0b0000, "8">; |
| 199 | def VLD2d16 : VLD2D<0b0100, "16">; |
| 200 | def VLD2d32 : VLD2D<0b1000, "32">; |
Bob Wilson | 8c3be58 | 2009-10-07 22:57:01 +0000 | [diff] [blame] | 201 | def VLD2d64 : NLdSt<0,0b10,0b1010,0b1100, (outs DPR:$dst1, DPR:$dst2), |
| 202 | (ins addrmode6:$addr), IIC_VLD1, |
Bob Wilson | 82dcfa3 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 203 | "vld1", "64", "\\{$dst1, $dst2\\}, $addr", "", []>; |
Bob Wilson | 055a90d | 2009-08-05 00:49:09 +0000 | [diff] [blame] | 204 | |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 205 | def VLD2q8 : VLD2Q<0b0000, "8">; |
| 206 | def VLD2q16 : VLD2Q<0b0100, "16">; |
| 207 | def VLD2q32 : VLD2Q<0b1000, "32">; |
Bob Wilson | e9829ca | 2009-10-06 22:01:59 +0000 | [diff] [blame] | 208 | |
Johnny Chen | 39fb124 | 2010-02-23 20:51:23 +0000 | [diff] [blame] | 209 | // These (double-spaced dreg pair) are for disassembly only. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 210 | class VLD2Ddbl<bits<4> op7_4, string Dt> |
Johnny Chen | 39fb124 | 2010-02-23 20:51:23 +0000 | [diff] [blame] | 211 | : NLdSt<0,0b10,0b1001,op7_4, (outs DPR:$dst1, DPR:$dst2), |
| 212 | (ins addrmode6:$addr), IIC_VLD2, |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 213 | "vld2", Dt, "\\{$dst1, $dst2\\}, $addr", "", []>; |
Johnny Chen | 39fb124 | 2010-02-23 20:51:23 +0000 | [diff] [blame] | 214 | |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 215 | def VLD2d8D : VLD2Ddbl<0b0000, "8">; |
| 216 | def VLD2d16D : VLD2Ddbl<0b0100, "16">; |
| 217 | def VLD2d32D : VLD2Ddbl<0b1000, "32">; |
Johnny Chen | 39fb124 | 2010-02-23 20:51:23 +0000 | [diff] [blame] | 218 | |
Bob Wilson | 055a90d | 2009-08-05 00:49:09 +0000 | [diff] [blame] | 219 | // VLD3 : Vector Load (multiple 3-element structures) |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 220 | class VLD3D<bits<4> op7_4, string Dt> |
Bob Wilson | b172116 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 221 | : NLdSt<0,0b10,0b0100,op7_4, (outs DPR:$dst1, DPR:$dst2, DPR:$dst3), |
| 222 | (ins addrmode6:$addr), IIC_VLD3, |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 223 | "vld3", Dt, "\\{$dst1, $dst2, $dst3\\}, $addr", "", []>; |
| 224 | class VLD3WB<bits<4> op7_4, string Dt> |
Bob Wilson | b172116 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 225 | : NLdSt<0,0b10,0b0101,op7_4, (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, GPR:$wb), |
Bob Wilson | a8b4362 | 2009-10-07 17:24:55 +0000 | [diff] [blame] | 226 | (ins addrmode6:$addr), IIC_VLD3, |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 227 | "vld3", Dt, "\\{$dst1, $dst2, $dst3\\}, $addr", |
Johnny Chen | 7c3f386 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 228 | "$addr.addr = $wb", []>; |
Bob Wilson | 055a90d | 2009-08-05 00:49:09 +0000 | [diff] [blame] | 229 | |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 230 | def VLD3d8 : VLD3D<0b0000, "8">; |
| 231 | def VLD3d16 : VLD3D<0b0100, "16">; |
| 232 | def VLD3d32 : VLD3D<0b1000, "32">; |
Bob Wilson | da8cacc | 2009-10-07 23:39:57 +0000 | [diff] [blame] | 233 | def VLD3d64 : NLdSt<0,0b10,0b0110,0b1100, |
| 234 | (outs DPR:$dst1, DPR:$dst2, DPR:$dst3), |
| 235 | (ins addrmode6:$addr), IIC_VLD1, |
Bob Wilson | 82dcfa3 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 236 | "vld1", "64", "\\{$dst1, $dst2, $dst3\\}, $addr", "", []>; |
Bob Wilson | 055a90d | 2009-08-05 00:49:09 +0000 | [diff] [blame] | 237 | |
Bob Wilson | a8b4362 | 2009-10-07 17:24:55 +0000 | [diff] [blame] | 238 | // vld3 to double-spaced even registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 239 | def VLD3q8a : VLD3WB<0b0000, "8">; |
| 240 | def VLD3q16a : VLD3WB<0b0100, "16">; |
| 241 | def VLD3q32a : VLD3WB<0b1000, "32">; |
Bob Wilson | a8b4362 | 2009-10-07 17:24:55 +0000 | [diff] [blame] | 242 | |
| 243 | // vld3 to double-spaced odd registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 244 | def VLD3q8b : VLD3WB<0b0000, "8">; |
| 245 | def VLD3q16b : VLD3WB<0b0100, "16">; |
| 246 | def VLD3q32b : VLD3WB<0b1000, "32">; |
Bob Wilson | a8b4362 | 2009-10-07 17:24:55 +0000 | [diff] [blame] | 247 | |
Bob Wilson | 055a90d | 2009-08-05 00:49:09 +0000 | [diff] [blame] | 248 | // VLD4 : Vector Load (multiple 4-element structures) |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 249 | class VLD4D<bits<4> op7_4, string Dt> |
Bob Wilson | b172116 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 250 | : NLdSt<0,0b10,0b0000,op7_4, |
| 251 | (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, DPR:$dst4), |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 252 | (ins addrmode6:$addr), IIC_VLD4, |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 253 | "vld4", Dt, "\\{$dst1, $dst2, $dst3, $dst4\\}, $addr", "", []>; |
| 254 | class VLD4WB<bits<4> op7_4, string Dt> |
Bob Wilson | b172116 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 255 | : NLdSt<0,0b10,0b0001,op7_4, |
| 256 | (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, DPR:$dst4, GPR:$wb), |
Bob Wilson | 004a2e1 | 2009-10-07 18:09:32 +0000 | [diff] [blame] | 257 | (ins addrmode6:$addr), IIC_VLD4, |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 258 | "vld4", Dt, "\\{$dst1, $dst2, $dst3, $dst4\\}, $addr", |
Johnny Chen | 7c3f386 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 259 | "$addr.addr = $wb", []>; |
Bob Wilson | 055a90d | 2009-08-05 00:49:09 +0000 | [diff] [blame] | 260 | |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 261 | def VLD4d8 : VLD4D<0b0000, "8">; |
| 262 | def VLD4d16 : VLD4D<0b0100, "16">; |
| 263 | def VLD4d32 : VLD4D<0b1000, "32">; |
Bob Wilson | 7ce4750 | 2009-10-07 23:54:04 +0000 | [diff] [blame] | 264 | def VLD4d64 : NLdSt<0,0b10,0b0010,0b1100, |
| 265 | (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, DPR:$dst4), |
| 266 | (ins addrmode6:$addr), IIC_VLD1, |
Bob Wilson | 82dcfa3 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 267 | "vld1", "64", "\\{$dst1, $dst2, $dst3, $dst4\\}, $addr", |
| 268 | "", []>; |
Bob Wilson | d14b8b6 | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 269 | |
Bob Wilson | 004a2e1 | 2009-10-07 18:09:32 +0000 | [diff] [blame] | 270 | // vld4 to double-spaced even registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 271 | def VLD4q8a : VLD4WB<0b0000, "8">; |
| 272 | def VLD4q16a : VLD4WB<0b0100, "16">; |
| 273 | def VLD4q32a : VLD4WB<0b1000, "32">; |
Bob Wilson | 004a2e1 | 2009-10-07 18:09:32 +0000 | [diff] [blame] | 274 | |
| 275 | // vld4 to double-spaced odd registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 276 | def VLD4q8b : VLD4WB<0b0000, "8">; |
| 277 | def VLD4q16b : VLD4WB<0b0100, "16">; |
| 278 | def VLD4q32b : VLD4WB<0b1000, "32">; |
Bob Wilson | b172116 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 279 | |
| 280 | // VLD1LN : Vector Load (single element to one lane) |
| 281 | // FIXME: Not yet implemented. |
Bob Wilson | 004a2e1 | 2009-10-07 18:09:32 +0000 | [diff] [blame] | 282 | |
Bob Wilson | d14b8b6 | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 283 | // VLD2LN : Vector Load (single 2-element structure to one lane) |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 284 | class VLD2LN<bits<4> op11_8, string Dt> |
Johnny Chen | 46f784e | 2009-11-23 18:16:16 +0000 | [diff] [blame] | 285 | : NLdSt<1,0b10,op11_8,{?,?,?,?}, (outs DPR:$dst1, DPR:$dst2), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 286 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, nohash_imm:$lane), |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 287 | IIC_VLD2, "vld2", Dt, "\\{$dst1[$lane], $dst2[$lane]\\}, $addr", |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 288 | "$src1 = $dst1, $src2 = $dst2", []>; |
Bob Wilson | d14b8b6 | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 289 | |
Johnny Chen | 9a5dc8b | 2009-11-19 19:20:17 +0000 | [diff] [blame] | 290 | // vld2 to single-spaced registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 291 | def VLD2LNd8 : VLD2LN<0b0001, "8">; |
| 292 | def VLD2LNd16 : VLD2LN<0b0101, "16"> { let Inst{5} = 0; } |
| 293 | def VLD2LNd32 : VLD2LN<0b1001, "32"> { let Inst{6} = 0; } |
Bob Wilson | 5687d8a | 2009-10-08 18:56:10 +0000 | [diff] [blame] | 294 | |
| 295 | // vld2 to double-spaced even registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 296 | def VLD2LNq16a: VLD2LN<0b0101, "16"> { let Inst{5} = 1; } |
| 297 | def VLD2LNq32a: VLD2LN<0b1001, "32"> { let Inst{6} = 1; } |
Bob Wilson | 5687d8a | 2009-10-08 18:56:10 +0000 | [diff] [blame] | 298 | |
| 299 | // vld2 to double-spaced odd registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 300 | def VLD2LNq16b: VLD2LN<0b0101, "16"> { let Inst{5} = 1; } |
| 301 | def VLD2LNq32b: VLD2LN<0b1001, "32"> { let Inst{6} = 1; } |
Bob Wilson | d14b8b6 | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 302 | |
| 303 | // VLD3LN : Vector Load (single 3-element structure to one lane) |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 304 | class VLD3LN<bits<4> op11_8, string Dt> |
Johnny Chen | 46f784e | 2009-11-23 18:16:16 +0000 | [diff] [blame] | 305 | : NLdSt<1,0b10,op11_8,{?,?,?,?}, (outs DPR:$dst1, DPR:$dst2, DPR:$dst3), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 306 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3, |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 307 | nohash_imm:$lane), IIC_VLD3, "vld3", Dt, |
Bob Wilson | 82dcfa3 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 308 | "\\{$dst1[$lane], $dst2[$lane], $dst3[$lane]\\}, $addr", |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 309 | "$src1 = $dst1, $src2 = $dst2, $src3 = $dst3", []>; |
Bob Wilson | d14b8b6 | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 310 | |
Johnny Chen | 9a5dc8b | 2009-11-19 19:20:17 +0000 | [diff] [blame] | 311 | // vld3 to single-spaced registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 312 | def VLD3LNd8 : VLD3LN<0b0010, "8"> { let Inst{4} = 0; } |
| 313 | def VLD3LNd16 : VLD3LN<0b0110, "16"> { let Inst{5-4} = 0b00; } |
| 314 | def VLD3LNd32 : VLD3LN<0b1010, "32"> { let Inst{6-4} = 0b000; } |
Bob Wilson | 47a1ff6 | 2009-10-08 22:27:33 +0000 | [diff] [blame] | 315 | |
| 316 | // vld3 to double-spaced even registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 317 | def VLD3LNq16a: VLD3LN<0b0110, "16"> { let Inst{5-4} = 0b10; } |
| 318 | def VLD3LNq32a: VLD3LN<0b1010, "32"> { let Inst{6-4} = 0b100; } |
Bob Wilson | 47a1ff6 | 2009-10-08 22:27:33 +0000 | [diff] [blame] | 319 | |
| 320 | // vld3 to double-spaced odd registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 321 | def VLD3LNq16b: VLD3LN<0b0110, "16"> { let Inst{5-4} = 0b10; } |
| 322 | def VLD3LNq32b: VLD3LN<0b1010, "32"> { let Inst{6-4} = 0b100; } |
Bob Wilson | d14b8b6 | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 323 | |
| 324 | // VLD4LN : Vector Load (single 4-element structure to one lane) |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 325 | class VLD4LN<bits<4> op11_8, string Dt> |
Johnny Chen | 46f784e | 2009-11-23 18:16:16 +0000 | [diff] [blame] | 326 | : NLdSt<1,0b10,op11_8,{?,?,?,?}, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 327 | (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, DPR:$dst4), |
| 328 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4, |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 329 | nohash_imm:$lane), IIC_VLD4, "vld4", Dt, |
Bob Wilson | 82dcfa3 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 330 | "\\{$dst1[$lane], $dst2[$lane], $dst3[$lane], $dst4[$lane]\\}, $addr", |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 331 | "$src1 = $dst1, $src2 = $dst2, $src3 = $dst3, $src4 = $dst4", []>; |
Bob Wilson | d14b8b6 | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 332 | |
Johnny Chen | 9a5dc8b | 2009-11-19 19:20:17 +0000 | [diff] [blame] | 333 | // vld4 to single-spaced registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 334 | def VLD4LNd8 : VLD4LN<0b0011, "8">; |
| 335 | def VLD4LNd16 : VLD4LN<0b0111, "16"> { let Inst{5} = 0; } |
| 336 | def VLD4LNd32 : VLD4LN<0b1011, "32"> { let Inst{6} = 0; } |
Bob Wilson | 7a8c6df | 2009-10-08 22:53:57 +0000 | [diff] [blame] | 337 | |
| 338 | // vld4 to double-spaced even registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 339 | def VLD4LNq16a: VLD4LN<0b0111, "16"> { let Inst{5} = 1; } |
| 340 | def VLD4LNq32a: VLD4LN<0b1011, "32"> { let Inst{6} = 1; } |
Bob Wilson | 7a8c6df | 2009-10-08 22:53:57 +0000 | [diff] [blame] | 341 | |
| 342 | // vld4 to double-spaced odd registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 343 | def VLD4LNq16b: VLD4LN<0b0111, "16"> { let Inst{5} = 1; } |
| 344 | def VLD4LNq32b: VLD4LN<0b1011, "32"> { let Inst{6} = 1; } |
Bob Wilson | b172116 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 345 | |
| 346 | // VLD1DUP : Vector Load (single element to all lanes) |
| 347 | // VLD2DUP : Vector Load (single 2-element structure to all lanes) |
| 348 | // VLD3DUP : Vector Load (single 3-element structure to all lanes) |
| 349 | // VLD4DUP : Vector Load (single 4-element structure to all lanes) |
| 350 | // FIXME: Not yet implemented. |
Evan Cheng | 7c8d5ea | 2009-10-01 08:22:27 +0000 | [diff] [blame] | 351 | } // mayLoad = 1, hasExtraDefRegAllocReq = 1 |
Bob Wilson | ee27bec | 2009-08-12 00:49:01 +0000 | [diff] [blame] | 352 | |
Bob Wilson | 6a209cd | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 353 | // VST1 : Vector Store (multiple single elements) |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 354 | class VST1D<bits<4> op7_4, string Dt, ValueType Ty> |
Bob Wilson | b172116 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 355 | : NLdSt<0,0b00,0b0111,op7_4, (outs), (ins addrmode6:$addr, DPR:$src), IIC_VST, |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 356 | "vst1", Dt, "\\{$src\\}, $addr", "", |
| 357 | [(int_arm_neon_vst1 addrmode6:$addr, (Ty DPR:$src))]>; |
| 358 | class VST1Q<bits<4> op7_4, string Dt, ValueType Ty> |
Bob Wilson | b172116 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 359 | : NLdSt<0,0b00,0b1010,op7_4, (outs), (ins addrmode6:$addr, QPR:$src), IIC_VST, |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 360 | "vst1", Dt, "${src:dregpair}, $addr", "", |
| 361 | [(int_arm_neon_vst1 addrmode6:$addr, (Ty QPR:$src))]>; |
Bob Wilson | 6a209cd | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 362 | |
Evan Cheng | 7c8d5ea | 2009-10-01 08:22:27 +0000 | [diff] [blame] | 363 | let hasExtraSrcRegAllocReq = 1 in { |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 364 | def VST1d8 : VST1D<0b0000, "8", v8i8>; |
| 365 | def VST1d16 : VST1D<0b0100, "16", v4i16>; |
| 366 | def VST1d32 : VST1D<0b1000, "32", v2i32>; |
| 367 | def VST1df : VST1D<0b1000, "32", v2f32>; |
| 368 | def VST1d64 : VST1D<0b1100, "64", v1i64>; |
Bob Wilson | 6a209cd | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 369 | |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 370 | def VST1q8 : VST1Q<0b0000, "8", v16i8>; |
| 371 | def VST1q16 : VST1Q<0b0100, "16", v8i16>; |
| 372 | def VST1q32 : VST1Q<0b1000, "32", v4i32>; |
| 373 | def VST1qf : VST1Q<0b1000, "32", v4f32>; |
| 374 | def VST1q64 : VST1Q<0b1100, "64", v2i64>; |
Evan Cheng | 7c8d5ea | 2009-10-01 08:22:27 +0000 | [diff] [blame] | 375 | } // hasExtraSrcRegAllocReq |
Bob Wilson | 6a209cd | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 376 | |
Johnny Chen | 30c6aeb | 2010-02-24 02:57:20 +0000 | [diff] [blame] | 377 | // These (dreg triple/quadruple) are for disassembly only. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 378 | class VST1D3<bits<4> op7_4, string Dt> |
Johnny Chen | 30c6aeb | 2010-02-24 02:57:20 +0000 | [diff] [blame] | 379 | : NLdSt<0, 0b00, 0b0110, op7_4, (outs), |
| 380 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3), IIC_VST, |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 381 | "vst1", Dt, "\\{$src1, $src2, $src3\\}, $addr", "", |
Johnny Chen | 30c6aeb | 2010-02-24 02:57:20 +0000 | [diff] [blame] | 382 | [/* For disassembly only; pattern left blank */]>; |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 383 | class VST1D4<bits<4> op7_4, string Dt> |
Johnny Chen | 30c6aeb | 2010-02-24 02:57:20 +0000 | [diff] [blame] | 384 | : NLdSt<0, 0b00, 0b0010, op7_4, (outs), |
| 385 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4), |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 386 | IIC_VST, "vst1", Dt, "\\{$src1, $src2, $src3, $src4\\}, $addr", "", |
Johnny Chen | 30c6aeb | 2010-02-24 02:57:20 +0000 | [diff] [blame] | 387 | [/* For disassembly only; pattern left blank */]>; |
| 388 | |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 389 | def VST1d8T : VST1D3<0b0000, "8">; |
| 390 | def VST1d16T : VST1D3<0b0100, "16">; |
| 391 | def VST1d32T : VST1D3<0b1000, "32">; |
| 392 | //def VST1d64T : VST1D3<0b1100, "64">; |
Johnny Chen | 30c6aeb | 2010-02-24 02:57:20 +0000 | [diff] [blame] | 393 | |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 394 | def VST1d8Q : VST1D4<0b0000, "8">; |
| 395 | def VST1d16Q : VST1D4<0b0100, "16">; |
| 396 | def VST1d32Q : VST1D4<0b1000, "32">; |
| 397 | //def VST1d64Q : VST1D4<0b1100, "64">; |
Johnny Chen | 30c6aeb | 2010-02-24 02:57:20 +0000 | [diff] [blame] | 398 | |
| 399 | |
Evan Cheng | 7c8d5ea | 2009-10-01 08:22:27 +0000 | [diff] [blame] | 400 | let mayStore = 1, hasExtraSrcRegAllocReq = 1 in { |
Bob Wilson | 66b3400 | 2009-08-12 17:04:56 +0000 | [diff] [blame] | 401 | |
Bob Wilson | 6a209cd | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 402 | // VST2 : Vector Store (multiple 2-element structures) |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 403 | class VST2D<bits<4> op7_4, string Dt> |
Bob Wilson | b172116 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 404 | : NLdSt<0,0b00,0b1000,op7_4, (outs), |
| 405 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2), IIC_VST, |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 406 | "vst2", Dt, "\\{$src1, $src2\\}, $addr", "", []>; |
| 407 | class VST2Q<bits<4> op7_4, string Dt> |
Bob Wilson | b172116 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 408 | : NLdSt<0,0b00,0b0011,op7_4, (outs), |
| 409 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4), |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 410 | IIC_VST, "vst2", Dt, "\\{$src1, $src2, $src3, $src4\\}, $addr", |
Bob Wilson | 5fa67d35 | 2009-10-07 18:47:39 +0000 | [diff] [blame] | 411 | "", []>; |
Bob Wilson | 6a209cd | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 412 | |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 413 | def VST2d8 : VST2D<0b0000, "8">; |
| 414 | def VST2d16 : VST2D<0b0100, "16">; |
| 415 | def VST2d32 : VST2D<0b1000, "32">; |
Bob Wilson | dd43d1e | 2009-10-08 00:21:01 +0000 | [diff] [blame] | 416 | def VST2d64 : NLdSt<0,0b00,0b1010,0b1100, (outs), |
| 417 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2), IIC_VST, |
Bob Wilson | 82dcfa3 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 418 | "vst1", "64", "\\{$src1, $src2\\}, $addr", "", []>; |
Bob Wilson | 6a209cd | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 419 | |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 420 | def VST2q8 : VST2Q<0b0000, "8">; |
| 421 | def VST2q16 : VST2Q<0b0100, "16">; |
| 422 | def VST2q32 : VST2Q<0b1000, "32">; |
Bob Wilson | 5fa67d35 | 2009-10-07 18:47:39 +0000 | [diff] [blame] | 423 | |
Johnny Chen | 30c6aeb | 2010-02-24 02:57:20 +0000 | [diff] [blame] | 424 | // These (double-spaced dreg pair) are for disassembly only. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 425 | class VST2Ddbl<bits<4> op7_4, string Dt> |
Johnny Chen | 30c6aeb | 2010-02-24 02:57:20 +0000 | [diff] [blame] | 426 | : NLdSt<0, 0b00, 0b1001, op7_4, (outs), |
| 427 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2), IIC_VST, |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 428 | "vst2", Dt, "\\{$src1, $src2\\}, $addr", "", []>; |
Johnny Chen | 30c6aeb | 2010-02-24 02:57:20 +0000 | [diff] [blame] | 429 | |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 430 | def VST2d8D : VST2Ddbl<0b0000, "8">; |
| 431 | def VST2d16D : VST2Ddbl<0b0100, "16">; |
| 432 | def VST2d32D : VST2Ddbl<0b1000, "32">; |
Johnny Chen | 30c6aeb | 2010-02-24 02:57:20 +0000 | [diff] [blame] | 433 | |
Bob Wilson | 6a209cd | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 434 | // VST3 : Vector Store (multiple 3-element structures) |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 435 | class VST3D<bits<4> op7_4, string Dt> |
Bob Wilson | b172116 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 436 | : NLdSt<0,0b00,0b0100,op7_4, (outs), |
| 437 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3), IIC_VST, |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 438 | "vst3", Dt, "\\{$src1, $src2, $src3\\}, $addr", "", []>; |
| 439 | class VST3WB<bits<4> op7_4, string Dt> |
Bob Wilson | b172116 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 440 | : NLdSt<0,0b00,0b0101,op7_4, (outs GPR:$wb), |
| 441 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3), IIC_VST, |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 442 | "vst3", Dt, "\\{$src1, $src2, $src3\\}, $addr", |
Johnny Chen | 7c3f386 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 443 | "$addr.addr = $wb", []>; |
Bob Wilson | 6a209cd | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 444 | |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 445 | def VST3d8 : VST3D<0b0000, "8">; |
| 446 | def VST3d16 : VST3D<0b0100, "16">; |
| 447 | def VST3d32 : VST3D<0b1000, "32">; |
Bob Wilson | 7200e5d | 2009-10-08 00:28:28 +0000 | [diff] [blame] | 448 | def VST3d64 : NLdSt<0,0b00,0b0110,0b1100, (outs), |
| 449 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3), |
| 450 | IIC_VST, |
Bob Wilson | 82dcfa3 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 451 | "vst1", "64", "\\{$src1, $src2, $src3\\}, $addr", "", []>; |
Bob Wilson | 6a209cd | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 452 | |
Bob Wilson | 2a85bd1 | 2009-10-07 20:30:08 +0000 | [diff] [blame] | 453 | // vst3 to double-spaced even registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 454 | def VST3q8a : VST3WB<0b0000, "8">; |
| 455 | def VST3q16a : VST3WB<0b0100, "16">; |
| 456 | def VST3q32a : VST3WB<0b1000, "32">; |
Bob Wilson | 2a85bd1 | 2009-10-07 20:30:08 +0000 | [diff] [blame] | 457 | |
| 458 | // vst3 to double-spaced odd registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 459 | def VST3q8b : VST3WB<0b0000, "8">; |
| 460 | def VST3q16b : VST3WB<0b0100, "16">; |
| 461 | def VST3q32b : VST3WB<0b1000, "32">; |
Bob Wilson | 2a85bd1 | 2009-10-07 20:30:08 +0000 | [diff] [blame] | 462 | |
Bob Wilson | 6a209cd | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 463 | // VST4 : Vector Store (multiple 4-element structures) |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 464 | class VST4D<bits<4> op7_4, string Dt> |
Bob Wilson | b172116 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 465 | : NLdSt<0,0b00,0b0000,op7_4, (outs), |
| 466 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4), |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 467 | IIC_VST, "vst4", Dt, "\\{$src1, $src2, $src3, $src4\\}, $addr", |
Bob Wilson | 316062a | 2009-08-25 17:46:06 +0000 | [diff] [blame] | 468 | "", []>; |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 469 | class VST4WB<bits<4> op7_4, string Dt> |
Bob Wilson | b172116 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 470 | : NLdSt<0,0b00,0b0001,op7_4, (outs GPR:$wb), |
| 471 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4), |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 472 | IIC_VST, "vst4", Dt, "\\{$src1, $src2, $src3, $src4\\}, $addr", |
Johnny Chen | 7c3f386 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 473 | "$addr.addr = $wb", []>; |
Bob Wilson | 6a209cd | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 474 | |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 475 | def VST4d8 : VST4D<0b0000, "8">; |
| 476 | def VST4d16 : VST4D<0b0100, "16">; |
| 477 | def VST4d32 : VST4D<0b1000, "32">; |
Bob Wilson | 94b5d43 | 2009-10-08 05:18:18 +0000 | [diff] [blame] | 478 | def VST4d64 : NLdSt<0,0b00,0b0010,0b1100, (outs), |
| 479 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3, |
| 480 | DPR:$src4), IIC_VST, |
Bob Wilson | 82dcfa3 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 481 | "vst1", "64", "\\{$src1, $src2, $src3, $src4\\}, $addr", |
| 482 | "", []>; |
Bob Wilson | c2d6585 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 483 | |
Bob Wilson | 931c76b | 2009-10-07 20:49:18 +0000 | [diff] [blame] | 484 | // vst4 to double-spaced even registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 485 | def VST4q8a : VST4WB<0b0000, "8">; |
| 486 | def VST4q16a : VST4WB<0b0100, "16">; |
| 487 | def VST4q32a : VST4WB<0b1000, "32">; |
Bob Wilson | 931c76b | 2009-10-07 20:49:18 +0000 | [diff] [blame] | 488 | |
| 489 | // vst4 to double-spaced odd registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 490 | def VST4q8b : VST4WB<0b0000, "8">; |
| 491 | def VST4q16b : VST4WB<0b0100, "16">; |
| 492 | def VST4q32b : VST4WB<0b1000, "32">; |
Bob Wilson | b172116 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 493 | |
| 494 | // VST1LN : Vector Store (single element from one lane) |
| 495 | // FIXME: Not yet implemented. |
Bob Wilson | 931c76b | 2009-10-07 20:49:18 +0000 | [diff] [blame] | 496 | |
Bob Wilson | c2d6585 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 497 | // VST2LN : Vector Store (single 2-element structure from one lane) |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 498 | class VST2LN<bits<4> op11_8, string Dt> |
Johnny Chen | 46f784e | 2009-11-23 18:16:16 +0000 | [diff] [blame] | 499 | : NLdSt<1,0b00,op11_8,{?,?,?,?}, (outs), |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 500 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, nohash_imm:$lane), |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 501 | IIC_VST, "vst2", Dt, "\\{$src1[$lane], $src2[$lane]\\}, $addr", |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 502 | "", []>; |
Bob Wilson | c2d6585 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 503 | |
Johnny Chen | 9a5dc8b | 2009-11-19 19:20:17 +0000 | [diff] [blame] | 504 | // vst2 to single-spaced registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 505 | def VST2LNd8 : VST2LN<0b0001, "8">; |
| 506 | def VST2LNd16 : VST2LN<0b0101, "16"> { let Inst{5} = 0; } |
| 507 | def VST2LNd32 : VST2LN<0b1001, "32"> { let Inst{6} = 0; } |
Bob Wilson | 18e94a7 | 2009-10-08 23:38:24 +0000 | [diff] [blame] | 508 | |
| 509 | // vst2 to double-spaced even registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 510 | def VST2LNq16a: VST2LN<0b0101, "16"> { let Inst{5} = 1; } |
| 511 | def VST2LNq32a: VST2LN<0b1001, "32"> { let Inst{6} = 1; } |
Bob Wilson | 18e94a7 | 2009-10-08 23:38:24 +0000 | [diff] [blame] | 512 | |
| 513 | // vst2 to double-spaced odd registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 514 | def VST2LNq16b: VST2LN<0b0101, "16"> { let Inst{5} = 1; } |
| 515 | def VST2LNq32b: VST2LN<0b1001, "32"> { let Inst{6} = 1; } |
Bob Wilson | c2d6585 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 516 | |
| 517 | // VST3LN : Vector Store (single 3-element structure from one lane) |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 518 | class VST3LN<bits<4> op11_8, string Dt> |
Johnny Chen | 46f784e | 2009-11-23 18:16:16 +0000 | [diff] [blame] | 519 | : NLdSt<1,0b00,op11_8,{?,?,?,?}, (outs), |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 520 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3, |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 521 | nohash_imm:$lane), IIC_VST, "vst3", Dt, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 522 | "\\{$src1[$lane], $src2[$lane], $src3[$lane]\\}, $addr", "", []>; |
Bob Wilson | c2d6585 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 523 | |
Johnny Chen | 9a5dc8b | 2009-11-19 19:20:17 +0000 | [diff] [blame] | 524 | // vst3 to single-spaced registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 525 | def VST3LNd8 : VST3LN<0b0010, "8"> { let Inst{4} = 0; } |
| 526 | def VST3LNd16 : VST3LN<0b0110, "16"> { let Inst{5-4} = 0b00; } |
| 527 | def VST3LNd32 : VST3LN<0b1010, "32"> { let Inst{6-4} = 0b000; } |
Bob Wilson | dbffb21 | 2009-10-08 23:51:31 +0000 | [diff] [blame] | 528 | |
| 529 | // vst3 to double-spaced even registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 530 | def VST3LNq16a: VST3LN<0b0110, "16"> { let Inst{5-4} = 0b10; } |
| 531 | def VST3LNq32a: VST3LN<0b1010, "32"> { let Inst{6-4} = 0b100; } |
Bob Wilson | dbffb21 | 2009-10-08 23:51:31 +0000 | [diff] [blame] | 532 | |
| 533 | // vst3 to double-spaced odd registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 534 | def VST3LNq16b: VST3LN<0b0110, "16"> { let Inst{5-4} = 0b10; } |
| 535 | def VST3LNq32b: VST3LN<0b1010, "32"> { let Inst{6-4} = 0b100; } |
Bob Wilson | c2d6585 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 536 | |
| 537 | // VST4LN : Vector Store (single 4-element structure from one lane) |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 538 | class VST4LN<bits<4> op11_8, string Dt> |
Johnny Chen | 46f784e | 2009-11-23 18:16:16 +0000 | [diff] [blame] | 539 | : NLdSt<1,0b00,op11_8,{?,?,?,?}, (outs), |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 540 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4, |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 541 | nohash_imm:$lane), IIC_VST, "vst4", Dt, |
Bob Wilson | 82dcfa3 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 542 | "\\{$src1[$lane], $src2[$lane], $src3[$lane], $src4[$lane]\\}, $addr", |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 543 | "", []>; |
Bob Wilson | c2d6585 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 544 | |
Johnny Chen | 9a5dc8b | 2009-11-19 19:20:17 +0000 | [diff] [blame] | 545 | // vst4 to single-spaced registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 546 | def VST4LNd8 : VST4LN<0b0011, "8">; |
| 547 | def VST4LNd16 : VST4LN<0b0111, "16"> { let Inst{5} = 0; } |
| 548 | def VST4LNd32 : VST4LN<0b1011, "32"> { let Inst{6} = 0; } |
Bob Wilson | c7692e0 | 2009-10-09 00:01:36 +0000 | [diff] [blame] | 549 | |
| 550 | // vst4 to double-spaced even registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 551 | def VST4LNq16a: VST4LN<0b0111, "16"> { let Inst{5} = 1; } |
| 552 | def VST4LNq32a: VST4LN<0b1011, "32"> { let Inst{6} = 1; } |
Bob Wilson | c7692e0 | 2009-10-09 00:01:36 +0000 | [diff] [blame] | 553 | |
| 554 | // vst4 to double-spaced odd registers. |
Bob Wilson | 7070982 | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 555 | def VST4LNq16b: VST4LN<0b0111, "16"> { let Inst{5} = 1; } |
| 556 | def VST4LNq32b: VST4LN<0b1011, "32"> { let Inst{6} = 1; } |
Bob Wilson | c7692e0 | 2009-10-09 00:01:36 +0000 | [diff] [blame] | 557 | |
Evan Cheng | 7c8d5ea | 2009-10-01 08:22:27 +0000 | [diff] [blame] | 558 | } // mayStore = 1, hasExtraSrcRegAllocReq = 1 |
Bob Wilson | 6a209cd | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 559 | |
Bob Wilson | ed592c0 | 2009-07-08 18:11:30 +0000 | [diff] [blame] | 560 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 561 | //===----------------------------------------------------------------------===// |
| 562 | // NEON pattern fragments |
| 563 | //===----------------------------------------------------------------------===// |
| 564 | |
| 565 | // Extract D sub-registers of Q registers. |
| 566 | // (arm_dsubreg_0 is 5; arm_dsubreg_1 is 6) |
Anton Korobeynikov | 49284e7 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 567 | def DSubReg_i8_reg : SDNodeXForm<imm, [{ |
Owen Anderson | 36e3a6e | 2009-08-11 20:47:22 +0000 | [diff] [blame] | 568 | return CurDAG->getTargetConstant(5 + N->getZExtValue() / 8, MVT::i32); |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 569 | }]>; |
Anton Korobeynikov | 49284e7 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 570 | def DSubReg_i16_reg : SDNodeXForm<imm, [{ |
Owen Anderson | 36e3a6e | 2009-08-11 20:47:22 +0000 | [diff] [blame] | 571 | return CurDAG->getTargetConstant(5 + N->getZExtValue() / 4, MVT::i32); |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 572 | }]>; |
Anton Korobeynikov | 49284e7 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 573 | def DSubReg_i32_reg : SDNodeXForm<imm, [{ |
Owen Anderson | 36e3a6e | 2009-08-11 20:47:22 +0000 | [diff] [blame] | 574 | return CurDAG->getTargetConstant(5 + N->getZExtValue() / 2, MVT::i32); |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 575 | }]>; |
Anton Korobeynikov | 49284e7 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 576 | def DSubReg_f64_reg : SDNodeXForm<imm, [{ |
Owen Anderson | 36e3a6e | 2009-08-11 20:47:22 +0000 | [diff] [blame] | 577 | return CurDAG->getTargetConstant(5 + N->getZExtValue(), MVT::i32); |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 578 | }]>; |
Anton Korobeynikov | b261a19 | 2009-09-02 21:21:28 +0000 | [diff] [blame] | 579 | def DSubReg_f64_other_reg : SDNodeXForm<imm, [{ |
| 580 | return CurDAG->getTargetConstant(5 + (1 - N->getZExtValue()), MVT::i32); |
| 581 | }]>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 582 | |
Anton Korobeynikov | 44e0a6c | 2009-08-28 23:41:26 +0000 | [diff] [blame] | 583 | // Extract S sub-registers of Q/D registers. |
Anton Korobeynikov | 49284e7 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 584 | // (arm_ssubreg_0 is 1; arm_ssubreg_1 is 2; etc.) |
| 585 | def SSubReg_f32_reg : SDNodeXForm<imm, [{ |
Owen Anderson | 36e3a6e | 2009-08-11 20:47:22 +0000 | [diff] [blame] | 586 | return CurDAG->getTargetConstant(1 + N->getZExtValue(), MVT::i32); |
Anton Korobeynikov | 49284e7 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 587 | }]>; |
| 588 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 589 | // Translate lane numbers from Q registers to D subregs. |
| 590 | def SubReg_i8_lane : SDNodeXForm<imm, [{ |
Owen Anderson | 36e3a6e | 2009-08-11 20:47:22 +0000 | [diff] [blame] | 591 | return CurDAG->getTargetConstant(N->getZExtValue() & 7, MVT::i32); |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 592 | }]>; |
| 593 | def SubReg_i16_lane : SDNodeXForm<imm, [{ |
Owen Anderson | 36e3a6e | 2009-08-11 20:47:22 +0000 | [diff] [blame] | 594 | return CurDAG->getTargetConstant(N->getZExtValue() & 3, MVT::i32); |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 595 | }]>; |
| 596 | def SubReg_i32_lane : SDNodeXForm<imm, [{ |
Owen Anderson | 36e3a6e | 2009-08-11 20:47:22 +0000 | [diff] [blame] | 597 | return CurDAG->getTargetConstant(N->getZExtValue() & 1, MVT::i32); |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 598 | }]>; |
| 599 | |
| 600 | //===----------------------------------------------------------------------===// |
| 601 | // Instruction Classes |
| 602 | //===----------------------------------------------------------------------===// |
| 603 | |
Bob Wilson | 154999f | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 604 | // Basic 2-register operations: single-, double- and quad-register. |
| 605 | class N2VS<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, |
| 606 | bits<2> op17_16, bits<5> op11_7, bit op4, string OpcodeStr, |
| 607 | string Dt, ValueType ResTy, ValueType OpTy, SDNode OpNode> |
| 608 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, |
| 609 | (outs DPR_VFP2:$dst), (ins DPR_VFP2:$src), |
| 610 | IIC_VUNAD, OpcodeStr, Dt, "$dst, $src", "", []>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 611 | class N2VD<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, |
Bob Wilson | 154999f | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 612 | bits<2> op17_16, bits<5> op11_7, bit op4, string OpcodeStr, |
| 613 | string Dt, ValueType ResTy, ValueType OpTy, SDNode OpNode> |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 614 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, (outs DPR:$dst), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 615 | (ins DPR:$src), IIC_VUNAD, OpcodeStr, Dt, "$dst, $src", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 616 | [(set DPR:$dst, (ResTy (OpNode (OpTy DPR:$src))))]>; |
| 617 | class N2VQ<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, |
Bob Wilson | 154999f | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 618 | bits<2> op17_16, bits<5> op11_7, bit op4, string OpcodeStr, |
| 619 | string Dt, ValueType ResTy, ValueType OpTy, SDNode OpNode> |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 620 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 1, op4, (outs QPR:$dst), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 621 | (ins QPR:$src), IIC_VUNAQ, OpcodeStr, Dt, "$dst, $src", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 622 | [(set QPR:$dst, (ResTy (OpNode (OpTy QPR:$src))))]>; |
| 623 | |
Bob Wilson | 7c7fe6e | 2010-02-17 22:42:54 +0000 | [diff] [blame] | 624 | // Basic 2-register intrinsics, both double- and quad-register. |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 625 | class N2VDInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 626 | bits<2> op17_16, bits<5> op11_7, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 627 | InstrItinClass itin, string OpcodeStr, string Dt, |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 628 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
| 629 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, (outs DPR:$dst), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 630 | (ins DPR:$src), itin, OpcodeStr, Dt, "$dst, $src", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 631 | [(set DPR:$dst, (ResTy (IntOp (OpTy DPR:$src))))]>; |
| 632 | class N2VQInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 633 | bits<2> op17_16, bits<5> op11_7, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 634 | InstrItinClass itin, string OpcodeStr, string Dt, |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 635 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
| 636 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 1, op4, (outs QPR:$dst), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 637 | (ins QPR:$src), itin, OpcodeStr, Dt, "$dst, $src", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 638 | [(set QPR:$dst, (ResTy (IntOp (OpTy QPR:$src))))]>; |
| 639 | |
| 640 | // Narrow 2-register intrinsics. |
| 641 | class N2VNInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, |
| 642 | bits<2> op17_16, bits<5> op11_7, bit op6, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 643 | InstrItinClass itin, string OpcodeStr, string Dt, |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 644 | ValueType TyD, ValueType TyQ, Intrinsic IntOp> |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 645 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, op6, op4, (outs DPR:$dst), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 646 | (ins QPR:$src), itin, OpcodeStr, Dt, "$dst, $src", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 647 | [(set DPR:$dst, (TyD (IntOp (TyQ QPR:$src))))]>; |
| 648 | |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 649 | // Long 2-register intrinsics (currently only used for VMOVL). |
| 650 | class N2VLInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, |
| 651 | bits<2> op17_16, bits<5> op11_7, bit op6, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 652 | InstrItinClass itin, string OpcodeStr, string Dt, |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 653 | ValueType TyQ, ValueType TyD, Intrinsic IntOp> |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 654 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, op6, op4, (outs QPR:$dst), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 655 | (ins DPR:$src), itin, OpcodeStr, Dt, "$dst, $src", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 656 | [(set QPR:$dst, (TyQ (IntOp (TyD DPR:$src))))]>; |
| 657 | |
Bob Wilson | c1eaa4d | 2009-08-08 06:13:25 +0000 | [diff] [blame] | 658 | // 2-register shuffles (VTRN/VZIP/VUZP), both double- and quad-register. |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 659 | class N2VDShuffle<bits<2> op19_18, bits<5> op11_7, string OpcodeStr, string Dt> |
Bob Wilson | c1eaa4d | 2009-08-08 06:13:25 +0000 | [diff] [blame] | 660 | : N2V<0b11, 0b11, op19_18, 0b10, op11_7, 0, 0, (outs DPR:$dst1, DPR:$dst2), |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 661 | (ins DPR:$src1, DPR:$src2), IIC_VPERMD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 662 | OpcodeStr, Dt, "$dst1, $dst2", |
Johnny Chen | 7c3f386 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 663 | "$src1 = $dst1, $src2 = $dst2", []>; |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 664 | class N2VQShuffle<bits<2> op19_18, bits<5> op11_7, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 665 | InstrItinClass itin, string OpcodeStr, string Dt> |
Bob Wilson | c1eaa4d | 2009-08-08 06:13:25 +0000 | [diff] [blame] | 666 | : N2V<0b11, 0b11, op19_18, 0b10, op11_7, 1, 0, (outs QPR:$dst1, QPR:$dst2), |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 667 | (ins QPR:$src1, QPR:$src2), itin, OpcodeStr, Dt, "$dst1, $dst2", |
Johnny Chen | 7c3f386 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 668 | "$src1 = $dst1, $src2 = $dst2", []>; |
Bob Wilson | c1eaa4d | 2009-08-08 06:13:25 +0000 | [diff] [blame] | 669 | |
Bob Wilson | 154999f | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 670 | // Basic 3-register operations: single-, double- and quad-register. |
| 671 | class N3VS<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| 672 | string OpcodeStr, string Dt, ValueType ResTy, ValueType OpTy, |
| 673 | SDNode OpNode, bit Commutable> |
| 674 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
| 675 | (outs DPR_VFP2:$dst), (ins DPR_VFP2:$src1, DPR_VFP2:$src2), IIC_VBIND, |
| 676 | OpcodeStr, Dt, "$dst, $src1, $src2", "", []> { |
| 677 | let isCommutable = Commutable; |
| 678 | } |
| 679 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 680 | class N3VD<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 681 | InstrItinClass itin, string OpcodeStr, string Dt, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 682 | ValueType ResTy, ValueType OpTy, SDNode OpNode, bit Commutable> |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 683 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 684 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2), itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 685 | OpcodeStr, Dt, "$dst, $src1, $src2", "", |
| 686 | [(set DPR:$dst, (ResTy (OpNode (OpTy DPR:$src1), (OpTy DPR:$src2))))]> { |
| 687 | let isCommutable = Commutable; |
| 688 | } |
| 689 | // Same as N3VD but no data type. |
| 690 | class N3VDX<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| 691 | InstrItinClass itin, string OpcodeStr, |
| 692 | ValueType ResTy, ValueType OpTy, |
| 693 | SDNode OpNode, bit Commutable> |
| 694 | : N3VX<op24, op23, op21_20, op11_8, 0, op4, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 695 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2), itin, |
| 696 | OpcodeStr, "$dst, $src1, $src2", "", |
| 697 | [(set DPR:$dst, (ResTy (OpNode (OpTy DPR:$src1), (OpTy DPR:$src2))))]>{ |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 698 | let isCommutable = Commutable; |
| 699 | } |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 700 | class N3VDSL<bits<2> op21_20, bits<4> op11_8, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 701 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 702 | ValueType Ty, SDNode ShOp> |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 703 | : N3V<0, 1, op21_20, op11_8, 1, 0, |
| 704 | (outs DPR:$dst), (ins DPR:$src1, DPR_VFP2:$src2, nohash_imm:$lane), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 705 | itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 706 | [(set (Ty DPR:$dst), |
| 707 | (Ty (ShOp (Ty DPR:$src1), |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 708 | (Ty (NEONvduplane (Ty DPR_VFP2:$src2), imm:$lane)))))]>{ |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 709 | let isCommutable = 0; |
| 710 | } |
| 711 | class N3VDSL16<bits<2> op21_20, bits<4> op11_8, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 712 | string OpcodeStr, string Dt, ValueType Ty, SDNode ShOp> |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 713 | : N3V<0, 1, op21_20, op11_8, 1, 0, |
| 714 | (outs DPR:$dst), (ins DPR:$src1, DPR_8:$src2, nohash_imm:$lane), |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 715 | IIC_VMULi16D, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 716 | [(set (Ty DPR:$dst), |
| 717 | (Ty (ShOp (Ty DPR:$src1), |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 718 | (Ty (NEONvduplane (Ty DPR_8:$src2), imm:$lane)))))]> { |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 719 | let isCommutable = 0; |
| 720 | } |
| 721 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 722 | class N3VQ<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 723 | InstrItinClass itin, string OpcodeStr, string Dt, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 724 | ValueType ResTy, ValueType OpTy, SDNode OpNode, bit Commutable> |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 725 | : N3V<op24, op23, op21_20, op11_8, 1, op4, |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 726 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2), itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 727 | OpcodeStr, Dt, "$dst, $src1, $src2", "", |
| 728 | [(set QPR:$dst, (ResTy (OpNode (OpTy QPR:$src1), (OpTy QPR:$src2))))]> { |
| 729 | let isCommutable = Commutable; |
| 730 | } |
| 731 | class N3VQX<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| 732 | InstrItinClass itin, string OpcodeStr, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 733 | ValueType ResTy, ValueType OpTy, SDNode OpNode, bit Commutable> |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 734 | : N3VX<op24, op23, op21_20, op11_8, 1, op4, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 735 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2), itin, |
| 736 | OpcodeStr, "$dst, $src1, $src2", "", |
| 737 | [(set QPR:$dst, (ResTy (OpNode (OpTy QPR:$src1), (OpTy QPR:$src2))))]>{ |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 738 | let isCommutable = Commutable; |
| 739 | } |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 740 | class N3VQSL<bits<2> op21_20, bits<4> op11_8, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 741 | InstrItinClass itin, string OpcodeStr, string Dt, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 742 | ValueType ResTy, ValueType OpTy, SDNode ShOp> |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 743 | : N3V<1, 1, op21_20, op11_8, 1, 0, |
| 744 | (outs QPR:$dst), (ins QPR:$src1, DPR_VFP2:$src2, nohash_imm:$lane), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 745 | itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 746 | [(set (ResTy QPR:$dst), |
| 747 | (ResTy (ShOp (ResTy QPR:$src1), |
| 748 | (ResTy (NEONvduplane (OpTy DPR_VFP2:$src2), |
| 749 | imm:$lane)))))]> { |
| 750 | let isCommutable = 0; |
| 751 | } |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 752 | class N3VQSL16<bits<2> op21_20, bits<4> op11_8, string OpcodeStr, string Dt, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 753 | ValueType ResTy, ValueType OpTy, SDNode ShOp> |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 754 | : N3V<1, 1, op21_20, op11_8, 1, 0, |
| 755 | (outs QPR:$dst), (ins QPR:$src1, DPR_8:$src2, nohash_imm:$lane), |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 756 | IIC_VMULi16Q, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 757 | [(set (ResTy QPR:$dst), |
| 758 | (ResTy (ShOp (ResTy QPR:$src1), |
| 759 | (ResTy (NEONvduplane (OpTy DPR_8:$src2), |
| 760 | imm:$lane)))))]> { |
| 761 | let isCommutable = 0; |
| 762 | } |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 763 | |
| 764 | // Basic 3-register intrinsics, both double- and quad-register. |
| 765 | class N3VDInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 766 | InstrItinClass itin, string OpcodeStr, string Dt, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 767 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp, bit Commutable> |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 768 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 769 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2), itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 770 | OpcodeStr, Dt, "$dst, $src1, $src2", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 771 | [(set DPR:$dst, (ResTy (IntOp (OpTy DPR:$src1), (OpTy DPR:$src2))))]> { |
| 772 | let isCommutable = Commutable; |
| 773 | } |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 774 | class N3VDIntSL<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 775 | string OpcodeStr, string Dt, ValueType Ty, Intrinsic IntOp> |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 776 | : N3V<0, 1, op21_20, op11_8, 1, 0, |
| 777 | (outs DPR:$dst), (ins DPR:$src1, DPR_VFP2:$src2, nohash_imm:$lane), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 778 | itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 779 | [(set (Ty DPR:$dst), |
| 780 | (Ty (IntOp (Ty DPR:$src1), |
| 781 | (Ty (NEONvduplane (Ty DPR_VFP2:$src2), |
| 782 | imm:$lane)))))]> { |
| 783 | let isCommutable = 0; |
| 784 | } |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 785 | class N3VDIntSL16<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 786 | string OpcodeStr, string Dt, ValueType Ty, Intrinsic IntOp> |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 787 | : N3V<0, 1, op21_20, op11_8, 1, 0, |
| 788 | (outs DPR:$dst), (ins DPR:$src1, DPR_8:$src2, nohash_imm:$lane), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 789 | itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 790 | [(set (Ty DPR:$dst), |
| 791 | (Ty (IntOp (Ty DPR:$src1), |
| 792 | (Ty (NEONvduplane (Ty DPR_8:$src2), |
| 793 | imm:$lane)))))]> { |
| 794 | let isCommutable = 0; |
| 795 | } |
| 796 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 797 | class N3VQInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 798 | InstrItinClass itin, string OpcodeStr, string Dt, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 799 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp, bit Commutable> |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 800 | : N3V<op24, op23, op21_20, op11_8, 1, op4, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 801 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2), itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 802 | OpcodeStr, Dt, "$dst, $src1, $src2", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 803 | [(set QPR:$dst, (ResTy (IntOp (OpTy QPR:$src1), (OpTy QPR:$src2))))]> { |
| 804 | let isCommutable = Commutable; |
| 805 | } |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 806 | class N3VQIntSL<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 807 | string OpcodeStr, string Dt, |
| 808 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 809 | : N3V<1, 1, op21_20, op11_8, 1, 0, |
| 810 | (outs QPR:$dst), (ins QPR:$src1, DPR_VFP2:$src2, nohash_imm:$lane), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 811 | itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 812 | [(set (ResTy QPR:$dst), |
| 813 | (ResTy (IntOp (ResTy QPR:$src1), |
| 814 | (ResTy (NEONvduplane (OpTy DPR_VFP2:$src2), |
| 815 | imm:$lane)))))]> { |
| 816 | let isCommutable = 0; |
| 817 | } |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 818 | class N3VQIntSL16<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 819 | string OpcodeStr, string Dt, |
| 820 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 821 | : N3V<1, 1, op21_20, op11_8, 1, 0, |
| 822 | (outs QPR:$dst), (ins QPR:$src1, DPR_8:$src2, nohash_imm:$lane), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 823 | itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 824 | [(set (ResTy QPR:$dst), |
| 825 | (ResTy (IntOp (ResTy QPR:$src1), |
| 826 | (ResTy (NEONvduplane (OpTy DPR_8:$src2), |
| 827 | imm:$lane)))))]> { |
| 828 | let isCommutable = 0; |
| 829 | } |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 830 | |
Bob Wilson | 154999f | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 831 | // Multiply-Add/Sub operations: single-, double- and quad-register. |
| 832 | class N3VSMulOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
| 833 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 834 | ValueType Ty, SDNode MulOp, SDNode OpNode> |
| 835 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
| 836 | (outs DPR_VFP2:$dst), |
| 837 | (ins DPR_VFP2:$src1, DPR_VFP2:$src2, DPR_VFP2:$src3), itin, |
| 838 | OpcodeStr, Dt, "$dst, $src2, $src3", "$src1 = $dst", []>; |
| 839 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 840 | class N3VDMulOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 841 | InstrItinClass itin, string OpcodeStr, string Dt, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 842 | ValueType Ty, SDNode MulOp, SDNode OpNode> |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 843 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 844 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2, DPR:$src3), itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 845 | OpcodeStr, Dt, "$dst, $src2, $src3", "$src1 = $dst", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 846 | [(set DPR:$dst, (Ty (OpNode DPR:$src1, |
| 847 | (Ty (MulOp DPR:$src2, DPR:$src3)))))]>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 848 | class N3VDMulOpSL<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 849 | string OpcodeStr, string Dt, |
| 850 | ValueType Ty, SDNode MulOp, SDNode ShOp> |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 851 | : N3V<0, 1, op21_20, op11_8, 1, 0, |
| 852 | (outs DPR:$dst), |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 853 | (ins DPR:$src1, DPR:$src2, DPR_VFP2:$src3, nohash_imm:$lane), itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 854 | OpcodeStr, Dt, "$dst, $src2, $src3[$lane]", "$src1 = $dst", |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 855 | [(set (Ty DPR:$dst), |
| 856 | (Ty (ShOp (Ty DPR:$src1), |
| 857 | (Ty (MulOp DPR:$src2, |
| 858 | (Ty (NEONvduplane (Ty DPR_VFP2:$src3), |
Johnny Chen | 7c3f386 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 859 | imm:$lane)))))))]>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 860 | class N3VDMulOpSL16<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 861 | string OpcodeStr, string Dt, |
| 862 | ValueType Ty, SDNode MulOp, SDNode ShOp> |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 863 | : N3V<0, 1, op21_20, op11_8, 1, 0, |
| 864 | (outs DPR:$dst), |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 865 | (ins DPR:$src1, DPR:$src2, DPR_8:$src3, nohash_imm:$lane), itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 866 | OpcodeStr, Dt, "$dst, $src2, $src3[$lane]", "$src1 = $dst", |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 867 | [(set (Ty DPR:$dst), |
| 868 | (Ty (ShOp (Ty DPR:$src1), |
| 869 | (Ty (MulOp DPR:$src2, |
| 870 | (Ty (NEONvduplane (Ty DPR_8:$src3), |
Johnny Chen | 7c3f386 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 871 | imm:$lane)))))))]>; |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 872 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 873 | class N3VQMulOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 874 | InstrItinClass itin, string OpcodeStr, string Dt, ValueType Ty, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 875 | SDNode MulOp, SDNode OpNode> |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 876 | : N3V<op24, op23, op21_20, op11_8, 1, op4, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 877 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2, QPR:$src3), itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 878 | OpcodeStr, Dt, "$dst, $src2, $src3", "$src1 = $dst", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 879 | [(set QPR:$dst, (Ty (OpNode QPR:$src1, |
| 880 | (Ty (MulOp QPR:$src2, QPR:$src3)))))]>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 881 | class N3VQMulOpSL<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 882 | string OpcodeStr, string Dt, ValueType ResTy, ValueType OpTy, |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 883 | SDNode MulOp, SDNode ShOp> |
| 884 | : N3V<1, 1, op21_20, op11_8, 1, 0, |
| 885 | (outs QPR:$dst), |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 886 | (ins QPR:$src1, QPR:$src2, DPR_VFP2:$src3, nohash_imm:$lane), itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 887 | OpcodeStr, Dt, "$dst, $src2, $src3[$lane]", "$src1 = $dst", |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 888 | [(set (ResTy QPR:$dst), |
| 889 | (ResTy (ShOp (ResTy QPR:$src1), |
| 890 | (ResTy (MulOp QPR:$src2, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 891 | (ResTy (NEONvduplane (OpTy DPR_VFP2:$src3), |
Johnny Chen | 7c3f386 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 892 | imm:$lane)))))))]>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 893 | class N3VQMulOpSL16<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 894 | string OpcodeStr, string Dt, |
| 895 | ValueType ResTy, ValueType OpTy, |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 896 | SDNode MulOp, SDNode ShOp> |
| 897 | : N3V<1, 1, op21_20, op11_8, 1, 0, |
| 898 | (outs QPR:$dst), |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 899 | (ins QPR:$src1, QPR:$src2, DPR_8:$src3, nohash_imm:$lane), itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 900 | OpcodeStr, Dt, "$dst, $src2, $src3[$lane]", "$src1 = $dst", |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 901 | [(set (ResTy QPR:$dst), |
| 902 | (ResTy (ShOp (ResTy QPR:$src1), |
| 903 | (ResTy (MulOp QPR:$src2, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 904 | (ResTy (NEONvduplane (OpTy DPR_8:$src3), |
Johnny Chen | 7c3f386 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 905 | imm:$lane)))))))]>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 906 | |
| 907 | // Neon 3-argument intrinsics, both double- and quad-register. |
| 908 | // The destination register is also used as the first source operand register. |
| 909 | class N3VDInt3<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 910 | InstrItinClass itin, string OpcodeStr, string Dt, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 911 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 912 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 913 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2, DPR:$src3), itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 914 | OpcodeStr, Dt, "$dst, $src2, $src3", "$src1 = $dst", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 915 | [(set DPR:$dst, (ResTy (IntOp (OpTy DPR:$src1), |
| 916 | (OpTy DPR:$src2), (OpTy DPR:$src3))))]>; |
| 917 | class N3VQInt3<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 918 | InstrItinClass itin, string OpcodeStr, string Dt, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 919 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 920 | : N3V<op24, op23, op21_20, op11_8, 1, op4, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 921 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2, QPR:$src3), itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 922 | OpcodeStr, Dt, "$dst, $src2, $src3", "$src1 = $dst", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 923 | [(set QPR:$dst, (ResTy (IntOp (OpTy QPR:$src1), |
| 924 | (OpTy QPR:$src2), (OpTy QPR:$src3))))]>; |
| 925 | |
| 926 | // Neon Long 3-argument intrinsic. The destination register is |
| 927 | // a quad-register and is also used as the first source operand register. |
| 928 | class N3VLInt3<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 929 | InstrItinClass itin, string OpcodeStr, string Dt, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 930 | ValueType TyQ, ValueType TyD, Intrinsic IntOp> |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 931 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 932 | (outs QPR:$dst), (ins QPR:$src1, DPR:$src2, DPR:$src3), itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 933 | OpcodeStr, Dt, "$dst, $src2, $src3", "$src1 = $dst", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 934 | [(set QPR:$dst, |
| 935 | (TyQ (IntOp (TyQ QPR:$src1), (TyD DPR:$src2), (TyD DPR:$src3))))]>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 936 | class N3VLInt3SL<bit op24, bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 937 | string OpcodeStr, string Dt, |
| 938 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 939 | : N3V<op24, 1, op21_20, op11_8, 1, 0, |
| 940 | (outs QPR:$dst), |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 941 | (ins QPR:$src1, DPR:$src2, DPR_VFP2:$src3, nohash_imm:$lane), itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 942 | OpcodeStr, Dt, "$dst, $src2, $src3[$lane]", "$src1 = $dst", |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 943 | [(set (ResTy QPR:$dst), |
| 944 | (ResTy (IntOp (ResTy QPR:$src1), |
| 945 | (OpTy DPR:$src2), |
| 946 | (OpTy (NEONvduplane (OpTy DPR_VFP2:$src3), |
| 947 | imm:$lane)))))]>; |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 948 | class N3VLInt3SL16<bit op24, bits<2> op21_20, bits<4> op11_8, |
| 949 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 950 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 951 | : N3V<op24, 1, op21_20, op11_8, 1, 0, |
| 952 | (outs QPR:$dst), |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 953 | (ins QPR:$src1, DPR:$src2, DPR_8:$src3, nohash_imm:$lane), itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 954 | OpcodeStr, Dt, "$dst, $src2, $src3[$lane]", "$src1 = $dst", |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 955 | [(set (ResTy QPR:$dst), |
| 956 | (ResTy (IntOp (ResTy QPR:$src1), |
| 957 | (OpTy DPR:$src2), |
| 958 | (OpTy (NEONvduplane (OpTy DPR_8:$src3), |
| 959 | imm:$lane)))))]>; |
| 960 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 961 | // Narrowing 3-register intrinsics. |
| 962 | class N3VNInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 963 | string OpcodeStr, string Dt, ValueType TyD, ValueType TyQ, |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 964 | Intrinsic IntOp, bit Commutable> |
| 965 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 966 | (outs DPR:$dst), (ins QPR:$src1, QPR:$src2), IIC_VBINi4D, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 967 | OpcodeStr, Dt, "$dst, $src1, $src2", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 968 | [(set DPR:$dst, (TyD (IntOp (TyQ QPR:$src1), (TyQ QPR:$src2))))]> { |
| 969 | let isCommutable = Commutable; |
| 970 | } |
| 971 | |
| 972 | // Long 3-register intrinsics. |
| 973 | class N3VLInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 974 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 975 | ValueType TyQ, ValueType TyD, Intrinsic IntOp, bit Commutable> |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 976 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 977 | (outs QPR:$dst), (ins DPR:$src1, DPR:$src2), itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 978 | OpcodeStr, Dt, "$dst, $src1, $src2", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 979 | [(set QPR:$dst, (TyQ (IntOp (TyD DPR:$src1), (TyD DPR:$src2))))]> { |
| 980 | let isCommutable = Commutable; |
| 981 | } |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 982 | class N3VLIntSL<bit op24, bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 983 | string OpcodeStr, string Dt, |
| 984 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 985 | : N3V<op24, 1, op21_20, op11_8, 1, 0, |
| 986 | (outs QPR:$dst), (ins DPR:$src1, DPR_VFP2:$src2, nohash_imm:$lane), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 987 | itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 988 | [(set (ResTy QPR:$dst), |
| 989 | (ResTy (IntOp (OpTy DPR:$src1), |
| 990 | (OpTy (NEONvduplane (OpTy DPR_VFP2:$src2), |
Johnny Chen | 7c3f386 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 991 | imm:$lane)))))]>; |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 992 | class N3VLIntSL16<bit op24, bits<2> op21_20, bits<4> op11_8, |
| 993 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 994 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 995 | : N3V<op24, 1, op21_20, op11_8, 1, 0, |
| 996 | (outs QPR:$dst), (ins DPR:$src1, DPR_8:$src2, nohash_imm:$lane), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 997 | itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 998 | [(set (ResTy QPR:$dst), |
| 999 | (ResTy (IntOp (OpTy DPR:$src1), |
| 1000 | (OpTy (NEONvduplane (OpTy DPR_8:$src2), |
Johnny Chen | 7c3f386 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 1001 | imm:$lane)))))]>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1002 | |
| 1003 | // Wide 3-register intrinsics. |
| 1004 | class N3VWInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1005 | string OpcodeStr, string Dt, ValueType TyQ, ValueType TyD, |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1006 | Intrinsic IntOp, bit Commutable> |
| 1007 | : N3V<op24, op23, op21_20, op11_8, 0, op4, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1008 | (outs QPR:$dst), (ins QPR:$src1, DPR:$src2), IIC_VSUBiD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1009 | OpcodeStr, Dt, "$dst, $src1, $src2", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1010 | [(set QPR:$dst, (TyQ (IntOp (TyQ QPR:$src1), (TyD DPR:$src2))))]> { |
| 1011 | let isCommutable = Commutable; |
| 1012 | } |
| 1013 | |
| 1014 | // Pairwise long 2-register intrinsics, both double- and quad-register. |
| 1015 | class N2VDPLInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1016 | bits<2> op17_16, bits<5> op11_7, bit op4, |
| 1017 | string OpcodeStr, string Dt, |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1018 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
| 1019 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, (outs DPR:$dst), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1020 | (ins DPR:$src), IIC_VSHLiD, OpcodeStr, Dt, "$dst, $src", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1021 | [(set DPR:$dst, (ResTy (IntOp (OpTy DPR:$src))))]>; |
| 1022 | class N2VQPLInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1023 | bits<2> op17_16, bits<5> op11_7, bit op4, |
| 1024 | string OpcodeStr, string Dt, |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1025 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
| 1026 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 1, op4, (outs QPR:$dst), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1027 | (ins QPR:$src), IIC_VSHLiD, OpcodeStr, Dt, "$dst, $src", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1028 | [(set QPR:$dst, (ResTy (IntOp (OpTy QPR:$src))))]>; |
| 1029 | |
| 1030 | // Pairwise long 2-register accumulate intrinsics, |
| 1031 | // both double- and quad-register. |
| 1032 | // The destination register is also used as the first source operand register. |
| 1033 | class N2VDPLInt2<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1034 | bits<2> op17_16, bits<5> op11_7, bit op4, |
| 1035 | string OpcodeStr, string Dt, |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1036 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
| 1037 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1038 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2), IIC_VPALiD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1039 | OpcodeStr, Dt, "$dst, $src2", "$src1 = $dst", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1040 | [(set DPR:$dst, (ResTy (IntOp (ResTy DPR:$src1), (OpTy DPR:$src2))))]>; |
| 1041 | class N2VQPLInt2<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1042 | bits<2> op17_16, bits<5> op11_7, bit op4, |
| 1043 | string OpcodeStr, string Dt, |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1044 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> |
| 1045 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 1, op4, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1046 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2), IIC_VPALiQ, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1047 | OpcodeStr, Dt, "$dst, $src2", "$src1 = $dst", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1048 | [(set QPR:$dst, (ResTy (IntOp (ResTy QPR:$src1), (OpTy QPR:$src2))))]>; |
| 1049 | |
| 1050 | // Shift by immediate, |
| 1051 | // both double- and quad-register. |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1052 | class N2VDSh<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1053 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 1054 | ValueType Ty, SDNode OpNode> |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1055 | : N2VImm<op24, op23, op11_8, op7, 0, op4, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1056 | (outs DPR:$dst), (ins DPR:$src, i32imm:$SIMM), itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1057 | OpcodeStr, Dt, "$dst, $src, $SIMM", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1058 | [(set DPR:$dst, (Ty (OpNode (Ty DPR:$src), (i32 imm:$SIMM))))]>; |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1059 | class N2VQSh<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1060 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 1061 | ValueType Ty, SDNode OpNode> |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1062 | : N2VImm<op24, op23, op11_8, op7, 1, op4, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1063 | (outs QPR:$dst), (ins QPR:$src, i32imm:$SIMM), itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1064 | OpcodeStr, Dt, "$dst, $src, $SIMM", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1065 | [(set QPR:$dst, (Ty (OpNode (Ty QPR:$src), (i32 imm:$SIMM))))]>; |
| 1066 | |
Johnny Chen | 7c3f386 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 1067 | // Long shift by immediate. |
| 1068 | class N2VLSh<bit op24, bit op23, bits<4> op11_8, bit op7, bit op6, bit op4, |
| 1069 | string OpcodeStr, string Dt, |
| 1070 | ValueType ResTy, ValueType OpTy, SDNode OpNode> |
| 1071 | : N2VImm<op24, op23, op11_8, op7, op6, op4, |
| 1072 | (outs QPR:$dst), (ins DPR:$src, i32imm:$SIMM), IIC_VSHLiD, |
| 1073 | OpcodeStr, Dt, "$dst, $src, $SIMM", "", |
| 1074 | [(set QPR:$dst, (ResTy (OpNode (OpTy DPR:$src), |
| 1075 | (i32 imm:$SIMM))))]>; |
| 1076 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1077 | // Narrow shift by immediate. |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1078 | class N2VNSh<bit op24, bit op23, bits<4> op11_8, bit op7, bit op6, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1079 | InstrItinClass itin, string OpcodeStr, string Dt, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1080 | ValueType ResTy, ValueType OpTy, SDNode OpNode> |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1081 | : N2VImm<op24, op23, op11_8, op7, op6, op4, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1082 | (outs DPR:$dst), (ins QPR:$src, i32imm:$SIMM), itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1083 | OpcodeStr, Dt, "$dst, $src, $SIMM", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1084 | [(set DPR:$dst, (ResTy (OpNode (OpTy QPR:$src), |
| 1085 | (i32 imm:$SIMM))))]>; |
| 1086 | |
| 1087 | // Shift right by immediate and accumulate, |
| 1088 | // both double- and quad-register. |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1089 | class N2VDShAdd<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1090 | string OpcodeStr, string Dt, ValueType Ty, SDNode ShOp> |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1091 | : N2VImm<op24, op23, op11_8, op7, 0, op4, (outs DPR:$dst), |
| 1092 | (ins DPR:$src1, DPR:$src2, i32imm:$SIMM), IIC_VPALiD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1093 | OpcodeStr, Dt, "$dst, $src2, $SIMM", "$src1 = $dst", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1094 | [(set DPR:$dst, (Ty (add DPR:$src1, |
| 1095 | (Ty (ShOp DPR:$src2, (i32 imm:$SIMM))))))]>; |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1096 | class N2VQShAdd<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1097 | string OpcodeStr, string Dt, ValueType Ty, SDNode ShOp> |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1098 | : N2VImm<op24, op23, op11_8, op7, 1, op4, (outs QPR:$dst), |
| 1099 | (ins QPR:$src1, QPR:$src2, i32imm:$SIMM), IIC_VPALiD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1100 | OpcodeStr, Dt, "$dst, $src2, $SIMM", "$src1 = $dst", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1101 | [(set QPR:$dst, (Ty (add QPR:$src1, |
| 1102 | (Ty (ShOp QPR:$src2, (i32 imm:$SIMM))))))]>; |
| 1103 | |
| 1104 | // Shift by immediate and insert, |
| 1105 | // both double- and quad-register. |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1106 | class N2VDShIns<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1107 | string OpcodeStr, string Dt, ValueType Ty, SDNode ShOp> |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1108 | : N2VImm<op24, op23, op11_8, op7, 0, op4, (outs DPR:$dst), |
| 1109 | (ins DPR:$src1, DPR:$src2, i32imm:$SIMM), IIC_VSHLiD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1110 | OpcodeStr, Dt, "$dst, $src2, $SIMM", "$src1 = $dst", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1111 | [(set DPR:$dst, (Ty (ShOp DPR:$src1, DPR:$src2, (i32 imm:$SIMM))))]>; |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1112 | class N2VQShIns<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1113 | string OpcodeStr, string Dt, ValueType Ty, SDNode ShOp> |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1114 | : N2VImm<op24, op23, op11_8, op7, 1, op4, (outs QPR:$dst), |
| 1115 | (ins QPR:$src1, QPR:$src2, i32imm:$SIMM), IIC_VSHLiQ, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1116 | OpcodeStr, Dt, "$dst, $src2, $SIMM", "$src1 = $dst", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1117 | [(set QPR:$dst, (Ty (ShOp QPR:$src1, QPR:$src2, (i32 imm:$SIMM))))]>; |
| 1118 | |
| 1119 | // Convert, with fractional bits immediate, |
| 1120 | // both double- and quad-register. |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1121 | class N2VCvtD<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1122 | string OpcodeStr, string Dt, ValueType ResTy, ValueType OpTy, |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1123 | Intrinsic IntOp> |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1124 | : N2VImm<op24, op23, op11_8, op7, 0, op4, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1125 | (outs DPR:$dst), (ins DPR:$src, i32imm:$SIMM), IIC_VUNAD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1126 | OpcodeStr, Dt, "$dst, $src, $SIMM", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1127 | [(set DPR:$dst, (ResTy (IntOp (OpTy DPR:$src), (i32 imm:$SIMM))))]>; |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1128 | class N2VCvtQ<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1129 | string OpcodeStr, string Dt, ValueType ResTy, ValueType OpTy, |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1130 | Intrinsic IntOp> |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1131 | : N2VImm<op24, op23, op11_8, op7, 1, op4, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1132 | (outs QPR:$dst), (ins QPR:$src, i32imm:$SIMM), IIC_VUNAQ, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1133 | OpcodeStr, Dt, "$dst, $src, $SIMM", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1134 | [(set QPR:$dst, (ResTy (IntOp (OpTy QPR:$src), (i32 imm:$SIMM))))]>; |
| 1135 | |
| 1136 | //===----------------------------------------------------------------------===// |
| 1137 | // Multiclasses |
| 1138 | //===----------------------------------------------------------------------===// |
| 1139 | |
Bob Wilson | 8af7b53 | 2009-10-03 04:44:16 +0000 | [diff] [blame] | 1140 | // Abbreviations used in multiclass suffixes: |
| 1141 | // Q = quarter int (8 bit) elements |
| 1142 | // H = half int (16 bit) elements |
| 1143 | // S = single int (32 bit) elements |
| 1144 | // D = double int (64 bit) elements |
| 1145 | |
Johnny Chen | fc9ef99 | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 1146 | // Neon 2-register vector operations -- for disassembly only. |
| 1147 | |
| 1148 | // First with only element sizes of 8, 16 and 32 bits: |
Johnny Chen | c2b70b5 | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 1149 | multiclass N2V_QHS_cmp<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16, |
| 1150 | bits<5> op11_7, bit op4, string opc, string Dt, |
| 1151 | string asm> { |
Johnny Chen | fc9ef99 | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 1152 | // 64-bit vector types. |
| 1153 | def v8i8 : N2V<op24_23, op21_20, 0b00, op17_16, op11_7, 0, op4, |
| 1154 | (outs DPR:$dst), (ins DPR:$src), NoItinerary, |
Johnny Chen | c2b70b5 | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 1155 | opc, !strconcat(Dt, "8"), asm, "", []>; |
Johnny Chen | fc9ef99 | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 1156 | def v4i16 : N2V<op24_23, op21_20, 0b01, op17_16, op11_7, 0, op4, |
| 1157 | (outs DPR:$dst), (ins DPR:$src), NoItinerary, |
Johnny Chen | c2b70b5 | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 1158 | opc, !strconcat(Dt, "16"), asm, "", []>; |
Johnny Chen | fc9ef99 | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 1159 | def v2i32 : N2V<op24_23, op21_20, 0b10, op17_16, op11_7, 0, op4, |
| 1160 | (outs DPR:$dst), (ins DPR:$src), NoItinerary, |
Johnny Chen | c2b70b5 | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 1161 | opc, !strconcat(Dt, "32"), asm, "", []>; |
Johnny Chen | fc9ef99 | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 1162 | def v2f32 : N2V<op24_23, op21_20, 0b10, op17_16, op11_7, 0, op4, |
| 1163 | (outs DPR:$dst), (ins DPR:$src), NoItinerary, |
| 1164 | opc, "f32", asm, "", []> { |
| 1165 | let Inst{10} = 1; // overwrite F = 1 |
| 1166 | } |
| 1167 | |
| 1168 | // 128-bit vector types. |
| 1169 | def v16i8 : N2V<op24_23, op21_20, 0b00, op17_16, op11_7, 1, op4, |
| 1170 | (outs QPR:$dst), (ins QPR:$src), NoItinerary, |
Johnny Chen | c2b70b5 | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 1171 | opc, !strconcat(Dt, "8"), asm, "", []>; |
Johnny Chen | fc9ef99 | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 1172 | def v8i16 : N2V<op24_23, op21_20, 0b01, op17_16, op11_7, 1, op4, |
| 1173 | (outs QPR:$dst), (ins QPR:$src), NoItinerary, |
Johnny Chen | c2b70b5 | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 1174 | opc, !strconcat(Dt, "16"), asm, "", []>; |
Johnny Chen | fc9ef99 | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 1175 | def v4i32 : N2V<op24_23, op21_20, 0b10, op17_16, op11_7, 1, op4, |
| 1176 | (outs QPR:$dst), (ins QPR:$src), NoItinerary, |
Johnny Chen | c2b70b5 | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 1177 | opc, !strconcat(Dt, "32"), asm, "", []>; |
Johnny Chen | fc9ef99 | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 1178 | def v4f32 : N2V<op24_23, op21_20, 0b10, op17_16, op11_7, 1, op4, |
| 1179 | (outs QPR:$dst), (ins QPR:$src), NoItinerary, |
| 1180 | opc, "f32", asm, "", []> { |
| 1181 | let Inst{10} = 1; // overwrite F = 1 |
| 1182 | } |
| 1183 | } |
| 1184 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1185 | // Neon 3-register vector operations. |
| 1186 | |
| 1187 | // First with only element sizes of 8, 16 and 32 bits: |
| 1188 | multiclass N3V_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1189 | InstrItinClass itinD16, InstrItinClass itinD32, |
| 1190 | InstrItinClass itinQ16, InstrItinClass itinQ32, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1191 | string OpcodeStr, string Dt, |
| 1192 | SDNode OpNode, bit Commutable = 0> { |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1193 | // 64-bit vector types. |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1194 | def v8i8 : N3VD<op24, op23, 0b00, op11_8, op4, itinD16, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1195 | OpcodeStr, !strconcat(Dt, "8"), |
| 1196 | v8i8, v8i8, OpNode, Commutable>; |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1197 | def v4i16 : N3VD<op24, op23, 0b01, op11_8, op4, itinD16, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1198 | OpcodeStr, !strconcat(Dt, "16"), |
| 1199 | v4i16, v4i16, OpNode, Commutable>; |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1200 | def v2i32 : N3VD<op24, op23, 0b10, op11_8, op4, itinD32, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1201 | OpcodeStr, !strconcat(Dt, "32"), |
| 1202 | v2i32, v2i32, OpNode, Commutable>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1203 | |
| 1204 | // 128-bit vector types. |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1205 | def v16i8 : N3VQ<op24, op23, 0b00, op11_8, op4, itinQ16, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1206 | OpcodeStr, !strconcat(Dt, "8"), |
| 1207 | v16i8, v16i8, OpNode, Commutable>; |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1208 | def v8i16 : N3VQ<op24, op23, 0b01, op11_8, op4, itinQ16, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1209 | OpcodeStr, !strconcat(Dt, "16"), |
| 1210 | v8i16, v8i16, OpNode, Commutable>; |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1211 | def v4i32 : N3VQ<op24, op23, 0b10, op11_8, op4, itinQ32, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1212 | OpcodeStr, !strconcat(Dt, "32"), |
| 1213 | v4i32, v4i32, OpNode, Commutable>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1214 | } |
| 1215 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1216 | multiclass N3VSL_HS<bits<4> op11_8, string OpcodeStr, string Dt, SDNode ShOp> { |
| 1217 | def v4i16 : N3VDSL16<0b01, op11_8, OpcodeStr, !strconcat(Dt, "16"), |
| 1218 | v4i16, ShOp>; |
| 1219 | def v2i32 : N3VDSL<0b10, op11_8, IIC_VMULi32D, OpcodeStr, !strconcat(Dt,"32"), |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1220 | v2i32, ShOp>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1221 | def v8i16 : N3VQSL16<0b01, op11_8, OpcodeStr, !strconcat(Dt, "16"), |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1222 | v8i16, v4i16, ShOp>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1223 | def v4i32 : N3VQSL<0b10, op11_8, IIC_VMULi32Q, OpcodeStr, !strconcat(Dt,"32"), |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1224 | v4i32, v2i32, ShOp>; |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1225 | } |
| 1226 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1227 | // ....then also with element size 64 bits: |
| 1228 | multiclass N3V_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1229 | InstrItinClass itinD, InstrItinClass itinQ, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1230 | string OpcodeStr, string Dt, |
| 1231 | SDNode OpNode, bit Commutable = 0> |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1232 | : N3V_QHS<op24, op23, op11_8, op4, itinD, itinD, itinQ, itinQ, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1233 | OpcodeStr, Dt, OpNode, Commutable> { |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1234 | def v1i64 : N3VD<op24, op23, 0b11, op11_8, op4, itinD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1235 | OpcodeStr, !strconcat(Dt, "64"), |
| 1236 | v1i64, v1i64, OpNode, Commutable>; |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1237 | def v2i64 : N3VQ<op24, op23, 0b11, op11_8, op4, itinQ, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1238 | OpcodeStr, !strconcat(Dt, "64"), |
| 1239 | v2i64, v2i64, OpNode, Commutable>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1240 | } |
| 1241 | |
| 1242 | |
| 1243 | // Neon Narrowing 2-register vector intrinsics, |
| 1244 | // source operand element sizes of 16, 32 and 64 bits: |
| 1245 | multiclass N2VNInt_HSD<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16, |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1246 | bits<5> op11_7, bit op6, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1247 | InstrItinClass itin, string OpcodeStr, string Dt, |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1248 | Intrinsic IntOp> { |
| 1249 | def v8i8 : N2VNInt<op24_23, op21_20, 0b00, op17_16, op11_7, op6, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1250 | itin, OpcodeStr, !strconcat(Dt, "16"), |
| 1251 | v8i8, v8i16, IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1252 | def v4i16 : N2VNInt<op24_23, op21_20, 0b01, op17_16, op11_7, op6, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1253 | itin, OpcodeStr, !strconcat(Dt, "32"), |
| 1254 | v4i16, v4i32, IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1255 | def v2i32 : N2VNInt<op24_23, op21_20, 0b10, op17_16, op11_7, op6, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1256 | itin, OpcodeStr, !strconcat(Dt, "64"), |
| 1257 | v2i32, v2i64, IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1258 | } |
| 1259 | |
| 1260 | |
| 1261 | // Neon Lengthening 2-register vector intrinsic (currently specific to VMOVL). |
| 1262 | // source operand element sizes of 16, 32 and 64 bits: |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1263 | multiclass N2VLInt_QHS<bits<2> op24_23, bits<5> op11_7, bit op6, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1264 | string OpcodeStr, string Dt, Intrinsic IntOp> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1265 | def v8i16 : N2VLInt<op24_23, 0b00, 0b10, 0b00, op11_7, op6, op4, IIC_VQUNAiD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1266 | OpcodeStr, !strconcat(Dt, "8"), v8i16, v8i8, IntOp>; |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1267 | def v4i32 : N2VLInt<op24_23, 0b01, 0b00, 0b00, op11_7, op6, op4, IIC_VQUNAiD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1268 | OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, IntOp>; |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1269 | def v2i64 : N2VLInt<op24_23, 0b10, 0b00, 0b00, op11_7, op6, op4, IIC_VQUNAiD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1270 | OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1271 | } |
| 1272 | |
| 1273 | |
| 1274 | // Neon 3-register vector intrinsics. |
| 1275 | |
| 1276 | // First with only element sizes of 16 and 32 bits: |
| 1277 | multiclass N3VInt_HS<bit op24, bit op23, bits<4> op11_8, bit op4, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1278 | InstrItinClass itinD16, InstrItinClass itinD32, |
| 1279 | InstrItinClass itinQ16, InstrItinClass itinQ32, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1280 | string OpcodeStr, string Dt, |
| 1281 | Intrinsic IntOp, bit Commutable = 0> { |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1282 | // 64-bit vector types. |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1283 | def v4i16 : N3VDInt<op24, op23, 0b01, op11_8, op4, itinD16, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1284 | OpcodeStr, !strconcat(Dt, "16"), |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1285 | v4i16, v4i16, IntOp, Commutable>; |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1286 | def v2i32 : N3VDInt<op24, op23, 0b10, op11_8, op4, itinD32, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1287 | OpcodeStr, !strconcat(Dt, "32"), |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1288 | v2i32, v2i32, IntOp, Commutable>; |
| 1289 | |
| 1290 | // 128-bit vector types. |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1291 | def v8i16 : N3VQInt<op24, op23, 0b01, op11_8, op4, itinQ16, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1292 | OpcodeStr, !strconcat(Dt, "16"), |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1293 | v8i16, v8i16, IntOp, Commutable>; |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1294 | def v4i32 : N3VQInt<op24, op23, 0b10, op11_8, op4, itinQ32, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1295 | OpcodeStr, !strconcat(Dt, "32"), |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1296 | v4i32, v4i32, IntOp, Commutable>; |
| 1297 | } |
| 1298 | |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1299 | multiclass N3VIntSL_HS<bits<4> op11_8, |
| 1300 | InstrItinClass itinD16, InstrItinClass itinD32, |
| 1301 | InstrItinClass itinQ16, InstrItinClass itinQ32, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1302 | string OpcodeStr, string Dt, Intrinsic IntOp> { |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1303 | def v4i16 : N3VDIntSL16<0b01, op11_8, itinD16, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1304 | OpcodeStr, !strconcat(Dt, "16"), v4i16, IntOp>; |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1305 | def v2i32 : N3VDIntSL<0b10, op11_8, itinD32, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1306 | OpcodeStr, !strconcat(Dt, "32"), v2i32, IntOp>; |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1307 | def v8i16 : N3VQIntSL16<0b01, op11_8, itinQ16, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1308 | OpcodeStr, !strconcat(Dt, "16"), v8i16, v4i16, IntOp>; |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1309 | def v4i32 : N3VQIntSL<0b10, op11_8, itinQ32, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1310 | OpcodeStr, !strconcat(Dt, "32"), v4i32, v2i32, IntOp>; |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1311 | } |
| 1312 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1313 | // ....then also with element size of 8 bits: |
| 1314 | multiclass N3VInt_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1315 | InstrItinClass itinD16, InstrItinClass itinD32, |
| 1316 | InstrItinClass itinQ16, InstrItinClass itinQ32, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1317 | string OpcodeStr, string Dt, |
| 1318 | Intrinsic IntOp, bit Commutable = 0> |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1319 | : N3VInt_HS<op24, op23, op11_8, op4, itinD16, itinD32, itinQ16, itinQ32, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1320 | OpcodeStr, Dt, IntOp, Commutable> { |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1321 | def v8i8 : N3VDInt<op24, op23, 0b00, op11_8, op4, itinD16, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1322 | OpcodeStr, !strconcat(Dt, "8"), |
| 1323 | v8i8, v8i8, IntOp, Commutable>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1324 | def v16i8 : N3VQInt<op24, op23, 0b00, op11_8, op4, itinQ16, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1325 | OpcodeStr, !strconcat(Dt, "8"), |
| 1326 | v16i8, v16i8, IntOp, Commutable>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1327 | } |
| 1328 | |
| 1329 | // ....then also with element size of 64 bits: |
| 1330 | multiclass N3VInt_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1331 | InstrItinClass itinD16, InstrItinClass itinD32, |
| 1332 | InstrItinClass itinQ16, InstrItinClass itinQ32, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1333 | string OpcodeStr, string Dt, |
| 1334 | Intrinsic IntOp, bit Commutable = 0> |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1335 | : N3VInt_QHS<op24, op23, op11_8, op4, itinD16, itinD32, itinQ16, itinQ32, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1336 | OpcodeStr, Dt, IntOp, Commutable> { |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1337 | def v1i64 : N3VDInt<op24, op23, 0b11, op11_8, op4, itinD32, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1338 | OpcodeStr, !strconcat(Dt, "64"), |
| 1339 | v1i64, v1i64, IntOp, Commutable>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1340 | def v2i64 : N3VQInt<op24, op23, 0b11, op11_8, op4, itinQ32, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1341 | OpcodeStr, !strconcat(Dt, "64"), |
| 1342 | v2i64, v2i64, IntOp, Commutable>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1343 | } |
| 1344 | |
| 1345 | |
| 1346 | // Neon Narrowing 3-register vector intrinsics, |
| 1347 | // source operand element sizes of 16, 32 and 64 bits: |
| 1348 | multiclass N3VNInt_HSD<bit op24, bit op23, bits<4> op11_8, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1349 | string OpcodeStr, string Dt, |
| 1350 | Intrinsic IntOp, bit Commutable = 0> { |
| 1351 | def v8i8 : N3VNInt<op24, op23, 0b00, op11_8, op4, |
| 1352 | OpcodeStr, !strconcat(Dt, "16"), |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1353 | v8i8, v8i16, IntOp, Commutable>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1354 | def v4i16 : N3VNInt<op24, op23, 0b01, op11_8, op4, |
| 1355 | OpcodeStr, !strconcat(Dt, "32"), |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1356 | v4i16, v4i32, IntOp, Commutable>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1357 | def v2i32 : N3VNInt<op24, op23, 0b10, op11_8, op4, |
| 1358 | OpcodeStr, !strconcat(Dt, "64"), |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1359 | v2i32, v2i64, IntOp, Commutable>; |
| 1360 | } |
| 1361 | |
| 1362 | |
| 1363 | // Neon Long 3-register vector intrinsics. |
| 1364 | |
| 1365 | // First with only element sizes of 16 and 32 bits: |
| 1366 | multiclass N3VLInt_HS<bit op24, bit op23, bits<4> op11_8, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1367 | InstrItinClass itin, string OpcodeStr, string Dt, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1368 | Intrinsic IntOp, bit Commutable = 0> { |
| 1369 | def v4i32 : N3VLInt<op24, op23, 0b01, op11_8, op4, itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1370 | OpcodeStr, !strconcat(Dt, "16"), |
| 1371 | v4i32, v4i16, IntOp, Commutable>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1372 | def v2i64 : N3VLInt<op24, op23, 0b10, op11_8, op4, itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1373 | OpcodeStr, !strconcat(Dt, "32"), |
| 1374 | v2i64, v2i32, IntOp, Commutable>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1375 | } |
| 1376 | |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1377 | multiclass N3VLIntSL_HS<bit op24, bits<4> op11_8, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1378 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 1379 | Intrinsic IntOp> { |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1380 | def v4i16 : N3VLIntSL16<op24, 0b01, op11_8, itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1381 | OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, IntOp>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1382 | def v2i32 : N3VLIntSL<op24, 0b10, op11_8, itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1383 | OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, IntOp>; |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1384 | } |
| 1385 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1386 | // ....then also with element size of 8 bits: |
| 1387 | multiclass N3VLInt_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1388 | InstrItinClass itin, string OpcodeStr, string Dt, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1389 | Intrinsic IntOp, bit Commutable = 0> |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1390 | : N3VLInt_HS<op24, op23, op11_8, op4, itin, OpcodeStr, Dt, |
| 1391 | IntOp, Commutable> { |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1392 | def v8i16 : N3VLInt<op24, op23, 0b00, op11_8, op4, itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1393 | OpcodeStr, !strconcat(Dt, "8"), |
| 1394 | v8i16, v8i8, IntOp, Commutable>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1395 | } |
| 1396 | |
| 1397 | |
| 1398 | // Neon Wide 3-register vector intrinsics, |
| 1399 | // source operand element sizes of 8, 16 and 32 bits: |
| 1400 | multiclass N3VWInt_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1401 | string OpcodeStr, string Dt, |
| 1402 | Intrinsic IntOp, bit Commutable = 0> { |
| 1403 | def v8i16 : N3VWInt<op24, op23, 0b00, op11_8, op4, |
| 1404 | OpcodeStr, !strconcat(Dt, "8"), |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1405 | v8i16, v8i8, IntOp, Commutable>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1406 | def v4i32 : N3VWInt<op24, op23, 0b01, op11_8, op4, |
| 1407 | OpcodeStr, !strconcat(Dt, "16"), |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1408 | v4i32, v4i16, IntOp, Commutable>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1409 | def v2i64 : N3VWInt<op24, op23, 0b10, op11_8, op4, |
| 1410 | OpcodeStr, !strconcat(Dt, "32"), |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1411 | v2i64, v2i32, IntOp, Commutable>; |
| 1412 | } |
| 1413 | |
| 1414 | |
| 1415 | // Neon Multiply-Op vector operations, |
| 1416 | // element sizes of 8, 16 and 32 bits: |
| 1417 | multiclass N3VMulOp_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1418 | InstrItinClass itinD16, InstrItinClass itinD32, |
| 1419 | InstrItinClass itinQ16, InstrItinClass itinQ32, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1420 | string OpcodeStr, string Dt, SDNode OpNode> { |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1421 | // 64-bit vector types. |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1422 | def v8i8 : N3VDMulOp<op24, op23, 0b00, op11_8, op4, itinD16, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1423 | OpcodeStr, !strconcat(Dt, "8"), v8i8, mul, OpNode>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1424 | def v4i16 : N3VDMulOp<op24, op23, 0b01, op11_8, op4, itinD16, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1425 | OpcodeStr, !strconcat(Dt, "16"), v4i16, mul, OpNode>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1426 | def v2i32 : N3VDMulOp<op24, op23, 0b10, op11_8, op4, itinD32, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1427 | OpcodeStr, !strconcat(Dt, "32"), v2i32, mul, OpNode>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1428 | |
| 1429 | // 128-bit vector types. |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1430 | def v16i8 : N3VQMulOp<op24, op23, 0b00, op11_8, op4, itinQ16, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1431 | OpcodeStr, !strconcat(Dt, "8"), v16i8, mul, OpNode>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1432 | def v8i16 : N3VQMulOp<op24, op23, 0b01, op11_8, op4, itinQ16, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1433 | OpcodeStr, !strconcat(Dt, "16"), v8i16, mul, OpNode>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1434 | def v4i32 : N3VQMulOp<op24, op23, 0b10, op11_8, op4, itinQ32, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1435 | OpcodeStr, !strconcat(Dt, "32"), v4i32, mul, OpNode>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1436 | } |
| 1437 | |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1438 | multiclass N3VMulOpSL_HS<bits<4> op11_8, |
| 1439 | InstrItinClass itinD16, InstrItinClass itinD32, |
| 1440 | InstrItinClass itinQ16, InstrItinClass itinQ32, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1441 | string OpcodeStr, string Dt, SDNode ShOp> { |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1442 | def v4i16 : N3VDMulOpSL16<0b01, op11_8, itinD16, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1443 | OpcodeStr, !strconcat(Dt, "16"), v4i16, mul, ShOp>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1444 | def v2i32 : N3VDMulOpSL<0b10, op11_8, itinD32, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1445 | OpcodeStr, !strconcat(Dt, "32"), v2i32, mul, ShOp>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1446 | def v8i16 : N3VQMulOpSL16<0b01, op11_8, itinQ16, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1447 | OpcodeStr, !strconcat(Dt, "16"), v8i16, v4i16, |
| 1448 | mul, ShOp>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1449 | def v4i32 : N3VQMulOpSL<0b10, op11_8, itinQ32, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1450 | OpcodeStr, !strconcat(Dt, "32"), v4i32, v2i32, |
| 1451 | mul, ShOp>; |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1452 | } |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1453 | |
| 1454 | // Neon 3-argument intrinsics, |
| 1455 | // element sizes of 8, 16 and 32 bits: |
| 1456 | multiclass N3VInt3_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1457 | string OpcodeStr, string Dt, Intrinsic IntOp> { |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1458 | // 64-bit vector types. |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1459 | def v8i8 : N3VDInt3<op24, op23, 0b00, op11_8, op4, IIC_VMACi16D, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1460 | OpcodeStr, !strconcat(Dt, "8"), v8i8, v8i8, IntOp>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1461 | def v4i16 : N3VDInt3<op24, op23, 0b01, op11_8, op4, IIC_VMACi16D, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1462 | OpcodeStr, !strconcat(Dt, "16"), v4i16, v4i16, IntOp>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1463 | def v2i32 : N3VDInt3<op24, op23, 0b10, op11_8, op4, IIC_VMACi32D, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1464 | OpcodeStr, !strconcat(Dt, "32"), v2i32, v2i32, IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1465 | |
| 1466 | // 128-bit vector types. |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1467 | def v16i8 : N3VQInt3<op24, op23, 0b00, op11_8, op4, IIC_VMACi16Q, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1468 | OpcodeStr, !strconcat(Dt, "8"), v16i8, v16i8, IntOp>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1469 | def v8i16 : N3VQInt3<op24, op23, 0b01, op11_8, op4, IIC_VMACi16Q, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1470 | OpcodeStr, !strconcat(Dt, "16"), v8i16, v8i16, IntOp>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1471 | def v4i32 : N3VQInt3<op24, op23, 0b10, op11_8, op4, IIC_VMACi32Q, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1472 | OpcodeStr, !strconcat(Dt, "32"), v4i32, v4i32, IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1473 | } |
| 1474 | |
| 1475 | |
| 1476 | // Neon Long 3-argument intrinsics. |
| 1477 | |
| 1478 | // First with only element sizes of 16 and 32 bits: |
| 1479 | multiclass N3VLInt3_HS<bit op24, bit op23, bits<4> op11_8, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1480 | string OpcodeStr, string Dt, Intrinsic IntOp> { |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1481 | def v4i32 : N3VLInt3<op24, op23, 0b01, op11_8, op4, IIC_VMACi16D, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1482 | OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, IntOp>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1483 | def v2i64 : N3VLInt3<op24, op23, 0b10, op11_8, op4, IIC_VMACi16D, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1484 | OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1485 | } |
| 1486 | |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1487 | multiclass N3VLInt3SL_HS<bit op24, bits<4> op11_8, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1488 | string OpcodeStr, string Dt, Intrinsic IntOp> { |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1489 | def v4i16 : N3VLInt3SL16<op24, 0b01, op11_8, IIC_VMACi16D, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1490 | OpcodeStr, !strconcat(Dt,"16"), v4i32, v4i16, IntOp>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1491 | def v2i32 : N3VLInt3SL<op24, 0b10, op11_8, IIC_VMACi32D, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1492 | OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, IntOp>; |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1493 | } |
| 1494 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1495 | // ....then also with element size of 8 bits: |
| 1496 | multiclass N3VLInt3_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1497 | string OpcodeStr, string Dt, Intrinsic IntOp> |
| 1498 | : N3VLInt3_HS<op24, op23, op11_8, op4, OpcodeStr, Dt, IntOp> { |
Bob Wilson | 85f30d7 | 2009-10-15 21:57:47 +0000 | [diff] [blame] | 1499 | def v8i16 : N3VLInt3<op24, op23, 0b00, op11_8, op4, IIC_VMACi16D, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1500 | OpcodeStr, !strconcat(Dt, "8"), v8i16, v8i8, IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1501 | } |
| 1502 | |
| 1503 | |
| 1504 | // Neon 2-register vector intrinsics, |
| 1505 | // element sizes of 8, 16 and 32 bits: |
| 1506 | multiclass N2VInt_QHS<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16, |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1507 | bits<5> op11_7, bit op4, |
| 1508 | InstrItinClass itinD, InstrItinClass itinQ, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1509 | string OpcodeStr, string Dt, Intrinsic IntOp> { |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1510 | // 64-bit vector types. |
| 1511 | def v8i8 : N2VDInt<op24_23, op21_20, 0b00, op17_16, op11_7, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1512 | itinD, OpcodeStr, !strconcat(Dt, "8"), v8i8, v8i8, IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1513 | def v4i16 : N2VDInt<op24_23, op21_20, 0b01, op17_16, op11_7, op4, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1514 | itinD, OpcodeStr, !strconcat(Dt, "16"),v4i16,v4i16,IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1515 | def v2i32 : N2VDInt<op24_23, op21_20, 0b10, op17_16, op11_7, op4, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1516 | itinD, OpcodeStr, !strconcat(Dt, "32"),v2i32,v2i32,IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1517 | |
| 1518 | // 128-bit vector types. |
| 1519 | def v16i8 : N2VQInt<op24_23, op21_20, 0b00, op17_16, op11_7, op4, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1520 | itinQ, OpcodeStr, !strconcat(Dt, "8"), v16i8,v16i8,IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1521 | def v8i16 : N2VQInt<op24_23, op21_20, 0b01, op17_16, op11_7, op4, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1522 | itinQ, OpcodeStr, !strconcat(Dt, "16"),v8i16,v8i16,IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1523 | def v4i32 : N2VQInt<op24_23, op21_20, 0b10, op17_16, op11_7, op4, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1524 | itinQ, OpcodeStr, !strconcat(Dt, "32"),v4i32,v4i32,IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1525 | } |
| 1526 | |
| 1527 | |
| 1528 | // Neon Pairwise long 2-register intrinsics, |
| 1529 | // element sizes of 8, 16 and 32 bits: |
| 1530 | multiclass N2VPLInt_QHS<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16, |
| 1531 | bits<5> op11_7, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1532 | string OpcodeStr, string Dt, Intrinsic IntOp> { |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1533 | // 64-bit vector types. |
| 1534 | def v8i8 : N2VDPLInt<op24_23, op21_20, 0b00, op17_16, op11_7, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1535 | OpcodeStr, !strconcat(Dt, "8"), v4i16, v8i8, IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1536 | def v4i16 : N2VDPLInt<op24_23, op21_20, 0b01, op17_16, op11_7, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1537 | OpcodeStr, !strconcat(Dt, "16"), v2i32, v4i16, IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1538 | def v2i32 : N2VDPLInt<op24_23, op21_20, 0b10, op17_16, op11_7, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1539 | OpcodeStr, !strconcat(Dt, "32"), v1i64, v2i32, IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1540 | |
| 1541 | // 128-bit vector types. |
| 1542 | def v16i8 : N2VQPLInt<op24_23, op21_20, 0b00, op17_16, op11_7, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1543 | OpcodeStr, !strconcat(Dt, "8"), v8i16, v16i8, IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1544 | def v8i16 : N2VQPLInt<op24_23, op21_20, 0b01, op17_16, op11_7, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1545 | OpcodeStr, !strconcat(Dt, "16"), v4i32, v8i16, IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1546 | def v4i32 : N2VQPLInt<op24_23, op21_20, 0b10, op17_16, op11_7, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1547 | OpcodeStr, !strconcat(Dt, "32"), v2i64, v4i32, IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1548 | } |
| 1549 | |
| 1550 | |
| 1551 | // Neon Pairwise long 2-register accumulate intrinsics, |
| 1552 | // element sizes of 8, 16 and 32 bits: |
| 1553 | multiclass N2VPLInt2_QHS<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16, |
| 1554 | bits<5> op11_7, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1555 | string OpcodeStr, string Dt, Intrinsic IntOp> { |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1556 | // 64-bit vector types. |
| 1557 | def v8i8 : N2VDPLInt2<op24_23, op21_20, 0b00, op17_16, op11_7, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1558 | OpcodeStr, !strconcat(Dt, "8"), v4i16, v8i8, IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1559 | def v4i16 : N2VDPLInt2<op24_23, op21_20, 0b01, op17_16, op11_7, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1560 | OpcodeStr, !strconcat(Dt, "16"), v2i32, v4i16, IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1561 | def v2i32 : N2VDPLInt2<op24_23, op21_20, 0b10, op17_16, op11_7, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1562 | OpcodeStr, !strconcat(Dt, "32"), v1i64, v2i32, IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1563 | |
| 1564 | // 128-bit vector types. |
| 1565 | def v16i8 : N2VQPLInt2<op24_23, op21_20, 0b00, op17_16, op11_7, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1566 | OpcodeStr, !strconcat(Dt, "8"), v8i16, v16i8, IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1567 | def v8i16 : N2VQPLInt2<op24_23, op21_20, 0b01, op17_16, op11_7, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1568 | OpcodeStr, !strconcat(Dt, "16"), v4i32, v8i16, IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1569 | def v4i32 : N2VQPLInt2<op24_23, op21_20, 0b10, op17_16, op11_7, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1570 | OpcodeStr, !strconcat(Dt, "32"), v2i64, v4i32, IntOp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1571 | } |
| 1572 | |
| 1573 | |
| 1574 | // Neon 2-register vector shift by immediate, |
| 1575 | // element sizes of 8, 16, 32 and 64 bits: |
| 1576 | multiclass N2VSh_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1577 | InstrItinClass itin, string OpcodeStr, string Dt, |
| 1578 | SDNode OpNode> { |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1579 | // 64-bit vector types. |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1580 | def v8i8 : N2VDSh<op24, op23, op11_8, 0, op4, itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1581 | OpcodeStr, !strconcat(Dt, "8"), v8i8, OpNode> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1582 | let Inst{21-19} = 0b001; // imm6 = 001xxx |
| 1583 | } |
| 1584 | def v4i16 : N2VDSh<op24, op23, op11_8, 0, op4, itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1585 | OpcodeStr, !strconcat(Dt, "16"), v4i16, OpNode> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1586 | let Inst{21-20} = 0b01; // imm6 = 01xxxx |
| 1587 | } |
| 1588 | def v2i32 : N2VDSh<op24, op23, op11_8, 0, op4, itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1589 | OpcodeStr, !strconcat(Dt, "32"), v2i32, OpNode> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1590 | let Inst{21} = 0b1; // imm6 = 1xxxxx |
| 1591 | } |
| 1592 | def v1i64 : N2VDSh<op24, op23, op11_8, 1, op4, itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1593 | OpcodeStr, !strconcat(Dt, "64"), v1i64, OpNode>; |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1594 | // imm6 = xxxxxx |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1595 | |
| 1596 | // 128-bit vector types. |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1597 | def v16i8 : N2VQSh<op24, op23, op11_8, 0, op4, itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1598 | OpcodeStr, !strconcat(Dt, "8"), v16i8, OpNode> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1599 | let Inst{21-19} = 0b001; // imm6 = 001xxx |
| 1600 | } |
| 1601 | def v8i16 : N2VQSh<op24, op23, op11_8, 0, op4, itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1602 | OpcodeStr, !strconcat(Dt, "16"), v8i16, OpNode> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1603 | let Inst{21-20} = 0b01; // imm6 = 01xxxx |
| 1604 | } |
| 1605 | def v4i32 : N2VQSh<op24, op23, op11_8, 0, op4, itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1606 | OpcodeStr, !strconcat(Dt, "32"), v4i32, OpNode> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1607 | let Inst{21} = 0b1; // imm6 = 1xxxxx |
| 1608 | } |
| 1609 | def v2i64 : N2VQSh<op24, op23, op11_8, 1, op4, itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1610 | OpcodeStr, !strconcat(Dt, "64"), v2i64, OpNode>; |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1611 | // imm6 = xxxxxx |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1612 | } |
| 1613 | |
| 1614 | |
| 1615 | // Neon Shift-Accumulate vector operations, |
| 1616 | // element sizes of 8, 16, 32 and 64 bits: |
| 1617 | multiclass N2VShAdd_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1618 | string OpcodeStr, string Dt, SDNode ShOp> { |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1619 | // 64-bit vector types. |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1620 | def v8i8 : N2VDShAdd<op24, op23, op11_8, 0, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1621 | OpcodeStr, !strconcat(Dt, "8"), v8i8, ShOp> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1622 | let Inst{21-19} = 0b001; // imm6 = 001xxx |
| 1623 | } |
| 1624 | def v4i16 : N2VDShAdd<op24, op23, op11_8, 0, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1625 | OpcodeStr, !strconcat(Dt, "16"), v4i16, ShOp> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1626 | let Inst{21-20} = 0b01; // imm6 = 01xxxx |
| 1627 | } |
| 1628 | def v2i32 : N2VDShAdd<op24, op23, op11_8, 0, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1629 | OpcodeStr, !strconcat(Dt, "32"), v2i32, ShOp> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1630 | let Inst{21} = 0b1; // imm6 = 1xxxxx |
| 1631 | } |
| 1632 | def v1i64 : N2VDShAdd<op24, op23, op11_8, 1, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1633 | OpcodeStr, !strconcat(Dt, "64"), v1i64, ShOp>; |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1634 | // imm6 = xxxxxx |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1635 | |
| 1636 | // 128-bit vector types. |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1637 | def v16i8 : N2VQShAdd<op24, op23, op11_8, 0, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1638 | OpcodeStr, !strconcat(Dt, "8"), v16i8, ShOp> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1639 | let Inst{21-19} = 0b001; // imm6 = 001xxx |
| 1640 | } |
| 1641 | def v8i16 : N2VQShAdd<op24, op23, op11_8, 0, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1642 | OpcodeStr, !strconcat(Dt, "16"), v8i16, ShOp> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1643 | let Inst{21-20} = 0b01; // imm6 = 01xxxx |
| 1644 | } |
| 1645 | def v4i32 : N2VQShAdd<op24, op23, op11_8, 0, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1646 | OpcodeStr, !strconcat(Dt, "32"), v4i32, ShOp> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1647 | let Inst{21} = 0b1; // imm6 = 1xxxxx |
| 1648 | } |
| 1649 | def v2i64 : N2VQShAdd<op24, op23, op11_8, 1, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1650 | OpcodeStr, !strconcat(Dt, "64"), v2i64, ShOp>; |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1651 | // imm6 = xxxxxx |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1652 | } |
| 1653 | |
| 1654 | |
| 1655 | // Neon Shift-Insert vector operations, |
| 1656 | // element sizes of 8, 16, 32 and 64 bits: |
| 1657 | multiclass N2VShIns_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, |
| 1658 | string OpcodeStr, SDNode ShOp> { |
| 1659 | // 64-bit vector types. |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1660 | def v8i8 : N2VDShIns<op24, op23, op11_8, 0, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1661 | OpcodeStr, "8", v8i8, ShOp> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1662 | let Inst{21-19} = 0b001; // imm6 = 001xxx |
| 1663 | } |
| 1664 | def v4i16 : N2VDShIns<op24, op23, op11_8, 0, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1665 | OpcodeStr, "16", v4i16, ShOp> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1666 | let Inst{21-20} = 0b01; // imm6 = 01xxxx |
| 1667 | } |
| 1668 | def v2i32 : N2VDShIns<op24, op23, op11_8, 0, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1669 | OpcodeStr, "32", v2i32, ShOp> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1670 | let Inst{21} = 0b1; // imm6 = 1xxxxx |
| 1671 | } |
| 1672 | def v1i64 : N2VDShIns<op24, op23, op11_8, 1, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1673 | OpcodeStr, "64", v1i64, ShOp>; |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1674 | // imm6 = xxxxxx |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1675 | |
| 1676 | // 128-bit vector types. |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1677 | def v16i8 : N2VQShIns<op24, op23, op11_8, 0, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1678 | OpcodeStr, "8", v16i8, ShOp> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1679 | let Inst{21-19} = 0b001; // imm6 = 001xxx |
| 1680 | } |
| 1681 | def v8i16 : N2VQShIns<op24, op23, op11_8, 0, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1682 | OpcodeStr, "16", v8i16, ShOp> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1683 | let Inst{21-20} = 0b01; // imm6 = 01xxxx |
| 1684 | } |
| 1685 | def v4i32 : N2VQShIns<op24, op23, op11_8, 0, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1686 | OpcodeStr, "32", v4i32, ShOp> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1687 | let Inst{21} = 0b1; // imm6 = 1xxxxx |
| 1688 | } |
| 1689 | def v2i64 : N2VQShIns<op24, op23, op11_8, 1, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1690 | OpcodeStr, "64", v2i64, ShOp>; |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1691 | // imm6 = xxxxxx |
| 1692 | } |
| 1693 | |
| 1694 | // Neon Shift Long operations, |
| 1695 | // element sizes of 8, 16, 32 bits: |
| 1696 | multiclass N2VLSh_QHS<bit op24, bit op23, bits<4> op11_8, bit op7, bit op6, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1697 | bit op4, string OpcodeStr, string Dt, SDNode OpNode> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1698 | def v8i16 : N2VLSh<op24, op23, op11_8, op7, op6, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1699 | OpcodeStr, !strconcat(Dt, "8"), v8i16, v8i8, OpNode> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1700 | let Inst{21-19} = 0b001; // imm6 = 001xxx |
| 1701 | } |
| 1702 | def v4i32 : N2VLSh<op24, op23, op11_8, op7, op6, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1703 | OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, OpNode> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1704 | let Inst{21-20} = 0b01; // imm6 = 01xxxx |
| 1705 | } |
| 1706 | def v2i64 : N2VLSh<op24, op23, op11_8, op7, op6, op4, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1707 | OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, OpNode> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1708 | let Inst{21} = 0b1; // imm6 = 1xxxxx |
| 1709 | } |
| 1710 | } |
| 1711 | |
| 1712 | // Neon Shift Narrow operations, |
| 1713 | // element sizes of 16, 32, 64 bits: |
| 1714 | multiclass N2VNSh_HSD<bit op24, bit op23, bits<4> op11_8, bit op7, bit op6, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1715 | bit op4, InstrItinClass itin, string OpcodeStr, string Dt, |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1716 | SDNode OpNode> { |
| 1717 | def v8i8 : N2VNSh<op24, op23, op11_8, op7, op6, op4, itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1718 | OpcodeStr, !strconcat(Dt, "16"), v8i8, v8i16, OpNode> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1719 | let Inst{21-19} = 0b001; // imm6 = 001xxx |
| 1720 | } |
| 1721 | def v4i16 : N2VNSh<op24, op23, op11_8, op7, op6, op4, itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1722 | OpcodeStr, !strconcat(Dt, "32"), v4i16, v4i32, OpNode> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1723 | let Inst{21-20} = 0b01; // imm6 = 01xxxx |
| 1724 | } |
| 1725 | def v2i32 : N2VNSh<op24, op23, op11_8, op7, op6, op4, itin, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1726 | OpcodeStr, !strconcat(Dt, "64"), v2i32, v2i64, OpNode> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1727 | let Inst{21} = 0b1; // imm6 = 1xxxxx |
| 1728 | } |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1729 | } |
| 1730 | |
| 1731 | //===----------------------------------------------------------------------===// |
| 1732 | // Instruction Definitions. |
| 1733 | //===----------------------------------------------------------------------===// |
| 1734 | |
| 1735 | // Vector Add Operations. |
| 1736 | |
| 1737 | // VADD : Vector Add (integer and floating-point) |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1738 | defm VADD : N3V_QHSD<0, 0, 0b1000, 0, IIC_VBINiD, IIC_VBINiQ, "vadd", "i", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1739 | add, 1>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1740 | def VADDfd : N3VD<0, 0, 0b00, 0b1101, 0, IIC_VBIND, "vadd", "f32", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1741 | v2f32, v2f32, fadd, 1>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1742 | def VADDfq : N3VQ<0, 0, 0b00, 0b1101, 0, IIC_VBINQ, "vadd", "f32", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1743 | v4f32, v4f32, fadd, 1>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1744 | // VADDL : Vector Add Long (Q = D + D) |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1745 | defm VADDLs : N3VLInt_QHS<0,1,0b0000,0, IIC_VSHLiD, "vaddl", "s", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1746 | int_arm_neon_vaddls, 1>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1747 | defm VADDLu : N3VLInt_QHS<1,1,0b0000,0, IIC_VSHLiD, "vaddl", "u", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1748 | int_arm_neon_vaddlu, 1>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1749 | // VADDW : Vector Add Wide (Q = Q + D) |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1750 | defm VADDWs : N3VWInt_QHS<0,1,0b0001,0, "vaddw", "s", int_arm_neon_vaddws, 0>; |
| 1751 | defm VADDWu : N3VWInt_QHS<1,1,0b0001,0, "vaddw", "u", int_arm_neon_vaddwu, 0>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1752 | // VHADD : Vector Halving Add |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1753 | defm VHADDs : N3VInt_QHS<0,0,0b0000,0, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1754 | IIC_VBINi4Q, "vhadd", "s", int_arm_neon_vhadds, 1>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1755 | defm VHADDu : N3VInt_QHS<1,0,0b0000,0, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1756 | IIC_VBINi4Q, "vhadd", "u", int_arm_neon_vhaddu, 1>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1757 | // VRHADD : Vector Rounding Halving Add |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1758 | defm VRHADDs : N3VInt_QHS<0,0,0b0001,0, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1759 | IIC_VBINi4Q, "vrhadd", "s", int_arm_neon_vrhadds, 1>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1760 | defm VRHADDu : N3VInt_QHS<1,0,0b0001,0, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1761 | IIC_VBINi4Q, "vrhadd", "u", int_arm_neon_vrhaddu, 1>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1762 | // VQADD : Vector Saturating Add |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1763 | defm VQADDs : N3VInt_QHSD<0,0,0b0000,1, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1764 | IIC_VBINi4Q, "vqadd", "s", int_arm_neon_vqadds, 1>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1765 | defm VQADDu : N3VInt_QHSD<1,0,0b0000,1, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1766 | IIC_VBINi4Q, "vqadd", "u", int_arm_neon_vqaddu, 1>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1767 | // VADDHN : Vector Add and Narrow Returning High Half (D = Q + Q) |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1768 | defm VADDHN : N3VNInt_HSD<0,1,0b0100,0, "vaddhn", "i", |
| 1769 | int_arm_neon_vaddhn, 1>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1770 | // VRADDHN : Vector Rounding Add and Narrow Returning High Half (D = Q + Q) |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1771 | defm VRADDHN : N3VNInt_HSD<1,1,0b0100,0, "vraddhn", "i", |
| 1772 | int_arm_neon_vraddhn, 1>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1773 | |
| 1774 | // Vector Multiply Operations. |
| 1775 | |
| 1776 | // VMUL : Vector Multiply (integer, polynomial and floating-point) |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1777 | defm VMUL : N3V_QHS<0, 0, 0b1001, 1, IIC_VMULi16D, IIC_VMULi32D, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1778 | IIC_VMULi16Q, IIC_VMULi32Q, "vmul", "i", mul, 1>; |
| 1779 | def VMULpd : N3VDInt<1, 0, 0b00, 0b1001, 1, IIC_VMULi16D, "vmul", "p8", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1780 | v8i8, v8i8, int_arm_neon_vmulp, 1>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1781 | def VMULpq : N3VQInt<1, 0, 0b00, 0b1001, 1, IIC_VMULi16Q, "vmul", "p8", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1782 | v16i8, v16i8, int_arm_neon_vmulp, 1>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1783 | def VMULfd : N3VD<1, 0, 0b00, 0b1101, 1, IIC_VBIND, "vmul", "f32", |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1784 | v2f32, v2f32, fmul, 1>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1785 | def VMULfq : N3VQ<1, 0, 0b00, 0b1101, 1, IIC_VBINQ, "vmul", "f32", |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1786 | v4f32, v4f32, fmul, 1>; |
| 1787 | defm VMULsl : N3VSL_HS<0b1000, "vmul", "i", mul>; |
| 1788 | def VMULslfd : N3VDSL<0b10, 0b1001, IIC_VBIND, "vmul", "f32", v2f32, fmul>; |
| 1789 | def VMULslfq : N3VQSL<0b10, 0b1001, IIC_VBINQ, "vmul", "f32", v4f32, |
| 1790 | v2f32, fmul>; |
| 1791 | |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1792 | def : Pat<(v8i16 (mul (v8i16 QPR:$src1), |
| 1793 | (v8i16 (NEONvduplane (v8i16 QPR:$src2), imm:$lane)))), |
| 1794 | (v8i16 (VMULslv8i16 (v8i16 QPR:$src1), |
| 1795 | (v4i16 (EXTRACT_SUBREG QPR:$src2, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1796 | (DSubReg_i16_reg imm:$lane))), |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1797 | (SubReg_i16_lane imm:$lane)))>; |
| 1798 | def : Pat<(v4i32 (mul (v4i32 QPR:$src1), |
| 1799 | (v4i32 (NEONvduplane (v4i32 QPR:$src2), imm:$lane)))), |
| 1800 | (v4i32 (VMULslv4i32 (v4i32 QPR:$src1), |
| 1801 | (v2i32 (EXTRACT_SUBREG QPR:$src2, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1802 | (DSubReg_i32_reg imm:$lane))), |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1803 | (SubReg_i32_lane imm:$lane)))>; |
| 1804 | def : Pat<(v4f32 (fmul (v4f32 QPR:$src1), |
| 1805 | (v4f32 (NEONvduplane (v4f32 QPR:$src2), imm:$lane)))), |
| 1806 | (v4f32 (VMULslfq (v4f32 QPR:$src1), |
| 1807 | (v2f32 (EXTRACT_SUBREG QPR:$src2, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1808 | (DSubReg_i32_reg imm:$lane))), |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1809 | (SubReg_i32_lane imm:$lane)))>; |
| 1810 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1811 | // VQDMULH : Vector Saturating Doubling Multiply Returning High Half |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1812 | defm VQDMULH : N3VInt_HS<0, 0, 0b1011, 0, IIC_VMULi16D, IIC_VMULi32D, |
| 1813 | IIC_VMULi16Q, IIC_VMULi32Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1814 | "vqdmulh", "s", int_arm_neon_vqdmulh, 1>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1815 | defm VQDMULHsl: N3VIntSL_HS<0b1100, IIC_VMULi16D, IIC_VMULi32D, |
| 1816 | IIC_VMULi16Q, IIC_VMULi32Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1817 | "vqdmulh", "s", int_arm_neon_vqdmulh>; |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1818 | def : Pat<(v8i16 (int_arm_neon_vqdmulh (v8i16 QPR:$src1), |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1819 | (v8i16 (NEONvduplane (v8i16 QPR:$src2), |
| 1820 | imm:$lane)))), |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1821 | (v8i16 (VQDMULHslv8i16 (v8i16 QPR:$src1), |
| 1822 | (v4i16 (EXTRACT_SUBREG QPR:$src2, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1823 | (DSubReg_i16_reg imm:$lane))), |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1824 | (SubReg_i16_lane imm:$lane)))>; |
| 1825 | def : Pat<(v4i32 (int_arm_neon_vqdmulh (v4i32 QPR:$src1), |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1826 | (v4i32 (NEONvduplane (v4i32 QPR:$src2), |
| 1827 | imm:$lane)))), |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1828 | (v4i32 (VQDMULHslv4i32 (v4i32 QPR:$src1), |
| 1829 | (v2i32 (EXTRACT_SUBREG QPR:$src2, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1830 | (DSubReg_i32_reg imm:$lane))), |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1831 | (SubReg_i32_lane imm:$lane)))>; |
| 1832 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1833 | // VQRDMULH : Vector Rounding Saturating Doubling Multiply Returning High Half |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1834 | defm VQRDMULH : N3VInt_HS<1, 0, 0b1011, 0, IIC_VMULi16D, IIC_VMULi32D, |
| 1835 | IIC_VMULi16Q, IIC_VMULi32Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1836 | "vqrdmulh", "s", int_arm_neon_vqrdmulh, 1>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1837 | defm VQRDMULHsl : N3VIntSL_HS<0b1101, IIC_VMULi16D, IIC_VMULi32D, |
| 1838 | IIC_VMULi16Q, IIC_VMULi32Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1839 | "vqrdmulh", "s", int_arm_neon_vqrdmulh>; |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1840 | def : Pat<(v8i16 (int_arm_neon_vqrdmulh (v8i16 QPR:$src1), |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1841 | (v8i16 (NEONvduplane (v8i16 QPR:$src2), |
| 1842 | imm:$lane)))), |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1843 | (v8i16 (VQRDMULHslv8i16 (v8i16 QPR:$src1), |
| 1844 | (v4i16 (EXTRACT_SUBREG QPR:$src2, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1845 | (DSubReg_i16_reg imm:$lane))), |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1846 | (SubReg_i16_lane imm:$lane)))>; |
| 1847 | def : Pat<(v4i32 (int_arm_neon_vqrdmulh (v4i32 QPR:$src1), |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1848 | (v4i32 (NEONvduplane (v4i32 QPR:$src2), |
| 1849 | imm:$lane)))), |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1850 | (v4i32 (VQRDMULHslv4i32 (v4i32 QPR:$src1), |
| 1851 | (v2i32 (EXTRACT_SUBREG QPR:$src2, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1852 | (DSubReg_i32_reg imm:$lane))), |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1853 | (SubReg_i32_lane imm:$lane)))>; |
| 1854 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1855 | // VMULL : Vector Multiply Long (integer and polynomial) (Q = D * D) |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1856 | defm VMULLs : N3VLInt_QHS<0,1,0b1100,0, IIC_VMULi16D, "vmull", "s", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1857 | int_arm_neon_vmulls, 1>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1858 | defm VMULLu : N3VLInt_QHS<1,1,0b1100,0, IIC_VMULi16D, "vmull", "u", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1859 | int_arm_neon_vmullu, 1>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1860 | def VMULLp : N3VLInt<0, 1, 0b00, 0b1110, 0, IIC_VMULi16D, "vmull", "p8", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1861 | v8i16, v8i8, int_arm_neon_vmullp, 1>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1862 | defm VMULLsls : N3VLIntSL_HS<0, 0b1010, IIC_VMULi16D, "vmull", "s", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1863 | int_arm_neon_vmulls>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1864 | defm VMULLslu : N3VLIntSL_HS<1, 0b1010, IIC_VMULi16D, "vmull", "u", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1865 | int_arm_neon_vmullu>; |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1866 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1867 | // VQDMULL : Vector Saturating Doubling Multiply Long (Q = D * D) |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1868 | defm VQDMULL : N3VLInt_HS<0,1,0b1101,0, IIC_VMULi16D, "vqdmull", "s", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1869 | int_arm_neon_vqdmull, 1>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1870 | defm VQDMULLsl: N3VLIntSL_HS<0, 0b1011, IIC_VMULi16D, "vqdmull", "s", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1871 | int_arm_neon_vqdmull>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1872 | |
| 1873 | // Vector Multiply-Accumulate and Multiply-Subtract Operations. |
| 1874 | |
| 1875 | // VMLA : Vector Multiply Accumulate (integer and floating-point) |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1876 | defm VMLA : N3VMulOp_QHS<0, 0, 0b1001, 0, IIC_VMACi16D, IIC_VMACi32D, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1877 | IIC_VMACi16Q, IIC_VMACi32Q, "vmla", "i", add>; |
| 1878 | def VMLAfd : N3VDMulOp<0, 0, 0b00, 0b1101, 1, IIC_VMACD, "vmla", "f32", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1879 | v2f32, fmul, fadd>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1880 | def VMLAfq : N3VQMulOp<0, 0, 0b00, 0b1101, 1, IIC_VMACQ, "vmla", "f32", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1881 | v4f32, fmul, fadd>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1882 | defm VMLAsl : N3VMulOpSL_HS<0b0000, IIC_VMACi16D, IIC_VMACi32D, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1883 | IIC_VMACi16Q, IIC_VMACi32Q, "vmla", "i", add>; |
| 1884 | def VMLAslfd : N3VDMulOpSL<0b10, 0b0001, IIC_VMACD, "vmla", "f32", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1885 | v2f32, fmul, fadd>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1886 | def VMLAslfq : N3VQMulOpSL<0b10, 0b0001, IIC_VMACQ, "vmla", "f32", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1887 | v4f32, v2f32, fmul, fadd>; |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1888 | |
| 1889 | def : Pat<(v8i16 (add (v8i16 QPR:$src1), |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1890 | (mul (v8i16 QPR:$src2), |
| 1891 | (v8i16 (NEONvduplane (v8i16 QPR:$src3), imm:$lane))))), |
| 1892 | (v8i16 (VMLAslv8i16 (v8i16 QPR:$src1), (v8i16 QPR:$src2), |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1893 | (v4i16 (EXTRACT_SUBREG QPR:$src3, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1894 | (DSubReg_i16_reg imm:$lane))), |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1895 | (SubReg_i16_lane imm:$lane)))>; |
| 1896 | |
| 1897 | def : Pat<(v4i32 (add (v4i32 QPR:$src1), |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1898 | (mul (v4i32 QPR:$src2), |
| 1899 | (v4i32 (NEONvduplane (v4i32 QPR:$src3), imm:$lane))))), |
| 1900 | (v4i32 (VMLAslv4i32 (v4i32 QPR:$src1), (v4i32 QPR:$src2), |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1901 | (v2i32 (EXTRACT_SUBREG QPR:$src3, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1902 | (DSubReg_i32_reg imm:$lane))), |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1903 | (SubReg_i32_lane imm:$lane)))>; |
| 1904 | |
| 1905 | def : Pat<(v4f32 (fadd (v4f32 QPR:$src1), |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1906 | (fmul (v4f32 QPR:$src2), |
| 1907 | (v4f32 (NEONvduplane (v4f32 QPR:$src3), imm:$lane))))), |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1908 | (v4f32 (VMLAslfq (v4f32 QPR:$src1), |
| 1909 | (v4f32 QPR:$src2), |
| 1910 | (v2f32 (EXTRACT_SUBREG QPR:$src3, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1911 | (DSubReg_i32_reg imm:$lane))), |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1912 | (SubReg_i32_lane imm:$lane)))>; |
| 1913 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1914 | // VMLAL : Vector Multiply Accumulate Long (Q += D * D) |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1915 | defm VMLALs : N3VLInt3_QHS<0,1,0b1000,0, "vmlal", "s", int_arm_neon_vmlals>; |
| 1916 | defm VMLALu : N3VLInt3_QHS<1,1,0b1000,0, "vmlal", "u", int_arm_neon_vmlalu>; |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1917 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1918 | defm VMLALsls : N3VLInt3SL_HS<0, 0b0010, "vmlal", "s", int_arm_neon_vmlals>; |
| 1919 | defm VMLALslu : N3VLInt3SL_HS<1, 0b0010, "vmlal", "u", int_arm_neon_vmlalu>; |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1920 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1921 | // VQDMLAL : Vector Saturating Doubling Multiply Accumulate Long (Q += D * D) |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1922 | defm VQDMLAL : N3VLInt3_HS<0, 1, 0b1001, 0, "vqdmlal", "s", |
| 1923 | int_arm_neon_vqdmlal>; |
| 1924 | defm VQDMLALsl: N3VLInt3SL_HS<0, 0b0011, "vqdmlal", "s", int_arm_neon_vqdmlal>; |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1925 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1926 | // VMLS : Vector Multiply Subtract (integer and floating-point) |
Bob Wilson | 64c6091 | 2009-10-03 04:41:21 +0000 | [diff] [blame] | 1927 | defm VMLS : N3VMulOp_QHS<1, 0, 0b1001, 0, IIC_VMACi16D, IIC_VMACi32D, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1928 | IIC_VMACi16Q, IIC_VMACi32Q, "vmls", "i", sub>; |
| 1929 | def VMLSfd : N3VDMulOp<0, 0, 0b10, 0b1101, 1, IIC_VMACD, "vmls", "f32", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1930 | v2f32, fmul, fsub>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1931 | def VMLSfq : N3VQMulOp<0, 0, 0b10, 0b1101, 1, IIC_VMACQ, "vmls", "f32", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1932 | v4f32, fmul, fsub>; |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1933 | defm VMLSsl : N3VMulOpSL_HS<0b0100, IIC_VMACi16D, IIC_VMACi32D, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1934 | IIC_VMACi16Q, IIC_VMACi32Q, "vmls", "i", sub>; |
| 1935 | def VMLSslfd : N3VDMulOpSL<0b10, 0b0101, IIC_VMACD, "vmls", "f32", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1936 | v2f32, fmul, fsub>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1937 | def VMLSslfq : N3VQMulOpSL<0b10, 0b0101, IIC_VMACQ, "vmls", "f32", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1938 | v4f32, v2f32, fmul, fsub>; |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1939 | |
| 1940 | def : Pat<(v8i16 (sub (v8i16 QPR:$src1), |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1941 | (mul (v8i16 QPR:$src2), |
| 1942 | (v8i16 (NEONvduplane (v8i16 QPR:$src3), imm:$lane))))), |
| 1943 | (v8i16 (VMLSslv8i16 (v8i16 QPR:$src1), (v8i16 QPR:$src2), |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1944 | (v4i16 (EXTRACT_SUBREG QPR:$src3, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1945 | (DSubReg_i16_reg imm:$lane))), |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1946 | (SubReg_i16_lane imm:$lane)))>; |
| 1947 | |
| 1948 | def : Pat<(v4i32 (sub (v4i32 QPR:$src1), |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1949 | (mul (v4i32 QPR:$src2), |
| 1950 | (v4i32 (NEONvduplane (v4i32 QPR:$src3), imm:$lane))))), |
| 1951 | (v4i32 (VMLSslv4i32 (v4i32 QPR:$src1), (v4i32 QPR:$src2), |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1952 | (v2i32 (EXTRACT_SUBREG QPR:$src3, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1953 | (DSubReg_i32_reg imm:$lane))), |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1954 | (SubReg_i32_lane imm:$lane)))>; |
| 1955 | |
| 1956 | def : Pat<(v4f32 (fsub (v4f32 QPR:$src1), |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1957 | (fmul (v4f32 QPR:$src2), |
| 1958 | (v4f32 (NEONvduplane (v4f32 QPR:$src3), imm:$lane))))), |
| 1959 | (v4f32 (VMLSslfq (v4f32 QPR:$src1), (v4f32 QPR:$src2), |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1960 | (v2f32 (EXTRACT_SUBREG QPR:$src3, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1961 | (DSubReg_i32_reg imm:$lane))), |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1962 | (SubReg_i32_lane imm:$lane)))>; |
| 1963 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1964 | // VMLSL : Vector Multiply Subtract Long (Q -= D * D) |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1965 | defm VMLSLs : N3VLInt3_QHS<0,1,0b1010,0, "vmlsl", "s", int_arm_neon_vmlsls>; |
| 1966 | defm VMLSLu : N3VLInt3_QHS<1,1,0b1010,0, "vmlsl", "u", int_arm_neon_vmlslu>; |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1967 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1968 | defm VMLSLsls : N3VLInt3SL_HS<0, 0b0110, "vmlsl", "s", int_arm_neon_vmlsls>; |
| 1969 | defm VMLSLslu : N3VLInt3SL_HS<1, 0b0110, "vmlsl", "u", int_arm_neon_vmlslu>; |
Anton Korobeynikov | dd52819 | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1970 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1971 | // VQDMLSL : Vector Saturating Doubling Multiply Subtract Long (Q -= D * D) |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1972 | defm VQDMLSL : N3VLInt3_HS<0, 1, 0b1011, 0, "vqdmlsl", "s", |
| 1973 | int_arm_neon_vqdmlsl>; |
| 1974 | defm VQDMLSLsl: N3VLInt3SL_HS<0, 0b111, "vqdmlsl", "s", int_arm_neon_vqdmlsl>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1975 | |
| 1976 | // Vector Subtract Operations. |
| 1977 | |
| 1978 | // VSUB : Vector Subtract (integer and floating-point) |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1979 | defm VSUB : N3V_QHSD<1, 0, 0b1000, 0, IIC_VSUBiD, IIC_VSUBiQ, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1980 | "vsub", "i", sub, 0>; |
| 1981 | def VSUBfd : N3VD<0, 0, 0b10, 0b1101, 0, IIC_VBIND, "vsub", "f32", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1982 | v2f32, v2f32, fsub, 0>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1983 | def VSUBfq : N3VQ<0, 0, 0b10, 0b1101, 0, IIC_VBINQ, "vsub", "f32", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1984 | v4f32, v4f32, fsub, 0>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1985 | // VSUBL : Vector Subtract Long (Q = D - D) |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1986 | defm VSUBLs : N3VLInt_QHS<0,1,0b0010,0, IIC_VSHLiD, "vsubl", "s", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1987 | int_arm_neon_vsubls, 1>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1988 | defm VSUBLu : N3VLInt_QHS<1,1,0b0010,0, IIC_VSHLiD, "vsubl", "u", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1989 | int_arm_neon_vsublu, 1>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1990 | // VSUBW : Vector Subtract Wide (Q = Q - D) |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1991 | defm VSUBWs : N3VWInt_QHS<0,1,0b0011,0, "vsubw", "s", int_arm_neon_vsubws, 0>; |
| 1992 | defm VSUBWu : N3VWInt_QHS<1,1,0b0011,0, "vsubw", "u", int_arm_neon_vsubwu, 0>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1993 | // VHSUB : Vector Halving Subtract |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1994 | defm VHSUBs : N3VInt_QHS<0, 0, 0b0010, 0, IIC_VBINi4D, IIC_VBINi4D, |
| 1995 | IIC_VBINi4Q, IIC_VBINi4Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1996 | "vhsub", "s", int_arm_neon_vhsubs, 0>; |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1997 | defm VHSUBu : N3VInt_QHS<1, 0, 0b0010, 0, IIC_VBINi4D, IIC_VBINi4D, |
| 1998 | IIC_VBINi4Q, IIC_VBINi4Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1999 | "vhsub", "u", int_arm_neon_vhsubu, 0>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2000 | // VQSUB : Vector Saturing Subtract |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2001 | defm VQSUBs : N3VInt_QHSD<0, 0, 0b0010, 1, IIC_VBINi4D, IIC_VBINi4D, |
| 2002 | IIC_VBINi4Q, IIC_VBINi4Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2003 | "vqsub", "s", int_arm_neon_vqsubs, 0>; |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2004 | defm VQSUBu : N3VInt_QHSD<1, 0, 0b0010, 1, IIC_VBINi4D, IIC_VBINi4D, |
| 2005 | IIC_VBINi4Q, IIC_VBINi4Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2006 | "vqsub", "u", int_arm_neon_vqsubu, 0>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2007 | // VSUBHN : Vector Subtract and Narrow Returning High Half (D = Q - Q) |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2008 | defm VSUBHN : N3VNInt_HSD<0,1,0b0110,0, "vsubhn", "i", |
| 2009 | int_arm_neon_vsubhn, 0>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2010 | // VRSUBHN : Vector Rounding Subtract and Narrow Returning High Half (D=Q-Q) |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2011 | defm VRSUBHN : N3VNInt_HSD<1,1,0b0110,0, "vrsubhn", "i", |
| 2012 | int_arm_neon_vrsubhn, 0>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2013 | |
| 2014 | // Vector Comparisons. |
| 2015 | |
| 2016 | // VCEQ : Vector Compare Equal |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2017 | defm VCEQ : N3V_QHS<1, 0, 0b1000, 1, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2018 | IIC_VBINi4Q, "vceq", "i", NEONvceq, 1>; |
| 2019 | def VCEQfd : N3VD<0,0,0b00,0b1110,0, IIC_VBIND, "vceq", "f32", v2i32, v2f32, |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2020 | NEONvceq, 1>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2021 | def VCEQfq : N3VQ<0,0,0b00,0b1110,0, IIC_VBINQ, "vceq", "f32", v4i32, v4f32, |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2022 | NEONvceq, 1>; |
Johnny Chen | fc9ef99 | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 2023 | // For disassembly only. |
Johnny Chen | c2b70b5 | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 2024 | defm VCEQz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00010, 0, "vceq", "i", |
| 2025 | "$dst, $src, #0">; |
Johnny Chen | fc9ef99 | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 2026 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2027 | // VCGE : Vector Compare Greater Than or Equal |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2028 | defm VCGEs : N3V_QHS<0, 0, 0b0011, 1, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2029 | IIC_VBINi4Q, "vcge", "s", NEONvcge, 0>; |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2030 | defm VCGEu : N3V_QHS<1, 0, 0b0011, 1, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2031 | IIC_VBINi4Q, "vcge", "u", NEONvcgeu, 0>; |
| 2032 | def VCGEfd : N3VD<1,0,0b00,0b1110,0, IIC_VBIND, "vcge", "f32", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2033 | v2i32, v2f32, NEONvcge, 0>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2034 | def VCGEfq : N3VQ<1,0,0b00,0b1110,0, IIC_VBINQ, "vcge", "f32", v4i32, v4f32, |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2035 | NEONvcge, 0>; |
Johnny Chen | c2b70b5 | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 2036 | // For disassembly only. |
| 2037 | defm VCGEz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00001, 0, "vcge", "s", |
| 2038 | "$dst, $src, #0">; |
| 2039 | // For disassembly only. |
| 2040 | defm VCLEz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00011, 0, "vcle", "s", |
| 2041 | "$dst, $src, #0">; |
| 2042 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2043 | // VCGT : Vector Compare Greater Than |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2044 | defm VCGTs : N3V_QHS<0, 0, 0b0011, 0, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2045 | IIC_VBINi4Q, "vcgt", "s", NEONvcgt, 0>; |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2046 | defm VCGTu : N3V_QHS<1, 0, 0b0011, 0, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2047 | IIC_VBINi4Q, "vcgt", "u", NEONvcgtu, 0>; |
| 2048 | def VCGTfd : N3VD<1,0,0b10,0b1110,0, IIC_VBIND, "vcgt", "f32", v2i32, v2f32, |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2049 | NEONvcgt, 0>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2050 | def VCGTfq : N3VQ<1,0,0b10,0b1110,0, IIC_VBINQ, "vcgt", "f32", v4i32, v4f32, |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2051 | NEONvcgt, 0>; |
Johnny Chen | c2b70b5 | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 2052 | // For disassembly only. |
| 2053 | defm VCGTz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00000, 0, "vcgt", "s", |
| 2054 | "$dst, $src, #0">; |
| 2055 | // For disassembly only. |
| 2056 | defm VCLTz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00100, 0, "vclt", "s", |
| 2057 | "$dst, $src, #0">; |
| 2058 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2059 | // VACGE : Vector Absolute Compare Greater Than or Equal (aka VCAGE) |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2060 | def VACGEd : N3VDInt<1, 0, 0b00, 0b1110, 1, IIC_VBIND, "vacge", "f32", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2061 | v2i32, v2f32, int_arm_neon_vacged, 0>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2062 | def VACGEq : N3VQInt<1, 0, 0b00, 0b1110, 1, IIC_VBINQ, "vacge", "f32", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2063 | v4i32, v4f32, int_arm_neon_vacgeq, 0>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2064 | // VACGT : Vector Absolute Compare Greater Than (aka VCAGT) |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2065 | def VACGTd : N3VDInt<1, 0, 0b10, 0b1110, 1, IIC_VBIND, "vacgt", "f32", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2066 | v2i32, v2f32, int_arm_neon_vacgtd, 0>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2067 | def VACGTq : N3VQInt<1, 0, 0b10, 0b1110, 1, IIC_VBINQ, "vacgt", "f32", |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2068 | v4i32, v4f32, int_arm_neon_vacgtq, 0>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2069 | // VTST : Vector Test Bits |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2070 | defm VTST : N3V_QHS<0, 0, 0b1000, 1, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, |
Bob Wilson | a21a9cc | 2010-01-17 06:35:17 +0000 | [diff] [blame] | 2071 | IIC_VBINi4Q, "vtst", "", NEONvtst, 1>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2072 | |
| 2073 | // Vector Bitwise Operations. |
| 2074 | |
| 2075 | // VAND : Vector Bitwise AND |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2076 | def VANDd : N3VDX<0, 0, 0b00, 0b0001, 1, IIC_VBINiD, "vand", |
| 2077 | v2i32, v2i32, and, 1>; |
| 2078 | def VANDq : N3VQX<0, 0, 0b00, 0b0001, 1, IIC_VBINiQ, "vand", |
| 2079 | v4i32, v4i32, and, 1>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2080 | |
| 2081 | // VEOR : Vector Bitwise Exclusive OR |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2082 | def VEORd : N3VDX<1, 0, 0b00, 0b0001, 1, IIC_VBINiD, "veor", |
| 2083 | v2i32, v2i32, xor, 1>; |
| 2084 | def VEORq : N3VQX<1, 0, 0b00, 0b0001, 1, IIC_VBINiQ, "veor", |
| 2085 | v4i32, v4i32, xor, 1>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2086 | |
| 2087 | // VORR : Vector Bitwise OR |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2088 | def VORRd : N3VDX<0, 0, 0b10, 0b0001, 1, IIC_VBINiD, "vorr", |
| 2089 | v2i32, v2i32, or, 1>; |
| 2090 | def VORRq : N3VQX<0, 0, 0b10, 0b0001, 1, IIC_VBINiQ, "vorr", |
| 2091 | v4i32, v4i32, or, 1>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2092 | |
| 2093 | // VBIC : Vector Bitwise Bit Clear (AND NOT) |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2094 | def VBICd : N3VX<0, 0, 0b01, 0b0001, 0, 1, (outs DPR:$dst), |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2095 | (ins DPR:$src1, DPR:$src2), IIC_VBINiD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2096 | "vbic", "$dst, $src1, $src2", "", |
Anton Korobeynikov | 14636a5 | 2009-09-08 22:51:43 +0000 | [diff] [blame] | 2097 | [(set DPR:$dst, (v2i32 (and DPR:$src1, |
| 2098 | (vnot_conv DPR:$src2))))]>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2099 | def VBICq : N3VX<0, 0, 0b01, 0b0001, 1, 1, (outs QPR:$dst), |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2100 | (ins QPR:$src1, QPR:$src2), IIC_VBINiQ, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2101 | "vbic", "$dst, $src1, $src2", "", |
Anton Korobeynikov | 14636a5 | 2009-09-08 22:51:43 +0000 | [diff] [blame] | 2102 | [(set QPR:$dst, (v4i32 (and QPR:$src1, |
| 2103 | (vnot_conv QPR:$src2))))]>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2104 | |
| 2105 | // VORN : Vector Bitwise OR NOT |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2106 | def VORNd : N3VX<0, 0, 0b11, 0b0001, 0, 1, (outs DPR:$dst), |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2107 | (ins DPR:$src1, DPR:$src2), IIC_VBINiD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2108 | "vorn", "$dst, $src1, $src2", "", |
Anton Korobeynikov | 14636a5 | 2009-09-08 22:51:43 +0000 | [diff] [blame] | 2109 | [(set DPR:$dst, (v2i32 (or DPR:$src1, |
| 2110 | (vnot_conv DPR:$src2))))]>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2111 | def VORNq : N3VX<0, 0, 0b11, 0b0001, 1, 1, (outs QPR:$dst), |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2112 | (ins QPR:$src1, QPR:$src2), IIC_VBINiQ, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2113 | "vorn", "$dst, $src1, $src2", "", |
Anton Korobeynikov | 14636a5 | 2009-09-08 22:51:43 +0000 | [diff] [blame] | 2114 | [(set QPR:$dst, (v4i32 (or QPR:$src1, |
| 2115 | (vnot_conv QPR:$src2))))]>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2116 | |
| 2117 | // VMVN : Vector Bitwise NOT |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2118 | def VMVNd : N2VX<0b11, 0b11, 0b00, 0b00, 0b01011, 0, 0, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2119 | (outs DPR:$dst), (ins DPR:$src), IIC_VSHLiD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2120 | "vmvn", "$dst, $src", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2121 | [(set DPR:$dst, (v2i32 (vnot DPR:$src)))]>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2122 | def VMVNq : N2VX<0b11, 0b11, 0b00, 0b00, 0b01011, 1, 0, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2123 | (outs QPR:$dst), (ins QPR:$src), IIC_VSHLiD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2124 | "vmvn", "$dst, $src", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2125 | [(set QPR:$dst, (v4i32 (vnot QPR:$src)))]>; |
| 2126 | def : Pat<(v2i32 (vnot_conv DPR:$src)), (VMVNd DPR:$src)>; |
| 2127 | def : Pat<(v4i32 (vnot_conv QPR:$src)), (VMVNq QPR:$src)>; |
| 2128 | |
| 2129 | // VBSL : Vector Bitwise Select |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2130 | def VBSLd : N3VX<1, 0, 0b01, 0b0001, 0, 1, (outs DPR:$dst), |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2131 | (ins DPR:$src1, DPR:$src2, DPR:$src3), IIC_VCNTiD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2132 | "vbsl", "$dst, $src2, $src3", "$src1 = $dst", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2133 | [(set DPR:$dst, |
| 2134 | (v2i32 (or (and DPR:$src2, DPR:$src1), |
Anton Korobeynikov | 14636a5 | 2009-09-08 22:51:43 +0000 | [diff] [blame] | 2135 | (and DPR:$src3, (vnot_conv DPR:$src1)))))]>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2136 | def VBSLq : N3VX<1, 0, 0b01, 0b0001, 1, 1, (outs QPR:$dst), |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2137 | (ins QPR:$src1, QPR:$src2, QPR:$src3), IIC_VCNTiQ, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2138 | "vbsl", "$dst, $src2, $src3", "$src1 = $dst", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2139 | [(set QPR:$dst, |
| 2140 | (v4i32 (or (and QPR:$src2, QPR:$src1), |
Anton Korobeynikov | 14636a5 | 2009-09-08 22:51:43 +0000 | [diff] [blame] | 2141 | (and QPR:$src3, (vnot_conv QPR:$src1)))))]>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2142 | |
| 2143 | // VBIF : Vector Bitwise Insert if False |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2144 | // like VBSL but with: "vbif $dst, $src3, $src1", "$src2 = $dst", |
Johnny Chen | 7c313be | 2010-02-09 23:05:23 +0000 | [diff] [blame] | 2145 | def VBIFd : N3VX<1, 0, 0b11, 0b0001, 0, 1, |
| 2146 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2, DPR:$src3), |
| 2147 | IIC_VBINiD, "vbif", "$dst, $src2, $src3", "$src1 = $dst", |
| 2148 | [/* For disassembly only; pattern left blank */]>; |
| 2149 | def VBIFq : N3VX<1, 0, 0b11, 0b0001, 1, 1, |
| 2150 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2, QPR:$src3), |
| 2151 | IIC_VBINiQ, "vbif", "$dst, $src2, $src3", "$src1 = $dst", |
| 2152 | [/* For disassembly only; pattern left blank */]>; |
| 2153 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2154 | // VBIT : Vector Bitwise Insert if True |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2155 | // like VBSL but with: "vbit $dst, $src2, $src1", "$src3 = $dst", |
Johnny Chen | 7c313be | 2010-02-09 23:05:23 +0000 | [diff] [blame] | 2156 | def VBITd : N3VX<1, 0, 0b10, 0b0001, 0, 1, |
| 2157 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2, DPR:$src3), |
| 2158 | IIC_VBINiD, "vbit", "$dst, $src2, $src3", "$src1 = $dst", |
| 2159 | [/* For disassembly only; pattern left blank */]>; |
| 2160 | def VBITq : N3VX<1, 0, 0b10, 0b0001, 1, 1, |
| 2161 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2, QPR:$src3), |
| 2162 | IIC_VBINiQ, "vbit", "$dst, $src2, $src3", "$src1 = $dst", |
| 2163 | [/* For disassembly only; pattern left blank */]>; |
| 2164 | |
| 2165 | // VBIT/VBIF are not yet implemented. The TwoAddress pass will not go looking |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2166 | // for equivalent operations with different register constraints; it just |
| 2167 | // inserts copies. |
| 2168 | |
| 2169 | // Vector Absolute Differences. |
| 2170 | |
| 2171 | // VABD : Vector Absolute Difference |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2172 | defm VABDs : N3VInt_QHS<0, 0, 0b0111, 0, IIC_VBINi4D, IIC_VBINi4D, |
| 2173 | IIC_VBINi4Q, IIC_VBINi4Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2174 | "vabd", "s", int_arm_neon_vabds, 0>; |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2175 | defm VABDu : N3VInt_QHS<1, 0, 0b0111, 0, IIC_VBINi4D, IIC_VBINi4D, |
| 2176 | IIC_VBINi4Q, IIC_VBINi4Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2177 | "vabd", "u", int_arm_neon_vabdu, 0>; |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2178 | def VABDfd : N3VDInt<1, 0, 0b10, 0b1101, 0, IIC_VBIND, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2179 | "vabd", "f32", v2f32, v2f32, int_arm_neon_vabds, 0>; |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2180 | def VABDfq : N3VQInt<1, 0, 0b10, 0b1101, 0, IIC_VBINQ, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2181 | "vabd", "f32", v4f32, v4f32, int_arm_neon_vabds, 0>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2182 | |
| 2183 | // VABDL : Vector Absolute Difference Long (Q = | D - D |) |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2184 | defm VABDLs : N3VLInt_QHS<0,1,0b0111,0, IIC_VBINi4Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2185 | "vabdl", "s", int_arm_neon_vabdls, 0>; |
Evan Cheng | 67abcec | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2186 | defm VABDLu : N3VLInt_QHS<1,1,0b0111,0, IIC_VBINi4Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2187 | "vabdl", "u", int_arm_neon_vabdlu, 0>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2188 | |
| 2189 | // VABA : Vector Absolute Difference and Accumulate |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2190 | defm VABAs : N3VInt3_QHS<0,0,0b0111,1, "vaba", "s", int_arm_neon_vabas>; |
| 2191 | defm VABAu : N3VInt3_QHS<1,0,0b0111,1, "vaba", "u", int_arm_neon_vabau>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2192 | |
| 2193 | // VABAL : Vector Absolute Difference and Accumulate Long (Q += | D - D |) |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2194 | defm VABALs : N3VLInt3_QHS<0,1,0b0101,0, "vabal", "s", int_arm_neon_vabals>; |
| 2195 | defm VABALu : N3VLInt3_QHS<1,1,0b0101,0, "vabal", "u", int_arm_neon_vabalu>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2196 | |
| 2197 | // Vector Maximum and Minimum. |
| 2198 | |
| 2199 | // VMAX : Vector Maximum |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2200 | defm VMAXs : N3VInt_QHS<0,0,0b0110,0, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2201 | IIC_VBINi4Q, "vmax", "s", int_arm_neon_vmaxs, 1>; |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2202 | defm VMAXu : N3VInt_QHS<1,0,0b0110,0, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2203 | IIC_VBINi4Q, "vmax", "u", int_arm_neon_vmaxu, 1>; |
| 2204 | def VMAXfd : N3VDInt<0, 0, 0b00, 0b1111, 0, IIC_VBIND, "vmax", "f32", |
| 2205 | v2f32, v2f32, int_arm_neon_vmaxs, 1>; |
| 2206 | def VMAXfq : N3VQInt<0, 0, 0b00, 0b1111, 0, IIC_VBINQ, "vmax", "f32", |
| 2207 | v4f32, v4f32, int_arm_neon_vmaxs, 1>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2208 | |
| 2209 | // VMIN : Vector Minimum |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2210 | defm VMINs : N3VInt_QHS<0,0,0b0110,1, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2211 | IIC_VBINi4Q, "vmin", "s", int_arm_neon_vmins, 1>; |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2212 | defm VMINu : N3VInt_QHS<1,0,0b0110,1, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2213 | IIC_VBINi4Q, "vmin", "u", int_arm_neon_vminu, 1>; |
| 2214 | def VMINfd : N3VDInt<0, 0, 0b10, 0b1111, 0, IIC_VBIND, "vmin", "f32", |
| 2215 | v2f32, v2f32, int_arm_neon_vmins, 1>; |
| 2216 | def VMINfq : N3VQInt<0, 0, 0b10, 0b1111, 0, IIC_VBINQ, "vmin", "f32", |
| 2217 | v4f32, v4f32, int_arm_neon_vmins, 1>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2218 | |
| 2219 | // Vector Pairwise Operations. |
| 2220 | |
| 2221 | // VPADD : Vector Pairwise Add |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2222 | def VPADDi8 : N3VDInt<0, 0, 0b00, 0b1011, 1, IIC_VBINiD, "vpadd", "i8", |
| 2223 | v8i8, v8i8, int_arm_neon_vpadd, 0>; |
| 2224 | def VPADDi16 : N3VDInt<0, 0, 0b01, 0b1011, 1, IIC_VBINiD, "vpadd", "i16", |
| 2225 | v4i16, v4i16, int_arm_neon_vpadd, 0>; |
| 2226 | def VPADDi32 : N3VDInt<0, 0, 0b10, 0b1011, 1, IIC_VBINiD, "vpadd", "i32", |
| 2227 | v2i32, v2i32, int_arm_neon_vpadd, 0>; |
| 2228 | def VPADDf : N3VDInt<1, 0, 0b00, 0b1101, 0, IIC_VBIND, "vpadd", "f32", |
| 2229 | v2f32, v2f32, int_arm_neon_vpadd, 0>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2230 | |
| 2231 | // VPADDL : Vector Pairwise Add Long |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2232 | defm VPADDLs : N2VPLInt_QHS<0b11, 0b11, 0b00, 0b00100, 0, "vpaddl", "s", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2233 | int_arm_neon_vpaddls>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2234 | defm VPADDLu : N2VPLInt_QHS<0b11, 0b11, 0b00, 0b00101, 0, "vpaddl", "u", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2235 | int_arm_neon_vpaddlu>; |
| 2236 | |
| 2237 | // VPADAL : Vector Pairwise Add and Accumulate Long |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2238 | defm VPADALs : N2VPLInt2_QHS<0b11, 0b11, 0b00, 0b01100, 0, "vpadal", "s", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2239 | int_arm_neon_vpadals>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2240 | defm VPADALu : N2VPLInt2_QHS<0b11, 0b11, 0b00, 0b01101, 0, "vpadal", "u", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2241 | int_arm_neon_vpadalu>; |
| 2242 | |
| 2243 | // VPMAX : Vector Pairwise Maximum |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2244 | def VPMAXs8 : N3VDInt<0, 0, 0b00, 0b1010, 0, IIC_VBINi4D, "vpmax", "s8", |
| 2245 | v8i8, v8i8, int_arm_neon_vpmaxs, 0>; |
| 2246 | def VPMAXs16 : N3VDInt<0, 0, 0b01, 0b1010, 0, IIC_VBINi4D, "vpmax", "s16", |
| 2247 | v4i16, v4i16, int_arm_neon_vpmaxs, 0>; |
| 2248 | def VPMAXs32 : N3VDInt<0, 0, 0b10, 0b1010, 0, IIC_VBINi4D, "vpmax", "s32", |
| 2249 | v2i32, v2i32, int_arm_neon_vpmaxs, 0>; |
| 2250 | def VPMAXu8 : N3VDInt<1, 0, 0b00, 0b1010, 0, IIC_VBINi4D, "vpmax", "u8", |
| 2251 | v8i8, v8i8, int_arm_neon_vpmaxu, 0>; |
| 2252 | def VPMAXu16 : N3VDInt<1, 0, 0b01, 0b1010, 0, IIC_VBINi4D, "vpmax", "u16", |
| 2253 | v4i16, v4i16, int_arm_neon_vpmaxu, 0>; |
| 2254 | def VPMAXu32 : N3VDInt<1, 0, 0b10, 0b1010, 0, IIC_VBINi4D, "vpmax", "u32", |
| 2255 | v2i32, v2i32, int_arm_neon_vpmaxu, 0>; |
| 2256 | def VPMAXf : N3VDInt<1, 0, 0b00, 0b1111, 0, IIC_VBINi4D, "vpmax", "f32", |
| 2257 | v2f32, v2f32, int_arm_neon_vpmaxs, 0>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2258 | |
| 2259 | // VPMIN : Vector Pairwise Minimum |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2260 | def VPMINs8 : N3VDInt<0, 0, 0b00, 0b1010, 1, IIC_VBINi4D, "vpmin", "s8", |
| 2261 | v8i8, v8i8, int_arm_neon_vpmins, 0>; |
| 2262 | def VPMINs16 : N3VDInt<0, 0, 0b01, 0b1010, 1, IIC_VBINi4D, "vpmin", "s16", |
| 2263 | v4i16, v4i16, int_arm_neon_vpmins, 0>; |
| 2264 | def VPMINs32 : N3VDInt<0, 0, 0b10, 0b1010, 1, IIC_VBINi4D, "vpmin", "s32", |
| 2265 | v2i32, v2i32, int_arm_neon_vpmins, 0>; |
| 2266 | def VPMINu8 : N3VDInt<1, 0, 0b00, 0b1010, 1, IIC_VBINi4D, "vpmin", "u8", |
| 2267 | v8i8, v8i8, int_arm_neon_vpminu, 0>; |
| 2268 | def VPMINu16 : N3VDInt<1, 0, 0b01, 0b1010, 1, IIC_VBINi4D, "vpmin", "u16", |
| 2269 | v4i16, v4i16, int_arm_neon_vpminu, 0>; |
| 2270 | def VPMINu32 : N3VDInt<1, 0, 0b10, 0b1010, 1, IIC_VBINi4D, "vpmin", "u32", |
| 2271 | v2i32, v2i32, int_arm_neon_vpminu, 0>; |
| 2272 | def VPMINf : N3VDInt<1, 0, 0b10, 0b1111, 0, IIC_VBINi4D, "vpmin", "f32", |
| 2273 | v2f32, v2f32, int_arm_neon_vpmins, 0>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2274 | |
| 2275 | // Vector Reciprocal and Reciprocal Square Root Estimate and Step. |
| 2276 | |
| 2277 | // VRECPE : Vector Reciprocal Estimate |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2278 | def VRECPEd : N2VDInt<0b11, 0b11, 0b10, 0b11, 0b01000, 0, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2279 | IIC_VUNAD, "vrecpe", "u32", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2280 | v2i32, v2i32, int_arm_neon_vrecpe>; |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2281 | def VRECPEq : N2VQInt<0b11, 0b11, 0b10, 0b11, 0b01000, 0, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2282 | IIC_VUNAQ, "vrecpe", "u32", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2283 | v4i32, v4i32, int_arm_neon_vrecpe>; |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2284 | def VRECPEfd : N2VDInt<0b11, 0b11, 0b10, 0b11, 0b01010, 0, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2285 | IIC_VUNAD, "vrecpe", "f32", |
Bob Wilson | 8f10b3f | 2009-08-11 05:39:44 +0000 | [diff] [blame] | 2286 | v2f32, v2f32, int_arm_neon_vrecpe>; |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2287 | def VRECPEfq : N2VQInt<0b11, 0b11, 0b10, 0b11, 0b01010, 0, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2288 | IIC_VUNAQ, "vrecpe", "f32", |
Bob Wilson | 8f10b3f | 2009-08-11 05:39:44 +0000 | [diff] [blame] | 2289 | v4f32, v4f32, int_arm_neon_vrecpe>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2290 | |
| 2291 | // VRECPS : Vector Reciprocal Step |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2292 | def VRECPSfd : N3VDInt<0, 0, 0b00, 0b1111, 1, |
| 2293 | IIC_VRECSD, "vrecps", "f32", |
| 2294 | v2f32, v2f32, int_arm_neon_vrecps, 1>; |
| 2295 | def VRECPSfq : N3VQInt<0, 0, 0b00, 0b1111, 1, |
| 2296 | IIC_VRECSQ, "vrecps", "f32", |
| 2297 | v4f32, v4f32, int_arm_neon_vrecps, 1>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2298 | |
| 2299 | // VRSQRTE : Vector Reciprocal Square Root Estimate |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2300 | def VRSQRTEd : N2VDInt<0b11, 0b11, 0b10, 0b11, 0b01001, 0, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2301 | IIC_VUNAD, "vrsqrte", "u32", |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2302 | v2i32, v2i32, int_arm_neon_vrsqrte>; |
| 2303 | def VRSQRTEq : N2VQInt<0b11, 0b11, 0b10, 0b11, 0b01001, 0, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2304 | IIC_VUNAQ, "vrsqrte", "u32", |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2305 | v4i32, v4i32, int_arm_neon_vrsqrte>; |
| 2306 | def VRSQRTEfd : N2VDInt<0b11, 0b11, 0b10, 0b11, 0b01011, 0, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2307 | IIC_VUNAD, "vrsqrte", "f32", |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2308 | v2f32, v2f32, int_arm_neon_vrsqrte>; |
| 2309 | def VRSQRTEfq : N2VQInt<0b11, 0b11, 0b10, 0b11, 0b01011, 0, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2310 | IIC_VUNAQ, "vrsqrte", "f32", |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2311 | v4f32, v4f32, int_arm_neon_vrsqrte>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2312 | |
| 2313 | // VRSQRTS : Vector Reciprocal Square Root Step |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2314 | def VRSQRTSfd : N3VDInt<0, 0, 0b10, 0b1111, 1, |
| 2315 | IIC_VRECSD, "vrsqrts", "f32", |
| 2316 | v2f32, v2f32, int_arm_neon_vrsqrts, 1>; |
| 2317 | def VRSQRTSfq : N3VQInt<0, 0, 0b10, 0b1111, 1, |
| 2318 | IIC_VRECSQ, "vrsqrts", "f32", |
| 2319 | v4f32, v4f32, int_arm_neon_vrsqrts, 1>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2320 | |
| 2321 | // Vector Shifts. |
| 2322 | |
| 2323 | // VSHL : Vector Shift |
Johnny Chen | 7c3f386 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 2324 | defm VSHLs : N3VInt_QHSD<0, 0, 0b0100, 0, IIC_VSHLiD, IIC_VSHLiD, IIC_VSHLiQ, |
| 2325 | IIC_VSHLiQ, "vshl", "s", int_arm_neon_vshifts, 0>; |
| 2326 | defm VSHLu : N3VInt_QHSD<1, 0, 0b0100, 0, IIC_VSHLiD, IIC_VSHLiD, IIC_VSHLiQ, |
| 2327 | IIC_VSHLiQ, "vshl", "u", int_arm_neon_vshiftu, 0>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2328 | // VSHL : Vector Shift Left (Immediate) |
Johnny Chen | 7c3f386 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 2329 | defm VSHLi : N2VSh_QHSD<0, 1, 0b0101, 1, IIC_VSHLiD, "vshl", "i", NEONvshl>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2330 | // VSHR : Vector Shift Right (Immediate) |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2331 | defm VSHRs : N2VSh_QHSD<0, 1, 0b0000, 1, IIC_VSHLiD, "vshr", "s", NEONvshrs>; |
| 2332 | defm VSHRu : N2VSh_QHSD<1, 1, 0b0000, 1, IIC_VSHLiD, "vshr", "u", NEONvshru>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2333 | |
| 2334 | // VSHLL : Vector Shift Left Long |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2335 | defm VSHLLs : N2VLSh_QHS<0, 1, 0b1010, 0, 0, 1, "vshll", "s", NEONvshlls>; |
| 2336 | defm VSHLLu : N2VLSh_QHS<1, 1, 0b1010, 0, 0, 1, "vshll", "u", NEONvshllu>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2337 | |
| 2338 | // VSHLL : Vector Shift Left Long (with maximum shift count) |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2339 | class N2VLShMax<bit op24, bit op23, bits<6> op21_16, bits<4> op11_8, bit op7, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2340 | bit op6, bit op4, string OpcodeStr, string Dt, ValueType ResTy, |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2341 | ValueType OpTy, SDNode OpNode> |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2342 | : N2VLSh<op24, op23, op11_8, op7, op6, op4, OpcodeStr, Dt, |
| 2343 | ResTy, OpTy, OpNode> { |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2344 | let Inst{21-16} = op21_16; |
| 2345 | } |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2346 | def VSHLLi8 : N2VLShMax<1, 1, 0b110010, 0b0011, 0, 0, 0, "vshll", "i8", |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2347 | v8i16, v8i8, NEONvshlli>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2348 | def VSHLLi16 : N2VLShMax<1, 1, 0b110110, 0b0011, 0, 0, 0, "vshll", "i16", |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2349 | v4i32, v4i16, NEONvshlli>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2350 | def VSHLLi32 : N2VLShMax<1, 1, 0b111010, 0b0011, 0, 0, 0, "vshll", "i32", |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2351 | v2i64, v2i32, NEONvshlli>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2352 | |
| 2353 | // VSHRN : Vector Shift Right and Narrow |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2354 | defm VSHRN : N2VNSh_HSD<0,1,0b1000,0,0,1, IIC_VSHLiD, "vshrn", "i", |
| 2355 | NEONvshrn>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2356 | |
| 2357 | // VRSHL : Vector Rounding Shift |
Johnny Chen | 7c3f386 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 2358 | defm VRSHLs : N3VInt_QHSD<0,0,0b0101,0, IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, |
| 2359 | IIC_VSHLi4Q, "vrshl", "s", int_arm_neon_vrshifts,0>; |
| 2360 | defm VRSHLu : N3VInt_QHSD<1,0,0b0101,0, IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, |
| 2361 | IIC_VSHLi4Q, "vrshl", "u", int_arm_neon_vrshiftu,0>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2362 | // VRSHR : Vector Rounding Shift Right |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2363 | defm VRSHRs : N2VSh_QHSD<0,1,0b0010,1, IIC_VSHLi4D, "vrshr", "s", NEONvrshrs>; |
| 2364 | defm VRSHRu : N2VSh_QHSD<1,1,0b0010,1, IIC_VSHLi4D, "vrshr", "u", NEONvrshru>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2365 | |
| 2366 | // VRSHRN : Vector Rounding Shift Right and Narrow |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2367 | defm VRSHRN : N2VNSh_HSD<0, 1, 0b1000, 0, 1, 1, IIC_VSHLi4D, "vrshrn", "i", |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2368 | NEONvrshrn>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2369 | |
| 2370 | // VQSHL : Vector Saturating Shift |
Johnny Chen | 7c3f386 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 2371 | defm VQSHLs : N3VInt_QHSD<0,0,0b0100,1, IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, |
| 2372 | IIC_VSHLi4Q, "vqshl", "s", int_arm_neon_vqshifts,0>; |
| 2373 | defm VQSHLu : N3VInt_QHSD<1,0,0b0100,1, IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, |
| 2374 | IIC_VSHLi4Q, "vqshl", "u", int_arm_neon_vqshiftu,0>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2375 | // VQSHL : Vector Saturating Shift Left (Immediate) |
Johnny Chen | 7c3f386 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 2376 | defm VQSHLsi : N2VSh_QHSD<0,1,0b0111,1, IIC_VSHLi4D, "vqshl", "s", NEONvqshls>; |
| 2377 | defm VQSHLui : N2VSh_QHSD<1,1,0b0111,1, IIC_VSHLi4D, "vqshl", "u", NEONvqshlu>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2378 | // VQSHLU : Vector Saturating Shift Left (Immediate, Unsigned) |
Johnny Chen | 7c3f386 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 2379 | defm VQSHLsu : N2VSh_QHSD<1,1,0b0110,1, IIC_VSHLi4D, "vqshlu","s",NEONvqshlsu>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2380 | |
| 2381 | // VQSHRN : Vector Saturating Shift Right and Narrow |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2382 | defm VQSHRNs : N2VNSh_HSD<0, 1, 0b1001, 0, 0, 1, IIC_VSHLi4D, "vqshrn", "s", |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2383 | NEONvqshrns>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2384 | defm VQSHRNu : N2VNSh_HSD<1, 1, 0b1001, 0, 0, 1, IIC_VSHLi4D, "vqshrn", "u", |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2385 | NEONvqshrnu>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2386 | |
| 2387 | // VQSHRUN : Vector Saturating Shift Right and Narrow (Unsigned) |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2388 | defm VQSHRUN : N2VNSh_HSD<1, 1, 0b1000, 0, 0, 1, IIC_VSHLi4D, "vqshrun", "s", |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2389 | NEONvqshrnsu>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2390 | |
| 2391 | // VQRSHL : Vector Saturating Rounding Shift |
Johnny Chen | 7c3f386 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 2392 | defm VQRSHLs : N3VInt_QHSD<0,0,0b0101,1, IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, |
| 2393 | IIC_VSHLi4Q, "vqrshl", "s", |
| 2394 | int_arm_neon_vqrshifts, 0>; |
| 2395 | defm VQRSHLu : N3VInt_QHSD<1,0,0b0101,1, IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, |
| 2396 | IIC_VSHLi4Q, "vqrshl", "u", |
| 2397 | int_arm_neon_vqrshiftu, 0>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2398 | |
| 2399 | // VQRSHRN : Vector Saturating Rounding Shift Right and Narrow |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2400 | defm VQRSHRNs : N2VNSh_HSD<0, 1, 0b1001, 0, 1, 1, IIC_VSHLi4D, "vqrshrn", "s", |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2401 | NEONvqrshrns>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2402 | defm VQRSHRNu : N2VNSh_HSD<1, 1, 0b1001, 0, 1, 1, IIC_VSHLi4D, "vqrshrn", "u", |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2403 | NEONvqrshrnu>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2404 | |
| 2405 | // VQRSHRUN : Vector Saturating Rounding Shift Right and Narrow (Unsigned) |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2406 | defm VQRSHRUN : N2VNSh_HSD<1, 1, 0b1000, 0, 1, 1, IIC_VSHLi4D, "vqrshrun", "s", |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2407 | NEONvqrshrnsu>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2408 | |
| 2409 | // VSRA : Vector Shift Right and Accumulate |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2410 | defm VSRAs : N2VShAdd_QHSD<0, 1, 0b0001, 1, "vsra", "s", NEONvshrs>; |
| 2411 | defm VSRAu : N2VShAdd_QHSD<1, 1, 0b0001, 1, "vsra", "u", NEONvshru>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2412 | // VRSRA : Vector Rounding Shift Right and Accumulate |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2413 | defm VRSRAs : N2VShAdd_QHSD<0, 1, 0b0011, 1, "vrsra", "s", NEONvrshrs>; |
| 2414 | defm VRSRAu : N2VShAdd_QHSD<1, 1, 0b0011, 1, "vrsra", "u", NEONvrshru>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2415 | |
| 2416 | // VSLI : Vector Shift Left and Insert |
Johnny Chen | 7c3f386 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 2417 | defm VSLI : N2VShIns_QHSD<1, 1, 0b0101, 1, "vsli", NEONvsli>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2418 | // VSRI : Vector Shift Right and Insert |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2419 | defm VSRI : N2VShIns_QHSD<1, 1, 0b0100, 1, "vsri", NEONvsri>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2420 | |
| 2421 | // Vector Absolute and Saturating Absolute. |
| 2422 | |
| 2423 | // VABS : Vector Absolute Value |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2424 | defm VABS : N2VInt_QHS<0b11, 0b11, 0b01, 0b00110, 0, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2425 | IIC_VUNAiD, IIC_VUNAiQ, "vabs", "s", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2426 | int_arm_neon_vabs>; |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2427 | def VABSfd : N2VDInt<0b11, 0b11, 0b10, 0b01, 0b01110, 0, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2428 | IIC_VUNAD, "vabs", "f32", |
Bob Wilson | 8f10b3f | 2009-08-11 05:39:44 +0000 | [diff] [blame] | 2429 | v2f32, v2f32, int_arm_neon_vabs>; |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2430 | def VABSfq : N2VQInt<0b11, 0b11, 0b10, 0b01, 0b01110, 0, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2431 | IIC_VUNAQ, "vabs", "f32", |
Bob Wilson | 8f10b3f | 2009-08-11 05:39:44 +0000 | [diff] [blame] | 2432 | v4f32, v4f32, int_arm_neon_vabs>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2433 | |
| 2434 | // VQABS : Vector Saturating Absolute Value |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2435 | defm VQABS : N2VInt_QHS<0b11, 0b11, 0b00, 0b01110, 0, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2436 | IIC_VQUNAiD, IIC_VQUNAiQ, "vqabs", "s", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2437 | int_arm_neon_vqabs>; |
| 2438 | |
| 2439 | // Vector Negate. |
| 2440 | |
| 2441 | def vneg : PatFrag<(ops node:$in), (sub immAllZerosV, node:$in)>; |
| 2442 | def vneg_conv : PatFrag<(ops node:$in), (sub immAllZerosV_bc, node:$in)>; |
| 2443 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2444 | class VNEGD<bits<2> size, string OpcodeStr, string Dt, ValueType Ty> |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2445 | : N2V<0b11, 0b11, size, 0b01, 0b00111, 0, 0, (outs DPR:$dst), (ins DPR:$src), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2446 | IIC_VSHLiD, OpcodeStr, Dt, "$dst, $src", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2447 | [(set DPR:$dst, (Ty (vneg DPR:$src)))]>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2448 | class VNEGQ<bits<2> size, string OpcodeStr, string Dt, ValueType Ty> |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2449 | : N2V<0b11, 0b11, size, 0b01, 0b00111, 1, 0, (outs QPR:$dst), (ins QPR:$src), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2450 | IIC_VSHLiD, OpcodeStr, Dt, "$dst, $src", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2451 | [(set QPR:$dst, (Ty (vneg QPR:$src)))]>; |
| 2452 | |
| 2453 | // VNEG : Vector Negate |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2454 | def VNEGs8d : VNEGD<0b00, "vneg", "s8", v8i8>; |
| 2455 | def VNEGs16d : VNEGD<0b01, "vneg", "s16", v4i16>; |
| 2456 | def VNEGs32d : VNEGD<0b10, "vneg", "s32", v2i32>; |
| 2457 | def VNEGs8q : VNEGQ<0b00, "vneg", "s8", v16i8>; |
| 2458 | def VNEGs16q : VNEGQ<0b01, "vneg", "s16", v8i16>; |
| 2459 | def VNEGs32q : VNEGQ<0b10, "vneg", "s32", v4i32>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2460 | |
| 2461 | // VNEG : Vector Negate (floating-point) |
Bob Wilson | 154999f | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 2462 | def VNEGfd : N2V<0b11, 0b11, 0b10, 0b01, 0b01111, 0, 0, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2463 | (outs DPR:$dst), (ins DPR:$src), IIC_VUNAD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2464 | "vneg", "f32", "$dst, $src", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2465 | [(set DPR:$dst, (v2f32 (fneg DPR:$src)))]>; |
| 2466 | def VNEGf32q : N2V<0b11, 0b11, 0b10, 0b01, 0b01111, 1, 0, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2467 | (outs QPR:$dst), (ins QPR:$src), IIC_VUNAQ, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2468 | "vneg", "f32", "$dst, $src", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2469 | [(set QPR:$dst, (v4f32 (fneg QPR:$src)))]>; |
| 2470 | |
| 2471 | def : Pat<(v8i8 (vneg_conv DPR:$src)), (VNEGs8d DPR:$src)>; |
| 2472 | def : Pat<(v4i16 (vneg_conv DPR:$src)), (VNEGs16d DPR:$src)>; |
| 2473 | def : Pat<(v2i32 (vneg_conv DPR:$src)), (VNEGs32d DPR:$src)>; |
| 2474 | def : Pat<(v16i8 (vneg_conv QPR:$src)), (VNEGs8q QPR:$src)>; |
| 2475 | def : Pat<(v8i16 (vneg_conv QPR:$src)), (VNEGs16q QPR:$src)>; |
| 2476 | def : Pat<(v4i32 (vneg_conv QPR:$src)), (VNEGs32q QPR:$src)>; |
| 2477 | |
| 2478 | // VQNEG : Vector Saturating Negate |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2479 | defm VQNEG : N2VInt_QHS<0b11, 0b11, 0b00, 0b01111, 0, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2480 | IIC_VQUNAiD, IIC_VQUNAiQ, "vqneg", "s", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2481 | int_arm_neon_vqneg>; |
| 2482 | |
| 2483 | // Vector Bit Counting Operations. |
| 2484 | |
| 2485 | // VCLS : Vector Count Leading Sign Bits |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2486 | defm VCLS : N2VInt_QHS<0b11, 0b11, 0b00, 0b01000, 0, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2487 | IIC_VCNTiD, IIC_VCNTiQ, "vcls", "s", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2488 | int_arm_neon_vcls>; |
| 2489 | // VCLZ : Vector Count Leading Zeros |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2490 | defm VCLZ : N2VInt_QHS<0b11, 0b11, 0b00, 0b01001, 0, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2491 | IIC_VCNTiD, IIC_VCNTiQ, "vclz", "i", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2492 | int_arm_neon_vclz>; |
| 2493 | // VCNT : Vector Count One Bits |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2494 | def VCNTd : N2VDInt<0b11, 0b11, 0b00, 0b00, 0b01010, 0, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2495 | IIC_VCNTiD, "vcnt", "8", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2496 | v8i8, v8i8, int_arm_neon_vcnt>; |
David Goodwin | 78caa12 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2497 | def VCNTq : N2VQInt<0b11, 0b11, 0b00, 0b00, 0b01010, 0, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2498 | IIC_VCNTiQ, "vcnt", "8", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2499 | v16i8, v16i8, int_arm_neon_vcnt>; |
| 2500 | |
Johnny Chen | ed5852c | 2010-02-24 20:06:07 +0000 | [diff] [blame] | 2501 | // Vector Swap -- for disassembly only. |
| 2502 | def VSWPd : N2VX<0b11, 0b11, 0b00, 0b10, 0b00000, 0, 0, |
| 2503 | (outs DPR:$dst), (ins DPR:$src), NoItinerary, |
| 2504 | "vswp", "$dst, $src", "", []>; |
| 2505 | def VSWPq : N2VX<0b11, 0b11, 0b00, 0b10, 0b00000, 1, 0, |
| 2506 | (outs QPR:$dst), (ins QPR:$src), NoItinerary, |
| 2507 | "vswp", "$dst, $src", "", []>; |
| 2508 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2509 | // Vector Move Operations. |
| 2510 | |
| 2511 | // VMOV : Vector Move (Register) |
| 2512 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2513 | def VMOVDneon: N3VX<0, 0, 0b10, 0b0001, 0, 1, (outs DPR:$dst), (ins DPR:$src), |
| 2514 | IIC_VMOVD, "vmov", "$dst, $src", "", []>; |
| 2515 | def VMOVQ : N3VX<0, 0, 0b10, 0b0001, 1, 1, (outs QPR:$dst), (ins QPR:$src), |
| 2516 | IIC_VMOVD, "vmov", "$dst, $src", "", []>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2517 | |
| 2518 | // VMOV : Vector Move (Immediate) |
| 2519 | |
| 2520 | // VMOV_get_imm8 xform function: convert build_vector to VMOV.i8 imm. |
| 2521 | def VMOV_get_imm8 : SDNodeXForm<build_vector, [{ |
| 2522 | return ARM::getVMOVImm(N, 1, *CurDAG); |
| 2523 | }]>; |
| 2524 | def vmovImm8 : PatLeaf<(build_vector), [{ |
| 2525 | return ARM::getVMOVImm(N, 1, *CurDAG).getNode() != 0; |
| 2526 | }], VMOV_get_imm8>; |
| 2527 | |
| 2528 | // VMOV_get_imm16 xform function: convert build_vector to VMOV.i16 imm. |
| 2529 | def VMOV_get_imm16 : SDNodeXForm<build_vector, [{ |
| 2530 | return ARM::getVMOVImm(N, 2, *CurDAG); |
| 2531 | }]>; |
| 2532 | def vmovImm16 : PatLeaf<(build_vector), [{ |
| 2533 | return ARM::getVMOVImm(N, 2, *CurDAG).getNode() != 0; |
| 2534 | }], VMOV_get_imm16>; |
| 2535 | |
| 2536 | // VMOV_get_imm32 xform function: convert build_vector to VMOV.i32 imm. |
| 2537 | def VMOV_get_imm32 : SDNodeXForm<build_vector, [{ |
| 2538 | return ARM::getVMOVImm(N, 4, *CurDAG); |
| 2539 | }]>; |
| 2540 | def vmovImm32 : PatLeaf<(build_vector), [{ |
| 2541 | return ARM::getVMOVImm(N, 4, *CurDAG).getNode() != 0; |
| 2542 | }], VMOV_get_imm32>; |
| 2543 | |
| 2544 | // VMOV_get_imm64 xform function: convert build_vector to VMOV.i64 imm. |
| 2545 | def VMOV_get_imm64 : SDNodeXForm<build_vector, [{ |
| 2546 | return ARM::getVMOVImm(N, 8, *CurDAG); |
| 2547 | }]>; |
| 2548 | def vmovImm64 : PatLeaf<(build_vector), [{ |
| 2549 | return ARM::getVMOVImm(N, 8, *CurDAG).getNode() != 0; |
| 2550 | }], VMOV_get_imm64>; |
| 2551 | |
| 2552 | // Note: Some of the cmode bits in the following VMOV instructions need to |
| 2553 | // be encoded based on the immed values. |
| 2554 | |
| 2555 | def VMOVv8i8 : N1ModImm<1, 0b000, 0b1110, 0, 0, 0, 1, (outs DPR:$dst), |
Bob Wilson | 6a14a00 | 2009-11-06 23:33:28 +0000 | [diff] [blame] | 2556 | (ins h8imm:$SIMM), IIC_VMOVImm, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2557 | "vmov", "i8", "$dst, $SIMM", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2558 | [(set DPR:$dst, (v8i8 vmovImm8:$SIMM))]>; |
| 2559 | def VMOVv16i8 : N1ModImm<1, 0b000, 0b1110, 0, 1, 0, 1, (outs QPR:$dst), |
Bob Wilson | 6a14a00 | 2009-11-06 23:33:28 +0000 | [diff] [blame] | 2560 | (ins h8imm:$SIMM), IIC_VMOVImm, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2561 | "vmov", "i8", "$dst, $SIMM", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2562 | [(set QPR:$dst, (v16i8 vmovImm8:$SIMM))]>; |
| 2563 | |
Johnny Chen | cf4fad2 | 2009-12-01 00:02:02 +0000 | [diff] [blame] | 2564 | def VMOVv4i16 : N1ModImm<1, 0b000, {1,0,?,?}, 0, 0, {?}, 1, (outs DPR:$dst), |
Bob Wilson | 6a14a00 | 2009-11-06 23:33:28 +0000 | [diff] [blame] | 2565 | (ins h16imm:$SIMM), IIC_VMOVImm, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2566 | "vmov", "i16", "$dst, $SIMM", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2567 | [(set DPR:$dst, (v4i16 vmovImm16:$SIMM))]>; |
Johnny Chen | cf4fad2 | 2009-12-01 00:02:02 +0000 | [diff] [blame] | 2568 | def VMOVv8i16 : N1ModImm<1, 0b000, {1,0,?,?}, 0, 1, {?}, 1, (outs QPR:$dst), |
Bob Wilson | 6a14a00 | 2009-11-06 23:33:28 +0000 | [diff] [blame] | 2569 | (ins h16imm:$SIMM), IIC_VMOVImm, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2570 | "vmov", "i16", "$dst, $SIMM", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2571 | [(set QPR:$dst, (v8i16 vmovImm16:$SIMM))]>; |
| 2572 | |
Johnny Chen | cf4fad2 | 2009-12-01 00:02:02 +0000 | [diff] [blame] | 2573 | def VMOVv2i32 : N1ModImm<1, 0b000, {?,?,?,?}, 0, 0, {?}, 1, (outs DPR:$dst), |
Bob Wilson | 6a14a00 | 2009-11-06 23:33:28 +0000 | [diff] [blame] | 2574 | (ins h32imm:$SIMM), IIC_VMOVImm, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2575 | "vmov", "i32", "$dst, $SIMM", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2576 | [(set DPR:$dst, (v2i32 vmovImm32:$SIMM))]>; |
Johnny Chen | cf4fad2 | 2009-12-01 00:02:02 +0000 | [diff] [blame] | 2577 | def VMOVv4i32 : N1ModImm<1, 0b000, {?,?,?,?}, 0, 1, {?}, 1, (outs QPR:$dst), |
Bob Wilson | 6a14a00 | 2009-11-06 23:33:28 +0000 | [diff] [blame] | 2578 | (ins h32imm:$SIMM), IIC_VMOVImm, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2579 | "vmov", "i32", "$dst, $SIMM", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2580 | [(set QPR:$dst, (v4i32 vmovImm32:$SIMM))]>; |
| 2581 | |
| 2582 | def VMOVv1i64 : N1ModImm<1, 0b000, 0b1110, 0, 0, 1, 1, (outs DPR:$dst), |
Bob Wilson | 6a14a00 | 2009-11-06 23:33:28 +0000 | [diff] [blame] | 2583 | (ins h64imm:$SIMM), IIC_VMOVImm, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2584 | "vmov", "i64", "$dst, $SIMM", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2585 | [(set DPR:$dst, (v1i64 vmovImm64:$SIMM))]>; |
| 2586 | def VMOVv2i64 : N1ModImm<1, 0b000, 0b1110, 0, 1, 1, 1, (outs QPR:$dst), |
Bob Wilson | 6a14a00 | 2009-11-06 23:33:28 +0000 | [diff] [blame] | 2587 | (ins h64imm:$SIMM), IIC_VMOVImm, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2588 | "vmov", "i64", "$dst, $SIMM", "", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2589 | [(set QPR:$dst, (v2i64 vmovImm64:$SIMM))]>; |
| 2590 | |
| 2591 | // VMOV : Vector Get Lane (move scalar to ARM core register) |
| 2592 | |
Johnny Chen | 0c1d2c1 | 2009-11-23 17:48:17 +0000 | [diff] [blame] | 2593 | def VGETLNs8 : NVGetLane<{1,1,1,0,0,1,?,1}, 0b1011, {?,?}, |
Bob Wilson | 30ff449 | 2009-08-21 21:58:55 +0000 | [diff] [blame] | 2594 | (outs GPR:$dst), (ins DPR:$src, nohash_imm:$lane), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2595 | IIC_VMOVSI, "vmov", "s8", "$dst, $src[$lane]", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2596 | [(set GPR:$dst, (NEONvgetlanes (v8i8 DPR:$src), |
| 2597 | imm:$lane))]>; |
Johnny Chen | 0c1d2c1 | 2009-11-23 17:48:17 +0000 | [diff] [blame] | 2598 | def VGETLNs16 : NVGetLane<{1,1,1,0,0,0,?,1}, 0b1011, {?,1}, |
Bob Wilson | 30ff449 | 2009-08-21 21:58:55 +0000 | [diff] [blame] | 2599 | (outs GPR:$dst), (ins DPR:$src, nohash_imm:$lane), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2600 | IIC_VMOVSI, "vmov", "s16", "$dst, $src[$lane]", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2601 | [(set GPR:$dst, (NEONvgetlanes (v4i16 DPR:$src), |
| 2602 | imm:$lane))]>; |
Johnny Chen | 0c1d2c1 | 2009-11-23 17:48:17 +0000 | [diff] [blame] | 2603 | def VGETLNu8 : NVGetLane<{1,1,1,0,1,1,?,1}, 0b1011, {?,?}, |
Bob Wilson | 30ff449 | 2009-08-21 21:58:55 +0000 | [diff] [blame] | 2604 | (outs GPR:$dst), (ins DPR:$src, nohash_imm:$lane), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2605 | IIC_VMOVSI, "vmov", "u8", "$dst, $src[$lane]", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2606 | [(set GPR:$dst, (NEONvgetlaneu (v8i8 DPR:$src), |
| 2607 | imm:$lane))]>; |
Johnny Chen | 0c1d2c1 | 2009-11-23 17:48:17 +0000 | [diff] [blame] | 2608 | def VGETLNu16 : NVGetLane<{1,1,1,0,1,0,?,1}, 0b1011, {?,1}, |
Bob Wilson | 30ff449 | 2009-08-21 21:58:55 +0000 | [diff] [blame] | 2609 | (outs GPR:$dst), (ins DPR:$src, nohash_imm:$lane), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2610 | IIC_VMOVSI, "vmov", "u16", "$dst, $src[$lane]", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2611 | [(set GPR:$dst, (NEONvgetlaneu (v4i16 DPR:$src), |
| 2612 | imm:$lane))]>; |
Johnny Chen | 0c1d2c1 | 2009-11-23 17:48:17 +0000 | [diff] [blame] | 2613 | def VGETLNi32 : NVGetLane<{1,1,1,0,0,0,?,1}, 0b1011, 0b00, |
Bob Wilson | 30ff449 | 2009-08-21 21:58:55 +0000 | [diff] [blame] | 2614 | (outs GPR:$dst), (ins DPR:$src, nohash_imm:$lane), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2615 | IIC_VMOVSI, "vmov", "32", "$dst, $src[$lane]", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2616 | [(set GPR:$dst, (extractelt (v2i32 DPR:$src), |
| 2617 | imm:$lane))]>; |
| 2618 | // def VGETLNf32: see FMRDH and FMRDL in ARMInstrVFP.td |
| 2619 | def : Pat<(NEONvgetlanes (v16i8 QPR:$src), imm:$lane), |
| 2620 | (VGETLNs8 (v8i8 (EXTRACT_SUBREG QPR:$src, |
Anton Korobeynikov | 49284e7 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2621 | (DSubReg_i8_reg imm:$lane))), |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2622 | (SubReg_i8_lane imm:$lane))>; |
| 2623 | def : Pat<(NEONvgetlanes (v8i16 QPR:$src), imm:$lane), |
| 2624 | (VGETLNs16 (v4i16 (EXTRACT_SUBREG QPR:$src, |
Anton Korobeynikov | 49284e7 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2625 | (DSubReg_i16_reg imm:$lane))), |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2626 | (SubReg_i16_lane imm:$lane))>; |
| 2627 | def : Pat<(NEONvgetlaneu (v16i8 QPR:$src), imm:$lane), |
| 2628 | (VGETLNu8 (v8i8 (EXTRACT_SUBREG QPR:$src, |
Anton Korobeynikov | 49284e7 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2629 | (DSubReg_i8_reg imm:$lane))), |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2630 | (SubReg_i8_lane imm:$lane))>; |
| 2631 | def : Pat<(NEONvgetlaneu (v8i16 QPR:$src), imm:$lane), |
| 2632 | (VGETLNu16 (v4i16 (EXTRACT_SUBREG QPR:$src, |
Anton Korobeynikov | 49284e7 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2633 | (DSubReg_i16_reg imm:$lane))), |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2634 | (SubReg_i16_lane imm:$lane))>; |
| 2635 | def : Pat<(extractelt (v4i32 QPR:$src), imm:$lane), |
| 2636 | (VGETLNi32 (v2i32 (EXTRACT_SUBREG QPR:$src, |
Anton Korobeynikov | 49284e7 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2637 | (DSubReg_i32_reg imm:$lane))), |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2638 | (SubReg_i32_lane imm:$lane))>; |
Anton Korobeynikov | 44e0a6c | 2009-08-28 23:41:26 +0000 | [diff] [blame] | 2639 | def : Pat<(extractelt (v2f32 DPR:$src1), imm:$src2), |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2640 | (EXTRACT_SUBREG (v2f32 (COPY_TO_REGCLASS (v2f32 DPR:$src1),DPR_VFP2)), |
Anton Korobeynikov | 3600d16 | 2009-09-12 22:21:08 +0000 | [diff] [blame] | 2641 | (SSubReg_f32_reg imm:$src2))>; |
Anton Korobeynikov | 49284e7 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2642 | def : Pat<(extractelt (v4f32 QPR:$src1), imm:$src2), |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2643 | (EXTRACT_SUBREG (v4f32 (COPY_TO_REGCLASS (v4f32 QPR:$src1),QPR_VFP2)), |
Anton Korobeynikov | 3600d16 | 2009-09-12 22:21:08 +0000 | [diff] [blame] | 2644 | (SSubReg_f32_reg imm:$src2))>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2645 | //def : Pat<(extractelt (v2i64 QPR:$src1), imm:$src2), |
Anton Korobeynikov | 49284e7 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2646 | // (EXTRACT_SUBREG QPR:$src1, (DSubReg_f64_reg imm:$src2))>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2647 | def : Pat<(extractelt (v2f64 QPR:$src1), imm:$src2), |
Anton Korobeynikov | 49284e7 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2648 | (EXTRACT_SUBREG QPR:$src1, (DSubReg_f64_reg imm:$src2))>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2649 | |
| 2650 | |
| 2651 | // VMOV : Vector Set Lane (move ARM core register to scalar) |
| 2652 | |
| 2653 | let Constraints = "$src1 = $dst" in { |
Johnny Chen | 0c1d2c1 | 2009-11-23 17:48:17 +0000 | [diff] [blame] | 2654 | def VSETLNi8 : NVSetLane<{1,1,1,0,0,1,?,0}, 0b1011, {?,?}, (outs DPR:$dst), |
Bob Wilson | 30ff449 | 2009-08-21 21:58:55 +0000 | [diff] [blame] | 2655 | (ins DPR:$src1, GPR:$src2, nohash_imm:$lane), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2656 | IIC_VMOVISL, "vmov", "8", "$dst[$lane], $src2", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2657 | [(set DPR:$dst, (vector_insert (v8i8 DPR:$src1), |
| 2658 | GPR:$src2, imm:$lane))]>; |
Johnny Chen | 0c1d2c1 | 2009-11-23 17:48:17 +0000 | [diff] [blame] | 2659 | def VSETLNi16 : NVSetLane<{1,1,1,0,0,0,?,0}, 0b1011, {?,1}, (outs DPR:$dst), |
Bob Wilson | 30ff449 | 2009-08-21 21:58:55 +0000 | [diff] [blame] | 2660 | (ins DPR:$src1, GPR:$src2, nohash_imm:$lane), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2661 | IIC_VMOVISL, "vmov", "16", "$dst[$lane], $src2", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2662 | [(set DPR:$dst, (vector_insert (v4i16 DPR:$src1), |
| 2663 | GPR:$src2, imm:$lane))]>; |
Johnny Chen | 0c1d2c1 | 2009-11-23 17:48:17 +0000 | [diff] [blame] | 2664 | def VSETLNi32 : NVSetLane<{1,1,1,0,0,0,?,0}, 0b1011, 0b00, (outs DPR:$dst), |
Bob Wilson | 30ff449 | 2009-08-21 21:58:55 +0000 | [diff] [blame] | 2665 | (ins DPR:$src1, GPR:$src2, nohash_imm:$lane), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2666 | IIC_VMOVISL, "vmov", "32", "$dst[$lane], $src2", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2667 | [(set DPR:$dst, (insertelt (v2i32 DPR:$src1), |
| 2668 | GPR:$src2, imm:$lane))]>; |
| 2669 | } |
| 2670 | def : Pat<(vector_insert (v16i8 QPR:$src1), GPR:$src2, imm:$lane), |
| 2671 | (v16i8 (INSERT_SUBREG QPR:$src1, |
Chris Lattner | 4e62472 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 2672 | (v8i8 (VSETLNi8 (v8i8 (EXTRACT_SUBREG QPR:$src1, |
Anton Korobeynikov | 49284e7 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2673 | (DSubReg_i8_reg imm:$lane))), |
Chris Lattner | 4e62472 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 2674 | GPR:$src2, (SubReg_i8_lane imm:$lane))), |
Anton Korobeynikov | 49284e7 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2675 | (DSubReg_i8_reg imm:$lane)))>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2676 | def : Pat<(vector_insert (v8i16 QPR:$src1), GPR:$src2, imm:$lane), |
| 2677 | (v8i16 (INSERT_SUBREG QPR:$src1, |
Chris Lattner | 4e62472 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 2678 | (v4i16 (VSETLNi16 (v4i16 (EXTRACT_SUBREG QPR:$src1, |
Anton Korobeynikov | 49284e7 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2679 | (DSubReg_i16_reg imm:$lane))), |
Chris Lattner | 4e62472 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 2680 | GPR:$src2, (SubReg_i16_lane imm:$lane))), |
Anton Korobeynikov | 49284e7 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2681 | (DSubReg_i16_reg imm:$lane)))>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2682 | def : Pat<(insertelt (v4i32 QPR:$src1), GPR:$src2, imm:$lane), |
| 2683 | (v4i32 (INSERT_SUBREG QPR:$src1, |
Chris Lattner | 4e62472 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 2684 | (v2i32 (VSETLNi32 (v2i32 (EXTRACT_SUBREG QPR:$src1, |
Anton Korobeynikov | 49284e7 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2685 | (DSubReg_i32_reg imm:$lane))), |
Chris Lattner | 4e62472 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 2686 | GPR:$src2, (SubReg_i32_lane imm:$lane))), |
Anton Korobeynikov | 49284e7 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2687 | (DSubReg_i32_reg imm:$lane)))>; |
| 2688 | |
Anton Korobeynikov | d335277 | 2009-08-30 19:06:39 +0000 | [diff] [blame] | 2689 | def : Pat<(v2f32 (insertelt DPR:$src1, SPR:$src2, imm:$src3)), |
Anton Korobeynikov | d933121 | 2009-11-02 00:11:39 +0000 | [diff] [blame] | 2690 | (INSERT_SUBREG (v2f32 (COPY_TO_REGCLASS DPR:$src1, DPR_VFP2)), |
| 2691 | SPR:$src2, (SSubReg_f32_reg imm:$src3))>; |
Anton Korobeynikov | 49284e7 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2692 | def : Pat<(v4f32 (insertelt QPR:$src1, SPR:$src2, imm:$src3)), |
Anton Korobeynikov | d933121 | 2009-11-02 00:11:39 +0000 | [diff] [blame] | 2693 | (INSERT_SUBREG (v4f32 (COPY_TO_REGCLASS QPR:$src1, QPR_VFP2)), |
| 2694 | SPR:$src2, (SSubReg_f32_reg imm:$src3))>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2695 | |
| 2696 | //def : Pat<(v2i64 (insertelt QPR:$src1, DPR:$src2, imm:$src3)), |
Anton Korobeynikov | 49284e7 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2697 | // (INSERT_SUBREG QPR:$src1, DPR:$src2, (DSubReg_f64_reg imm:$src3))>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2698 | def : Pat<(v2f64 (insertelt QPR:$src1, DPR:$src2, imm:$src3)), |
Anton Korobeynikov | 49284e7 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2699 | (INSERT_SUBREG QPR:$src1, DPR:$src2, (DSubReg_f64_reg imm:$src3))>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2700 | |
Anton Korobeynikov | baee7b2 | 2009-08-27 14:38:44 +0000 | [diff] [blame] | 2701 | def : Pat<(v2f32 (scalar_to_vector SPR:$src)), |
| 2702 | (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), SPR:$src, arm_ssubreg_0)>; |
Chris Lattner | c002b57 | 2010-03-15 00:52:43 +0000 | [diff] [blame] | 2703 | def : Pat<(v2f64 (scalar_to_vector (f64 DPR:$src))), |
Anton Korobeynikov | baee7b2 | 2009-08-27 14:38:44 +0000 | [diff] [blame] | 2704 | (INSERT_SUBREG (v2f64 (IMPLICIT_DEF)), DPR:$src, arm_dsubreg_0)>; |
| 2705 | def : Pat<(v4f32 (scalar_to_vector SPR:$src)), |
| 2706 | (INSERT_SUBREG (v4f32 (IMPLICIT_DEF)), SPR:$src, arm_ssubreg_0)>; |
| 2707 | |
Anton Korobeynikov | 872393c | 2009-08-27 16:10:17 +0000 | [diff] [blame] | 2708 | def : Pat<(v8i8 (scalar_to_vector GPR:$src)), |
| 2709 | (VSETLNi8 (v8i8 (IMPLICIT_DEF)), GPR:$src, (i32 0))>; |
| 2710 | def : Pat<(v4i16 (scalar_to_vector GPR:$src)), |
| 2711 | (VSETLNi16 (v4i16 (IMPLICIT_DEF)), GPR:$src, (i32 0))>; |
| 2712 | def : Pat<(v2i32 (scalar_to_vector GPR:$src)), |
| 2713 | (VSETLNi32 (v2i32 (IMPLICIT_DEF)), GPR:$src, (i32 0))>; |
| 2714 | |
| 2715 | def : Pat<(v16i8 (scalar_to_vector GPR:$src)), |
| 2716 | (INSERT_SUBREG (v16i8 (IMPLICIT_DEF)), |
| 2717 | (VSETLNi8 (v8i8 (IMPLICIT_DEF)), GPR:$src, (i32 0)), |
| 2718 | arm_dsubreg_0)>; |
| 2719 | def : Pat<(v8i16 (scalar_to_vector GPR:$src)), |
| 2720 | (INSERT_SUBREG (v8i16 (IMPLICIT_DEF)), |
| 2721 | (VSETLNi16 (v4i16 (IMPLICIT_DEF)), GPR:$src, (i32 0)), |
| 2722 | arm_dsubreg_0)>; |
| 2723 | def : Pat<(v4i32 (scalar_to_vector GPR:$src)), |
| 2724 | (INSERT_SUBREG (v4i32 (IMPLICIT_DEF)), |
| 2725 | (VSETLNi32 (v2i32 (IMPLICIT_DEF)), GPR:$src, (i32 0)), |
| 2726 | arm_dsubreg_0)>; |
| 2727 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2728 | // VDUP : Vector Duplicate (from ARM core register to all elements) |
| 2729 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2730 | class VDUPD<bits<8> opcod1, bits<2> opcod3, string Dt, ValueType Ty> |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2731 | : NVDup<opcod1, 0b1011, opcod3, (outs DPR:$dst), (ins GPR:$src), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2732 | IIC_VMOVIS, "vdup", Dt, "$dst, $src", |
Bob Wilson | f4f1a27 | 2009-08-14 05:13:08 +0000 | [diff] [blame] | 2733 | [(set DPR:$dst, (Ty (NEONvdup (i32 GPR:$src))))]>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2734 | class VDUPQ<bits<8> opcod1, bits<2> opcod3, string Dt, ValueType Ty> |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2735 | : NVDup<opcod1, 0b1011, opcod3, (outs QPR:$dst), (ins GPR:$src), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2736 | IIC_VMOVIS, "vdup", Dt, "$dst, $src", |
Bob Wilson | f4f1a27 | 2009-08-14 05:13:08 +0000 | [diff] [blame] | 2737 | [(set QPR:$dst, (Ty (NEONvdup (i32 GPR:$src))))]>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2738 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2739 | def VDUP8d : VDUPD<0b11101100, 0b00, "8", v8i8>; |
| 2740 | def VDUP16d : VDUPD<0b11101000, 0b01, "16", v4i16>; |
| 2741 | def VDUP32d : VDUPD<0b11101000, 0b00, "32", v2i32>; |
| 2742 | def VDUP8q : VDUPQ<0b11101110, 0b00, "8", v16i8>; |
| 2743 | def VDUP16q : VDUPQ<0b11101010, 0b01, "16", v8i16>; |
| 2744 | def VDUP32q : VDUPQ<0b11101010, 0b00, "32", v4i32>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2745 | |
| 2746 | def VDUPfd : NVDup<0b11101000, 0b1011, 0b00, (outs DPR:$dst), (ins GPR:$src), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2747 | IIC_VMOVIS, "vdup", "32", "$dst, $src", |
Bob Wilson | f4f1a27 | 2009-08-14 05:13:08 +0000 | [diff] [blame] | 2748 | [(set DPR:$dst, (v2f32 (NEONvdup |
| 2749 | (f32 (bitconvert GPR:$src)))))]>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2750 | def VDUPfq : NVDup<0b11101010, 0b1011, 0b00, (outs QPR:$dst), (ins GPR:$src), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2751 | IIC_VMOVIS, "vdup", "32", "$dst, $src", |
Bob Wilson | f4f1a27 | 2009-08-14 05:13:08 +0000 | [diff] [blame] | 2752 | [(set QPR:$dst, (v4f32 (NEONvdup |
| 2753 | (f32 (bitconvert GPR:$src)))))]>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2754 | |
| 2755 | // VDUP : Vector Duplicate Lane (from scalar to all elements) |
| 2756 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2757 | class VDUPLND<bits<2> op19_18, bits<2> op17_16, |
| 2758 | string OpcodeStr, string Dt, ValueType Ty> |
Johnny Chen | 9ee642f | 2009-11-23 21:00:43 +0000 | [diff] [blame] | 2759 | : N2V<0b11, 0b11, op19_18, op17_16, 0b11000, 0, 0, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2760 | (outs DPR:$dst), (ins DPR:$src, nohash_imm:$lane), IIC_VMOVD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2761 | OpcodeStr, Dt, "$dst, $src[$lane]", "", |
Bob Wilson | 206f6c4 | 2009-08-14 05:08:32 +0000 | [diff] [blame] | 2762 | [(set DPR:$dst, (Ty (NEONvduplane (Ty DPR:$src), imm:$lane)))]>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2763 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2764 | class VDUPLNQ<bits<2> op19_18, bits<2> op17_16, string OpcodeStr, string Dt, |
Johnny Chen | 9ee642f | 2009-11-23 21:00:43 +0000 | [diff] [blame] | 2765 | ValueType ResTy, ValueType OpTy> |
| 2766 | : N2V<0b11, 0b11, op19_18, op17_16, 0b11000, 1, 0, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2767 | (outs QPR:$dst), (ins DPR:$src, nohash_imm:$lane), IIC_VMOVD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2768 | OpcodeStr, Dt, "$dst, $src[$lane]", "", |
Bob Wilson | 206f6c4 | 2009-08-14 05:08:32 +0000 | [diff] [blame] | 2769 | [(set QPR:$dst, (ResTy (NEONvduplane (OpTy DPR:$src), imm:$lane)))]>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2770 | |
Bob Wilson | 52e0d9d | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2771 | // Inst{19-16} is partially specified depending on the element size. |
| 2772 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2773 | def VDUPLN8d : VDUPLND<{?,?}, {?,1}, "vdup", "8", v8i8>; |
| 2774 | def VDUPLN16d : VDUPLND<{?,?}, {1,0}, "vdup", "16", v4i16>; |
| 2775 | def VDUPLN32d : VDUPLND<{?,1}, {0,0}, "vdup", "32", v2i32>; |
| 2776 | def VDUPLNfd : VDUPLND<{?,1}, {0,0}, "vdup", "32", v2f32>; |
| 2777 | def VDUPLN8q : VDUPLNQ<{?,?}, {?,1}, "vdup", "8", v16i8, v8i8>; |
| 2778 | def VDUPLN16q : VDUPLNQ<{?,?}, {1,0}, "vdup", "16", v8i16, v4i16>; |
| 2779 | def VDUPLN32q : VDUPLNQ<{?,1}, {0,0}, "vdup", "32", v4i32, v2i32>; |
| 2780 | def VDUPLNfq : VDUPLNQ<{?,1}, {0,0}, "vdup", "32", v4f32, v2f32>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2781 | |
Bob Wilson | 206f6c4 | 2009-08-14 05:08:32 +0000 | [diff] [blame] | 2782 | def : Pat<(v16i8 (NEONvduplane (v16i8 QPR:$src), imm:$lane)), |
| 2783 | (v16i8 (VDUPLN8q (v8i8 (EXTRACT_SUBREG QPR:$src, |
| 2784 | (DSubReg_i8_reg imm:$lane))), |
| 2785 | (SubReg_i8_lane imm:$lane)))>; |
| 2786 | def : Pat<(v8i16 (NEONvduplane (v8i16 QPR:$src), imm:$lane)), |
| 2787 | (v8i16 (VDUPLN16q (v4i16 (EXTRACT_SUBREG QPR:$src, |
| 2788 | (DSubReg_i16_reg imm:$lane))), |
| 2789 | (SubReg_i16_lane imm:$lane)))>; |
| 2790 | def : Pat<(v4i32 (NEONvduplane (v4i32 QPR:$src), imm:$lane)), |
| 2791 | (v4i32 (VDUPLN32q (v2i32 (EXTRACT_SUBREG QPR:$src, |
| 2792 | (DSubReg_i32_reg imm:$lane))), |
| 2793 | (SubReg_i32_lane imm:$lane)))>; |
| 2794 | def : Pat<(v4f32 (NEONvduplane (v4f32 QPR:$src), imm:$lane)), |
| 2795 | (v4f32 (VDUPLNfq (v2f32 (EXTRACT_SUBREG QPR:$src, |
| 2796 | (DSubReg_i32_reg imm:$lane))), |
| 2797 | (SubReg_i32_lane imm:$lane)))>; |
| 2798 | |
Johnny Chen | 9ee642f | 2009-11-23 21:00:43 +0000 | [diff] [blame] | 2799 | def VDUPfdf : N2V<0b11, 0b11, {?,1}, {0,0}, 0b11000, 0, 0, |
| 2800 | (outs DPR:$dst), (ins SPR:$src), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2801 | IIC_VMOVD, "vdup", "32", "$dst, ${src:lane}", "", |
Johnny Chen | 9ee642f | 2009-11-23 21:00:43 +0000 | [diff] [blame] | 2802 | [(set DPR:$dst, (v2f32 (NEONvdup (f32 SPR:$src))))]>; |
Anton Korobeynikov | 9c913fb | 2009-08-07 22:36:50 +0000 | [diff] [blame] | 2803 | |
Johnny Chen | 9ee642f | 2009-11-23 21:00:43 +0000 | [diff] [blame] | 2804 | def VDUPfqf : N2V<0b11, 0b11, {?,1}, {0,0}, 0b11000, 1, 0, |
| 2805 | (outs QPR:$dst), (ins SPR:$src), |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2806 | IIC_VMOVD, "vdup", "32", "$dst, ${src:lane}", "", |
Johnny Chen | 9ee642f | 2009-11-23 21:00:43 +0000 | [diff] [blame] | 2807 | [(set QPR:$dst, (v4f32 (NEONvdup (f32 SPR:$src))))]>; |
Anton Korobeynikov | 9c913fb | 2009-08-07 22:36:50 +0000 | [diff] [blame] | 2808 | |
Anton Korobeynikov | b261a19 | 2009-09-02 21:21:28 +0000 | [diff] [blame] | 2809 | def : Pat<(v2i64 (NEONvduplane (v2i64 QPR:$src), imm:$lane)), |
| 2810 | (INSERT_SUBREG QPR:$src, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2811 | (i64 (EXTRACT_SUBREG QPR:$src, |
| 2812 | (DSubReg_f64_reg imm:$lane))), |
Anton Korobeynikov | b261a19 | 2009-09-02 21:21:28 +0000 | [diff] [blame] | 2813 | (DSubReg_f64_other_reg imm:$lane))>; |
| 2814 | def : Pat<(v2f64 (NEONvduplane (v2f64 QPR:$src), imm:$lane)), |
| 2815 | (INSERT_SUBREG QPR:$src, |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2816 | (f64 (EXTRACT_SUBREG QPR:$src, |
| 2817 | (DSubReg_f64_reg imm:$lane))), |
Anton Korobeynikov | b261a19 | 2009-09-02 21:21:28 +0000 | [diff] [blame] | 2818 | (DSubReg_f64_other_reg imm:$lane))>; |
| 2819 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2820 | // VMOVN : Vector Narrowing Move |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2821 | defm VMOVN : N2VNInt_HSD<0b11,0b11,0b10,0b00100,0,0, IIC_VMOVD, |
| 2822 | "vmovn", "i", int_arm_neon_vmovn>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2823 | // VQMOVN : Vector Saturating Narrowing Move |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2824 | defm VQMOVNs : N2VNInt_HSD<0b11,0b11,0b10,0b00101,0,0, IIC_VQUNAiD, |
| 2825 | "vqmovn", "s", int_arm_neon_vqmovns>; |
| 2826 | defm VQMOVNu : N2VNInt_HSD<0b11,0b11,0b10,0b00101,1,0, IIC_VQUNAiD, |
| 2827 | "vqmovn", "u", int_arm_neon_vqmovnu>; |
| 2828 | defm VQMOVNsu : N2VNInt_HSD<0b11,0b11,0b10,0b00100,1,0, IIC_VQUNAiD, |
| 2829 | "vqmovun", "s", int_arm_neon_vqmovnsu>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2830 | // VMOVL : Vector Lengthening Move |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2831 | defm VMOVLs : N2VLInt_QHS<0b01,0b10100,0,1, "vmovl", "s", |
| 2832 | int_arm_neon_vmovls>; |
| 2833 | defm VMOVLu : N2VLInt_QHS<0b11,0b10100,0,1, "vmovl", "u", |
| 2834 | int_arm_neon_vmovlu>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2835 | |
| 2836 | // Vector Conversions. |
| 2837 | |
Johnny Chen | 09a4376 | 2010-03-17 17:52:21 +0000 | [diff] [blame] | 2838 | // VCVT : Vector Convert Between Floating-Point and Integers |
Johnny Chen | 7c3f386 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 2839 | def VCVTf2sd : N2VD<0b11, 0b11, 0b10, 0b11, 0b01110, 0, "vcvt", "s32.f32", |
| 2840 | v2i32, v2f32, fp_to_sint>; |
| 2841 | def VCVTf2ud : N2VD<0b11, 0b11, 0b10, 0b11, 0b01111, 0, "vcvt", "u32.f32", |
| 2842 | v2i32, v2f32, fp_to_uint>; |
| 2843 | def VCVTs2fd : N2VD<0b11, 0b11, 0b10, 0b11, 0b01100, 0, "vcvt", "f32.s32", |
| 2844 | v2f32, v2i32, sint_to_fp>; |
| 2845 | def VCVTu2fd : N2VD<0b11, 0b11, 0b10, 0b11, 0b01101, 0, "vcvt", "f32.u32", |
| 2846 | v2f32, v2i32, uint_to_fp>; |
Johnny Chen | 09a4376 | 2010-03-17 17:52:21 +0000 | [diff] [blame] | 2847 | |
Johnny Chen | 7c3f386 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 2848 | def VCVTf2sq : N2VQ<0b11, 0b11, 0b10, 0b11, 0b01110, 0, "vcvt", "s32.f32", |
| 2849 | v4i32, v4f32, fp_to_sint>; |
| 2850 | def VCVTf2uq : N2VQ<0b11, 0b11, 0b10, 0b11, 0b01111, 0, "vcvt", "u32.f32", |
| 2851 | v4i32, v4f32, fp_to_uint>; |
| 2852 | def VCVTs2fq : N2VQ<0b11, 0b11, 0b10, 0b11, 0b01100, 0, "vcvt", "f32.s32", |
| 2853 | v4f32, v4i32, sint_to_fp>; |
| 2854 | def VCVTu2fq : N2VQ<0b11, 0b11, 0b10, 0b11, 0b01101, 0, "vcvt", "f32.u32", |
| 2855 | v4f32, v4i32, uint_to_fp>; |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2856 | |
| 2857 | // VCVT : Vector Convert Between Floating-Point and Fixed-Point. |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2858 | def VCVTf2xsd : N2VCvtD<0, 1, 0b1111, 0, 1, "vcvt", "s32.f32", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2859 | v2i32, v2f32, int_arm_neon_vcvtfp2fxs>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2860 | def VCVTf2xud : N2VCvtD<1, 1, 0b1111, 0, 1, "vcvt", "u32.f32", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2861 | v2i32, v2f32, int_arm_neon_vcvtfp2fxu>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2862 | def VCVTxs2fd : N2VCvtD<0, 1, 0b1110, 0, 1, "vcvt", "f32.s32", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2863 | v2f32, v2i32, int_arm_neon_vcvtfxs2fp>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2864 | def VCVTxu2fd : N2VCvtD<1, 1, 0b1110, 0, 1, "vcvt", "f32.u32", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2865 | v2f32, v2i32, int_arm_neon_vcvtfxu2fp>; |
| 2866 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2867 | def VCVTf2xsq : N2VCvtQ<0, 1, 0b1111, 0, 1, "vcvt", "s32.f32", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2868 | v4i32, v4f32, int_arm_neon_vcvtfp2fxs>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2869 | def VCVTf2xuq : N2VCvtQ<1, 1, 0b1111, 0, 1, "vcvt", "u32.f32", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2870 | v4i32, v4f32, int_arm_neon_vcvtfp2fxu>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2871 | def VCVTxs2fq : N2VCvtQ<0, 1, 0b1110, 0, 1, "vcvt", "f32.s32", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2872 | v4f32, v4i32, int_arm_neon_vcvtfxs2fp>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2873 | def VCVTxu2fq : N2VCvtQ<1, 1, 0b1110, 0, 1, "vcvt", "f32.u32", |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2874 | v4f32, v4i32, int_arm_neon_vcvtfxu2fp>; |
| 2875 | |
Bob Wilson | 0847927 | 2009-08-12 22:31:50 +0000 | [diff] [blame] | 2876 | // Vector Reverse. |
Bob Wilson | c1cd72e | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 2877 | |
| 2878 | // VREV64 : Vector Reverse elements within 64-bit doublewords |
| 2879 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2880 | class VREV64D<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty> |
Bob Wilson | c1cd72e | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 2881 | : N2V<0b11, 0b11, op19_18, 0b00, 0b00000, 0, 0, (outs DPR:$dst), |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2882 | (ins DPR:$src), IIC_VMOVD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2883 | OpcodeStr, Dt, "$dst, $src", "", |
Bob Wilson | 0847927 | 2009-08-12 22:31:50 +0000 | [diff] [blame] | 2884 | [(set DPR:$dst, (Ty (NEONvrev64 (Ty DPR:$src))))]>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2885 | class VREV64Q<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty> |
Bob Wilson | c1cd72e | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 2886 | : N2V<0b11, 0b11, op19_18, 0b00, 0b00000, 1, 0, (outs QPR:$dst), |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2887 | (ins QPR:$src), IIC_VMOVD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2888 | OpcodeStr, Dt, "$dst, $src", "", |
Bob Wilson | 0847927 | 2009-08-12 22:31:50 +0000 | [diff] [blame] | 2889 | [(set QPR:$dst, (Ty (NEONvrev64 (Ty QPR:$src))))]>; |
Bob Wilson | c1cd72e | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 2890 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2891 | def VREV64d8 : VREV64D<0b00, "vrev64", "8", v8i8>; |
| 2892 | def VREV64d16 : VREV64D<0b01, "vrev64", "16", v4i16>; |
| 2893 | def VREV64d32 : VREV64D<0b10, "vrev64", "32", v2i32>; |
| 2894 | def VREV64df : VREV64D<0b10, "vrev64", "32", v2f32>; |
Bob Wilson | c1cd72e | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 2895 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2896 | def VREV64q8 : VREV64Q<0b00, "vrev64", "8", v16i8>; |
| 2897 | def VREV64q16 : VREV64Q<0b01, "vrev64", "16", v8i16>; |
| 2898 | def VREV64q32 : VREV64Q<0b10, "vrev64", "32", v4i32>; |
| 2899 | def VREV64qf : VREV64Q<0b10, "vrev64", "32", v4f32>; |
Bob Wilson | c1cd72e | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 2900 | |
| 2901 | // VREV32 : Vector Reverse elements within 32-bit words |
| 2902 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2903 | class VREV32D<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty> |
Bob Wilson | c1cd72e | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 2904 | : N2V<0b11, 0b11, op19_18, 0b00, 0b00001, 0, 0, (outs DPR:$dst), |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2905 | (ins DPR:$src), IIC_VMOVD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2906 | OpcodeStr, Dt, "$dst, $src", "", |
Bob Wilson | 0847927 | 2009-08-12 22:31:50 +0000 | [diff] [blame] | 2907 | [(set DPR:$dst, (Ty (NEONvrev32 (Ty DPR:$src))))]>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2908 | class VREV32Q<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty> |
Bob Wilson | c1cd72e | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 2909 | : N2V<0b11, 0b11, op19_18, 0b00, 0b00001, 1, 0, (outs QPR:$dst), |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2910 | (ins QPR:$src), IIC_VMOVD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2911 | OpcodeStr, Dt, "$dst, $src", "", |
Bob Wilson | 0847927 | 2009-08-12 22:31:50 +0000 | [diff] [blame] | 2912 | [(set QPR:$dst, (Ty (NEONvrev32 (Ty QPR:$src))))]>; |
Bob Wilson | c1cd72e | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 2913 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2914 | def VREV32d8 : VREV32D<0b00, "vrev32", "8", v8i8>; |
| 2915 | def VREV32d16 : VREV32D<0b01, "vrev32", "16", v4i16>; |
Bob Wilson | c1cd72e | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 2916 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2917 | def VREV32q8 : VREV32Q<0b00, "vrev32", "8", v16i8>; |
| 2918 | def VREV32q16 : VREV32Q<0b01, "vrev32", "16", v8i16>; |
Bob Wilson | c1cd72e | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 2919 | |
| 2920 | // VREV16 : Vector Reverse elements within 16-bit halfwords |
| 2921 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2922 | class VREV16D<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty> |
Bob Wilson | c1cd72e | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 2923 | : N2V<0b11, 0b11, op19_18, 0b00, 0b00010, 0, 0, (outs DPR:$dst), |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2924 | (ins DPR:$src), IIC_VMOVD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2925 | OpcodeStr, Dt, "$dst, $src", "", |
Bob Wilson | 0847927 | 2009-08-12 22:31:50 +0000 | [diff] [blame] | 2926 | [(set DPR:$dst, (Ty (NEONvrev16 (Ty DPR:$src))))]>; |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2927 | class VREV16Q<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty> |
Bob Wilson | c1cd72e | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 2928 | : N2V<0b11, 0b11, op19_18, 0b00, 0b00010, 1, 0, (outs QPR:$dst), |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2929 | (ins QPR:$src), IIC_VMOVD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2930 | OpcodeStr, Dt, "$dst, $src", "", |
Bob Wilson | 0847927 | 2009-08-12 22:31:50 +0000 | [diff] [blame] | 2931 | [(set QPR:$dst, (Ty (NEONvrev16 (Ty QPR:$src))))]>; |
Bob Wilson | c1cd72e | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 2932 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2933 | def VREV16d8 : VREV16D<0b00, "vrev16", "8", v8i8>; |
| 2934 | def VREV16q8 : VREV16Q<0b00, "vrev16", "8", v16i8>; |
Bob Wilson | c1cd72e | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 2935 | |
Bob Wilson | 3ac3913 | 2009-08-19 17:03:43 +0000 | [diff] [blame] | 2936 | // Other Vector Shuffles. |
| 2937 | |
| 2938 | // VEXT : Vector Extract |
| 2939 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2940 | class VEXTd<string OpcodeStr, string Dt, ValueType Ty> |
Johnny Chen | 6c6fa9a | 2009-11-23 20:09:13 +0000 | [diff] [blame] | 2941 | : N3V<0,1,0b11,{?,?,?,?},0,0, (outs DPR:$dst), |
| 2942 | (ins DPR:$lhs, DPR:$rhs, i32imm:$index), IIC_VEXTD, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2943 | OpcodeStr, Dt, "$dst, $lhs, $rhs, $index", "", |
Johnny Chen | 6c6fa9a | 2009-11-23 20:09:13 +0000 | [diff] [blame] | 2944 | [(set DPR:$dst, (Ty (NEONvext (Ty DPR:$lhs), |
| 2945 | (Ty DPR:$rhs), imm:$index)))]>; |
Anton Korobeynikov | 6c28c00 | 2009-08-21 12:40:21 +0000 | [diff] [blame] | 2946 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2947 | class VEXTq<string OpcodeStr, string Dt, ValueType Ty> |
Johnny Chen | 6c6fa9a | 2009-11-23 20:09:13 +0000 | [diff] [blame] | 2948 | : N3V<0,1,0b11,{?,?,?,?},1,0, (outs QPR:$dst), |
| 2949 | (ins QPR:$lhs, QPR:$rhs, i32imm:$index), IIC_VEXTQ, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2950 | OpcodeStr, Dt, "$dst, $lhs, $rhs, $index", "", |
Johnny Chen | 6c6fa9a | 2009-11-23 20:09:13 +0000 | [diff] [blame] | 2951 | [(set QPR:$dst, (Ty (NEONvext (Ty QPR:$lhs), |
| 2952 | (Ty QPR:$rhs), imm:$index)))]>; |
Anton Korobeynikov | 6c28c00 | 2009-08-21 12:40:21 +0000 | [diff] [blame] | 2953 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2954 | def VEXTd8 : VEXTd<"vext", "8", v8i8>; |
| 2955 | def VEXTd16 : VEXTd<"vext", "16", v4i16>; |
| 2956 | def VEXTd32 : VEXTd<"vext", "32", v2i32>; |
| 2957 | def VEXTdf : VEXTd<"vext", "32", v2f32>; |
Anton Korobeynikov | 6c28c00 | 2009-08-21 12:40:21 +0000 | [diff] [blame] | 2958 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2959 | def VEXTq8 : VEXTq<"vext", "8", v16i8>; |
| 2960 | def VEXTq16 : VEXTq<"vext", "16", v8i16>; |
| 2961 | def VEXTq32 : VEXTq<"vext", "32", v4i32>; |
| 2962 | def VEXTqf : VEXTq<"vext", "32", v4f32>; |
Bob Wilson | 3ac3913 | 2009-08-19 17:03:43 +0000 | [diff] [blame] | 2963 | |
Bob Wilson | 3b16933 | 2009-08-08 05:53:00 +0000 | [diff] [blame] | 2964 | // VTRN : Vector Transpose |
| 2965 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2966 | def VTRNd8 : N2VDShuffle<0b00, 0b00001, "vtrn", "8">; |
| 2967 | def VTRNd16 : N2VDShuffle<0b01, 0b00001, "vtrn", "16">; |
| 2968 | def VTRNd32 : N2VDShuffle<0b10, 0b00001, "vtrn", "32">; |
Bob Wilson | 3b16933 | 2009-08-08 05:53:00 +0000 | [diff] [blame] | 2969 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2970 | def VTRNq8 : N2VQShuffle<0b00, 0b00001, IIC_VPERMQ, "vtrn", "8">; |
| 2971 | def VTRNq16 : N2VQShuffle<0b01, 0b00001, IIC_VPERMQ, "vtrn", "16">; |
| 2972 | def VTRNq32 : N2VQShuffle<0b10, 0b00001, IIC_VPERMQ, "vtrn", "32">; |
Bob Wilson | 3b16933 | 2009-08-08 05:53:00 +0000 | [diff] [blame] | 2973 | |
Bob Wilson | c1eaa4d | 2009-08-08 06:13:25 +0000 | [diff] [blame] | 2974 | // VUZP : Vector Unzip (Deinterleave) |
| 2975 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2976 | def VUZPd8 : N2VDShuffle<0b00, 0b00010, "vuzp", "8">; |
| 2977 | def VUZPd16 : N2VDShuffle<0b01, 0b00010, "vuzp", "16">; |
| 2978 | def VUZPd32 : N2VDShuffle<0b10, 0b00010, "vuzp", "32">; |
Bob Wilson | c1eaa4d | 2009-08-08 06:13:25 +0000 | [diff] [blame] | 2979 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2980 | def VUZPq8 : N2VQShuffle<0b00, 0b00010, IIC_VPERMQ3, "vuzp", "8">; |
| 2981 | def VUZPq16 : N2VQShuffle<0b01, 0b00010, IIC_VPERMQ3, "vuzp", "16">; |
| 2982 | def VUZPq32 : N2VQShuffle<0b10, 0b00010, IIC_VPERMQ3, "vuzp", "32">; |
Bob Wilson | c1eaa4d | 2009-08-08 06:13:25 +0000 | [diff] [blame] | 2983 | |
| 2984 | // VZIP : Vector Zip (Interleave) |
| 2985 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2986 | def VZIPd8 : N2VDShuffle<0b00, 0b00011, "vzip", "8">; |
| 2987 | def VZIPd16 : N2VDShuffle<0b01, 0b00011, "vzip", "16">; |
| 2988 | def VZIPd32 : N2VDShuffle<0b10, 0b00011, "vzip", "32">; |
Bob Wilson | c1eaa4d | 2009-08-08 06:13:25 +0000 | [diff] [blame] | 2989 | |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2990 | def VZIPq8 : N2VQShuffle<0b00, 0b00011, IIC_VPERMQ3, "vzip", "8">; |
| 2991 | def VZIPq16 : N2VQShuffle<0b01, 0b00011, IIC_VPERMQ3, "vzip", "16">; |
| 2992 | def VZIPq32 : N2VQShuffle<0b10, 0b00011, IIC_VPERMQ3, "vzip", "32">; |
Bob Wilson | 3b16933 | 2009-08-08 05:53:00 +0000 | [diff] [blame] | 2993 | |
Bob Wilson | 5ef42ed | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 2994 | // Vector Table Lookup and Table Extension. |
| 2995 | |
| 2996 | // VTBL : Vector Table Lookup |
| 2997 | def VTBL1 |
| 2998 | : N3V<1,1,0b11,0b1000,0,0, (outs DPR:$dst), |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2999 | (ins DPR:$tbl1, DPR:$src), IIC_VTB1, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3000 | "vtbl", "8", "$dst, \\{$tbl1\\}, $src", "", |
Bob Wilson | 5ef42ed | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3001 | [(set DPR:$dst, (v8i8 (int_arm_neon_vtbl1 DPR:$tbl1, DPR:$src)))]>; |
Evan Cheng | 7c8d5ea | 2009-10-01 08:22:27 +0000 | [diff] [blame] | 3002 | let hasExtraSrcRegAllocReq = 1 in { |
Bob Wilson | 5ef42ed | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3003 | def VTBL2 |
| 3004 | : N3V<1,1,0b11,0b1001,0,0, (outs DPR:$dst), |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3005 | (ins DPR:$tbl1, DPR:$tbl2, DPR:$src), IIC_VTB2, |
Bob Wilson | 82dcfa3 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 3006 | "vtbl", "8", "$dst, \\{$tbl1, $tbl2\\}, $src", "", |
Bob Wilson | 5ef42ed | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3007 | [(set DPR:$dst, (v8i8 (int_arm_neon_vtbl2 |
| 3008 | DPR:$tbl1, DPR:$tbl2, DPR:$src)))]>; |
| 3009 | def VTBL3 |
| 3010 | : N3V<1,1,0b11,0b1010,0,0, (outs DPR:$dst), |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3011 | (ins DPR:$tbl1, DPR:$tbl2, DPR:$tbl3, DPR:$src), IIC_VTB3, |
Bob Wilson | 82dcfa3 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 3012 | "vtbl", "8", "$dst, \\{$tbl1, $tbl2, $tbl3\\}, $src", "", |
Bob Wilson | 5ef42ed | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3013 | [(set DPR:$dst, (v8i8 (int_arm_neon_vtbl3 |
| 3014 | DPR:$tbl1, DPR:$tbl2, DPR:$tbl3, DPR:$src)))]>; |
| 3015 | def VTBL4 |
| 3016 | : N3V<1,1,0b11,0b1011,0,0, (outs DPR:$dst), |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3017 | (ins DPR:$tbl1, DPR:$tbl2, DPR:$tbl3, DPR:$tbl4, DPR:$src), IIC_VTB4, |
Bob Wilson | 82dcfa3 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 3018 | "vtbl", "8", "$dst, \\{$tbl1, $tbl2, $tbl3, $tbl4\\}, $src", "", |
Bob Wilson | 5ef42ed | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3019 | [(set DPR:$dst, (v8i8 (int_arm_neon_vtbl4 DPR:$tbl1, DPR:$tbl2, |
| 3020 | DPR:$tbl3, DPR:$tbl4, DPR:$src)))]>; |
Evan Cheng | 7c8d5ea | 2009-10-01 08:22:27 +0000 | [diff] [blame] | 3021 | } // hasExtraSrcRegAllocReq = 1 |
Bob Wilson | 5ef42ed | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3022 | |
| 3023 | // VTBX : Vector Table Extension |
| 3024 | def VTBX1 |
| 3025 | : N3V<1,1,0b11,0b1000,1,0, (outs DPR:$dst), |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3026 | (ins DPR:$orig, DPR:$tbl1, DPR:$src), IIC_VTBX1, |
Evan Cheng | 09c61b3 | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3027 | "vtbx", "8", "$dst, \\{$tbl1\\}, $src", "$orig = $dst", |
Bob Wilson | 5ef42ed | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3028 | [(set DPR:$dst, (v8i8 (int_arm_neon_vtbx1 |
| 3029 | DPR:$orig, DPR:$tbl1, DPR:$src)))]>; |
Evan Cheng | 7c8d5ea | 2009-10-01 08:22:27 +0000 | [diff] [blame] | 3030 | let hasExtraSrcRegAllocReq = 1 in { |
Bob Wilson | 5ef42ed | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3031 | def VTBX2 |
| 3032 | : N3V<1,1,0b11,0b1001,1,0, (outs DPR:$dst), |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3033 | (ins DPR:$orig, DPR:$tbl1, DPR:$tbl2, DPR:$src), IIC_VTBX2, |
Bob Wilson | 82dcfa3 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 3034 | "vtbx", "8", "$dst, \\{$tbl1, $tbl2\\}, $src", "$orig = $dst", |
Bob Wilson | 5ef42ed | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3035 | [(set DPR:$dst, (v8i8 (int_arm_neon_vtbx2 |
| 3036 | DPR:$orig, DPR:$tbl1, DPR:$tbl2, DPR:$src)))]>; |
| 3037 | def VTBX3 |
| 3038 | : N3V<1,1,0b11,0b1010,1,0, (outs DPR:$dst), |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3039 | (ins DPR:$orig, DPR:$tbl1, DPR:$tbl2, DPR:$tbl3, DPR:$src), IIC_VTBX3, |
Bob Wilson | 82dcfa3 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 3040 | "vtbx", "8", "$dst, \\{$tbl1, $tbl2, $tbl3\\}, $src", "$orig = $dst", |
Bob Wilson | 5ef42ed | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3041 | [(set DPR:$dst, (v8i8 (int_arm_neon_vtbx3 DPR:$orig, DPR:$tbl1, |
| 3042 | DPR:$tbl2, DPR:$tbl3, DPR:$src)))]>; |
| 3043 | def VTBX4 |
| 3044 | : N3V<1,1,0b11,0b1011,1,0, (outs DPR:$dst), (ins DPR:$orig, DPR:$tbl1, |
David Goodwin | 36bff0c | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3045 | DPR:$tbl2, DPR:$tbl3, DPR:$tbl4, DPR:$src), IIC_VTBX4, |
Bob Wilson | 82dcfa3 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 3046 | "vtbx", "8", "$dst, \\{$tbl1, $tbl2, $tbl3, $tbl4\\}, $src", |
| 3047 | "$orig = $dst", |
Bob Wilson | 5ef42ed | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3048 | [(set DPR:$dst, (v8i8 (int_arm_neon_vtbx4 DPR:$orig, DPR:$tbl1, |
| 3049 | DPR:$tbl2, DPR:$tbl3, DPR:$tbl4, DPR:$src)))]>; |
Evan Cheng | 7c8d5ea | 2009-10-01 08:22:27 +0000 | [diff] [blame] | 3050 | } // hasExtraSrcRegAllocReq = 1 |
Bob Wilson | 5ef42ed | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3051 | |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3052 | //===----------------------------------------------------------------------===// |
Evan Cheng | 46961d8 | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3053 | // NEON instructions for single-precision FP math |
| 3054 | //===----------------------------------------------------------------------===// |
| 3055 | |
Bob Wilson | 154999f | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3056 | class N2VSPat<SDNode OpNode, ValueType ResTy, ValueType OpTy, NeonI Inst> |
| 3057 | : NEONFPPat<(ResTy (OpNode SPR:$a)), |
Chris Lattner | 4e62472 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 3058 | (EXTRACT_SUBREG (OpTy (Inst (INSERT_SUBREG (OpTy (IMPLICIT_DEF)), |
| 3059 | SPR:$a, arm_ssubreg_0))), |
Bob Wilson | 154999f | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3060 | arm_ssubreg_0)>; |
| 3061 | |
| 3062 | class N3VSPat<SDNode OpNode, NeonI Inst> |
| 3063 | : NEONFPPat<(f32 (OpNode SPR:$a, SPR:$b)), |
Chris Lattner | 4e62472 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 3064 | (EXTRACT_SUBREG (v2f32 |
| 3065 | (Inst (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), |
| 3066 | SPR:$a, arm_ssubreg_0), |
| 3067 | (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), |
| 3068 | SPR:$b, arm_ssubreg_0))), |
Bob Wilson | 154999f | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3069 | arm_ssubreg_0)>; |
| 3070 | |
| 3071 | class N3VSMulOpPat<SDNode MulNode, SDNode OpNode, NeonI Inst> |
| 3072 | : NEONFPPat<(f32 (OpNode SPR:$acc, (f32 (MulNode SPR:$a, SPR:$b)))), |
| 3073 | (EXTRACT_SUBREG (Inst (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), |
| 3074 | SPR:$acc, arm_ssubreg_0), |
| 3075 | (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), |
| 3076 | SPR:$a, arm_ssubreg_0), |
| 3077 | (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), |
| 3078 | SPR:$b, arm_ssubreg_0)), |
| 3079 | arm_ssubreg_0)>; |
| 3080 | |
Evan Cheng | 46961d8 | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3081 | // These need separate instructions because they must use DPR_VFP2 register |
| 3082 | // class which have SPR sub-registers. |
| 3083 | |
| 3084 | // Vector Add Operations used for single-precision FP |
| 3085 | let neverHasSideEffects = 1 in |
Bob Wilson | 154999f | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3086 | def VADDfd_sfp : N3VS<0,0,0b00,0b1101,0, "vadd", "f32", v2f32, v2f32, fadd, 1>; |
| 3087 | def : N3VSPat<fadd, VADDfd_sfp>; |
Evan Cheng | 46961d8 | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3088 | |
David Goodwin | 4b358db | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3089 | // Vector Sub Operations used for single-precision FP |
| 3090 | let neverHasSideEffects = 1 in |
Bob Wilson | 154999f | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3091 | def VSUBfd_sfp : N3VS<0,0,0b10,0b1101,0, "vsub", "f32", v2f32, v2f32, fsub, 0>; |
| 3092 | def : N3VSPat<fsub, VSUBfd_sfp>; |
David Goodwin | 4b358db | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3093 | |
Evan Cheng | 46961d8 | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3094 | // Vector Multiply Operations used for single-precision FP |
| 3095 | let neverHasSideEffects = 1 in |
Bob Wilson | 154999f | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3096 | def VMULfd_sfp : N3VS<1,0,0b00,0b1101,1, "vmul", "f32", v2f32, v2f32, fmul, 1>; |
| 3097 | def : N3VSPat<fmul, VMULfd_sfp>; |
Evan Cheng | 46961d8 | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3098 | |
| 3099 | // Vector Multiply-Accumulate/Subtract used for single-precision FP |
Jim Grosbach | 67420bf | 2009-10-31 22:57:36 +0000 | [diff] [blame] | 3100 | // vml[as].f32 can cause 4-8 cycle stalls in following ASIMD instructions, so |
| 3101 | // we want to avoid them for now. e.g., alternating vmla/vadd instructions. |
Evan Cheng | 46961d8 | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3102 | |
Jim Grosbach | 67420bf | 2009-10-31 22:57:36 +0000 | [diff] [blame] | 3103 | //let neverHasSideEffects = 1 in |
Bob Wilson | 154999f | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3104 | //def VMLAfd_sfp : N3VSMulOp<0,0,0b00,0b1101,1, IIC_VMACD, "vmla", "f32", |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 3105 | // v2f32, fmul, fadd>; |
Bob Wilson | 154999f | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3106 | //def : N3VSMulOpPat<fmul, fadd, VMLAfd_sfp>; |
Jim Grosbach | 67420bf | 2009-10-31 22:57:36 +0000 | [diff] [blame] | 3107 | |
| 3108 | //let neverHasSideEffects = 1 in |
Bob Wilson | 154999f | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3109 | //def VMLSfd_sfp : N3VSMulOp<0,0,0b10,0b1101,1, IIC_VMACD, "vmls", "f32", |
Bob Wilson | 1d2c421 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 3110 | // v2f32, fmul, fsub>; |
Bob Wilson | 154999f | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3111 | //def : N3VSMulOpPat<fmul, fsub, VMLSfd_sfp>; |
Evan Cheng | 46961d8 | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3112 | |
David Goodwin | 4b358db | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3113 | // Vector Absolute used for single-precision FP |
Evan Cheng | 46961d8 | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3114 | let neverHasSideEffects = 1 in |
Bob Wilson | 7c7fe6e | 2010-02-17 22:42:54 +0000 | [diff] [blame] | 3115 | def VABSfd_sfp : N2V<0b11, 0b11, 0b10, 0b01, 0b01110, 0, 0, |
| 3116 | (outs DPR_VFP2:$dst), (ins DPR_VFP2:$src), IIC_VUNAD, |
| 3117 | "vabs", "f32", "$dst, $src", "", []>; |
Bob Wilson | 154999f | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3118 | def : N2VSPat<fabs, f32, v2f32, VABSfd_sfp>; |
Evan Cheng | 46961d8 | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3119 | |
David Goodwin | 4b358db | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3120 | // Vector Negate used for single-precision FP |
Evan Cheng | 46961d8 | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3121 | let neverHasSideEffects = 1 in |
Bob Wilson | 154999f | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3122 | def VNEGfd_sfp : N2V<0b11, 0b11, 0b10, 0b01, 0b01111, 0, 0, |
| 3123 | (outs DPR_VFP2:$dst), (ins DPR_VFP2:$src), IIC_VUNAD, |
| 3124 | "vneg", "f32", "$dst, $src", "", []>; |
| 3125 | def : N2VSPat<fneg, f32, v2f32, VNEGfd_sfp>; |
Evan Cheng | 46961d8 | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3126 | |
Bob Wilson | bc1d2dc | 2010-02-18 06:05:53 +0000 | [diff] [blame] | 3127 | // Vector Maximum used for single-precision FP |
| 3128 | let neverHasSideEffects = 1 in |
| 3129 | def VMAXfd_sfp : N3V<0, 0, 0b00, 0b1111, 0, 0, (outs DPR_VFP2:$dst), |
| 3130 | (ins DPR_VFP2:$src1, DPR_VFP2:$src2), IIC_VBIND, |
| 3131 | "vmax", "f32", "$dst, $src1, $src2", "", []>; |
| 3132 | def : N3VSPat<NEONfmax, VMAXfd_sfp>; |
| 3133 | |
| 3134 | // Vector Minimum used for single-precision FP |
| 3135 | let neverHasSideEffects = 1 in |
| 3136 | def VMINfd_sfp : N3V<0, 0, 0b00, 0b1111, 0, 0, (outs DPR_VFP2:$dst), |
| 3137 | (ins DPR_VFP2:$src1, DPR_VFP2:$src2), IIC_VBIND, |
| 3138 | "vmin", "f32", "$dst, $src1, $src2", "", []>; |
| 3139 | def : N3VSPat<NEONfmin, VMINfd_sfp>; |
| 3140 | |
David Goodwin | 4b358db | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3141 | // Vector Convert between single-precision FP and integer |
Anton Korobeynikov | 2d58809 | 2010-03-18 22:35:45 +0000 | [diff] [blame] | 3142 | |
| 3143 | class NVCVTFIPat<SDNode OpNode, NeonI Inst> |
| 3144 | : NEONFPPat<(i32 (OpNode SPR:$a)), |
| 3145 | (i32 (EXTRACT_SUBREG |
| 3146 | (v2i32 (Inst |
| 3147 | (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), |
| 3148 | SPR:$a, |
| 3149 | arm_ssubreg_0))), |
| 3150 | arm_ssubreg_0))>; |
| 3151 | |
| 3152 | class NVCVTIFPat<SDNode OpNode, NeonI Inst> |
| 3153 | : NEONFPPat<(f32 (OpNode GPR:$a)), |
| 3154 | (f32 (EXTRACT_SUBREG |
| 3155 | (v2f32 (Inst |
| 3156 | (INSERT_SUBREG (v2i32 (IMPLICIT_DEF)), |
| 3157 | (i32 (COPY_TO_REGCLASS GPR:$a, SPR)), |
| 3158 | arm_ssubreg_0))), |
| 3159 | arm_ssubreg_0))>; |
| 3160 | |
David Goodwin | 4b358db | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3161 | let neverHasSideEffects = 1 in |
Bob Wilson | 154999f | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3162 | def VCVTf2sd_sfp : N2VS<0b11, 0b11, 0b10, 0b11, 0b01110, 0, "vcvt", "s32.f32", |
| 3163 | v2i32, v2f32, fp_to_sint>; |
Anton Korobeynikov | 2d58809 | 2010-03-18 22:35:45 +0000 | [diff] [blame] | 3164 | def : NVCVTFIPat<fp_to_sint, VCVTf2sd_sfp>; |
David Goodwin | 4b358db | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3165 | |
| 3166 | let neverHasSideEffects = 1 in |
Bob Wilson | 154999f | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3167 | def VCVTf2ud_sfp : N2VS<0b11, 0b11, 0b10, 0b11, 0b01111, 0, "vcvt", "u32.f32", |
| 3168 | v2i32, v2f32, fp_to_uint>; |
Anton Korobeynikov | 2d58809 | 2010-03-18 22:35:45 +0000 | [diff] [blame] | 3169 | def : NVCVTFIPat<fp_to_uint, VCVTf2ud_sfp>; |
David Goodwin | 4b358db | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3170 | |
| 3171 | let neverHasSideEffects = 1 in |
Bob Wilson | 154999f | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3172 | def VCVTs2fd_sfp : N2VS<0b11, 0b11, 0b10, 0b11, 0b01100, 0, "vcvt", "f32.s32", |
| 3173 | v2f32, v2i32, sint_to_fp>; |
Anton Korobeynikov | 2d58809 | 2010-03-18 22:35:45 +0000 | [diff] [blame] | 3174 | def : NVCVTIFPat<sint_to_fp, VCVTs2fd_sfp>; |
David Goodwin | 4b358db | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3175 | |
| 3176 | let neverHasSideEffects = 1 in |
Bob Wilson | 154999f | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3177 | def VCVTu2fd_sfp : N2VS<0b11, 0b11, 0b10, 0b11, 0b01101, 0, "vcvt", "f32.u32", |
| 3178 | v2f32, v2i32, uint_to_fp>; |
Anton Korobeynikov | 2d58809 | 2010-03-18 22:35:45 +0000 | [diff] [blame] | 3179 | def : NVCVTIFPat<uint_to_fp, VCVTu2fd_sfp>; |
David Goodwin | 4b358db | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3180 | |
Evan Cheng | 46961d8 | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3181 | //===----------------------------------------------------------------------===// |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3182 | // Non-Instruction Patterns |
| 3183 | //===----------------------------------------------------------------------===// |
| 3184 | |
| 3185 | // bit_convert |
| 3186 | def : Pat<(v1i64 (bitconvert (v2i32 DPR:$src))), (v1i64 DPR:$src)>; |
| 3187 | def : Pat<(v1i64 (bitconvert (v4i16 DPR:$src))), (v1i64 DPR:$src)>; |
| 3188 | def : Pat<(v1i64 (bitconvert (v8i8 DPR:$src))), (v1i64 DPR:$src)>; |
| 3189 | def : Pat<(v1i64 (bitconvert (f64 DPR:$src))), (v1i64 DPR:$src)>; |
| 3190 | def : Pat<(v1i64 (bitconvert (v2f32 DPR:$src))), (v1i64 DPR:$src)>; |
| 3191 | def : Pat<(v2i32 (bitconvert (v1i64 DPR:$src))), (v2i32 DPR:$src)>; |
| 3192 | def : Pat<(v2i32 (bitconvert (v4i16 DPR:$src))), (v2i32 DPR:$src)>; |
| 3193 | def : Pat<(v2i32 (bitconvert (v8i8 DPR:$src))), (v2i32 DPR:$src)>; |
| 3194 | def : Pat<(v2i32 (bitconvert (f64 DPR:$src))), (v2i32 DPR:$src)>; |
| 3195 | def : Pat<(v2i32 (bitconvert (v2f32 DPR:$src))), (v2i32 DPR:$src)>; |
| 3196 | def : Pat<(v4i16 (bitconvert (v1i64 DPR:$src))), (v4i16 DPR:$src)>; |
| 3197 | def : Pat<(v4i16 (bitconvert (v2i32 DPR:$src))), (v4i16 DPR:$src)>; |
| 3198 | def : Pat<(v4i16 (bitconvert (v8i8 DPR:$src))), (v4i16 DPR:$src)>; |
| 3199 | def : Pat<(v4i16 (bitconvert (f64 DPR:$src))), (v4i16 DPR:$src)>; |
| 3200 | def : Pat<(v4i16 (bitconvert (v2f32 DPR:$src))), (v4i16 DPR:$src)>; |
| 3201 | def : Pat<(v8i8 (bitconvert (v1i64 DPR:$src))), (v8i8 DPR:$src)>; |
| 3202 | def : Pat<(v8i8 (bitconvert (v2i32 DPR:$src))), (v8i8 DPR:$src)>; |
| 3203 | def : Pat<(v8i8 (bitconvert (v4i16 DPR:$src))), (v8i8 DPR:$src)>; |
| 3204 | def : Pat<(v8i8 (bitconvert (f64 DPR:$src))), (v8i8 DPR:$src)>; |
| 3205 | def : Pat<(v8i8 (bitconvert (v2f32 DPR:$src))), (v8i8 DPR:$src)>; |
| 3206 | def : Pat<(f64 (bitconvert (v1i64 DPR:$src))), (f64 DPR:$src)>; |
| 3207 | def : Pat<(f64 (bitconvert (v2i32 DPR:$src))), (f64 DPR:$src)>; |
| 3208 | def : Pat<(f64 (bitconvert (v4i16 DPR:$src))), (f64 DPR:$src)>; |
| 3209 | def : Pat<(f64 (bitconvert (v8i8 DPR:$src))), (f64 DPR:$src)>; |
| 3210 | def : Pat<(f64 (bitconvert (v2f32 DPR:$src))), (f64 DPR:$src)>; |
| 3211 | def : Pat<(v2f32 (bitconvert (f64 DPR:$src))), (v2f32 DPR:$src)>; |
| 3212 | def : Pat<(v2f32 (bitconvert (v1i64 DPR:$src))), (v2f32 DPR:$src)>; |
| 3213 | def : Pat<(v2f32 (bitconvert (v2i32 DPR:$src))), (v2f32 DPR:$src)>; |
| 3214 | def : Pat<(v2f32 (bitconvert (v4i16 DPR:$src))), (v2f32 DPR:$src)>; |
| 3215 | def : Pat<(v2f32 (bitconvert (v8i8 DPR:$src))), (v2f32 DPR:$src)>; |
| 3216 | |
| 3217 | def : Pat<(v2i64 (bitconvert (v4i32 QPR:$src))), (v2i64 QPR:$src)>; |
| 3218 | def : Pat<(v2i64 (bitconvert (v8i16 QPR:$src))), (v2i64 QPR:$src)>; |
| 3219 | def : Pat<(v2i64 (bitconvert (v16i8 QPR:$src))), (v2i64 QPR:$src)>; |
| 3220 | def : Pat<(v2i64 (bitconvert (v2f64 QPR:$src))), (v2i64 QPR:$src)>; |
| 3221 | def : Pat<(v2i64 (bitconvert (v4f32 QPR:$src))), (v2i64 QPR:$src)>; |
| 3222 | def : Pat<(v4i32 (bitconvert (v2i64 QPR:$src))), (v4i32 QPR:$src)>; |
| 3223 | def : Pat<(v4i32 (bitconvert (v8i16 QPR:$src))), (v4i32 QPR:$src)>; |
| 3224 | def : Pat<(v4i32 (bitconvert (v16i8 QPR:$src))), (v4i32 QPR:$src)>; |
| 3225 | def : Pat<(v4i32 (bitconvert (v2f64 QPR:$src))), (v4i32 QPR:$src)>; |
| 3226 | def : Pat<(v4i32 (bitconvert (v4f32 QPR:$src))), (v4i32 QPR:$src)>; |
| 3227 | def : Pat<(v8i16 (bitconvert (v2i64 QPR:$src))), (v8i16 QPR:$src)>; |
| 3228 | def : Pat<(v8i16 (bitconvert (v4i32 QPR:$src))), (v8i16 QPR:$src)>; |
| 3229 | def : Pat<(v8i16 (bitconvert (v16i8 QPR:$src))), (v8i16 QPR:$src)>; |
| 3230 | def : Pat<(v8i16 (bitconvert (v2f64 QPR:$src))), (v8i16 QPR:$src)>; |
| 3231 | def : Pat<(v8i16 (bitconvert (v4f32 QPR:$src))), (v8i16 QPR:$src)>; |
| 3232 | def : Pat<(v16i8 (bitconvert (v2i64 QPR:$src))), (v16i8 QPR:$src)>; |
| 3233 | def : Pat<(v16i8 (bitconvert (v4i32 QPR:$src))), (v16i8 QPR:$src)>; |
| 3234 | def : Pat<(v16i8 (bitconvert (v8i16 QPR:$src))), (v16i8 QPR:$src)>; |
| 3235 | def : Pat<(v16i8 (bitconvert (v2f64 QPR:$src))), (v16i8 QPR:$src)>; |
| 3236 | def : Pat<(v16i8 (bitconvert (v4f32 QPR:$src))), (v16i8 QPR:$src)>; |
| 3237 | def : Pat<(v4f32 (bitconvert (v2i64 QPR:$src))), (v4f32 QPR:$src)>; |
| 3238 | def : Pat<(v4f32 (bitconvert (v4i32 QPR:$src))), (v4f32 QPR:$src)>; |
| 3239 | def : Pat<(v4f32 (bitconvert (v8i16 QPR:$src))), (v4f32 QPR:$src)>; |
| 3240 | def : Pat<(v4f32 (bitconvert (v16i8 QPR:$src))), (v4f32 QPR:$src)>; |
| 3241 | def : Pat<(v4f32 (bitconvert (v2f64 QPR:$src))), (v4f32 QPR:$src)>; |
| 3242 | def : Pat<(v2f64 (bitconvert (v2i64 QPR:$src))), (v2f64 QPR:$src)>; |
| 3243 | def : Pat<(v2f64 (bitconvert (v4i32 QPR:$src))), (v2f64 QPR:$src)>; |
| 3244 | def : Pat<(v2f64 (bitconvert (v8i16 QPR:$src))), (v2f64 QPR:$src)>; |
| 3245 | def : Pat<(v2f64 (bitconvert (v16i8 QPR:$src))), (v2f64 QPR:$src)>; |
| 3246 | def : Pat<(v2f64 (bitconvert (v4f32 QPR:$src))), (v2f64 QPR:$src)>; |