| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1 | //===- ARMInstrNEON.td - NEON support for ARM -----------------------------===// | 
|  | 2 | // | 
|  | 3 | //                     The LLVM Compiler Infrastructure | 
|  | 4 | // | 
|  | 5 | // This file is distributed under the University of Illinois Open Source | 
|  | 6 | // License. See LICENSE.TXT for details. | 
|  | 7 | // | 
|  | 8 | //===----------------------------------------------------------------------===// | 
|  | 9 | // | 
|  | 10 | // This file describes the ARM NEON instruction set. | 
|  | 11 | // | 
|  | 12 | //===----------------------------------------------------------------------===// | 
|  | 13 |  | 
|  | 14 | //===----------------------------------------------------------------------===// | 
|  | 15 | // NEON-specific DAG Nodes. | 
|  | 16 | //===----------------------------------------------------------------------===// | 
|  | 17 |  | 
|  | 18 | def SDTARMVCMP    : SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisSameAs<1, 2>]>; | 
|  | 19 |  | 
|  | 20 | def NEONvceq      : SDNode<"ARMISD::VCEQ", SDTARMVCMP>; | 
|  | 21 | def NEONvcge      : SDNode<"ARMISD::VCGE", SDTARMVCMP>; | 
|  | 22 | def NEONvcgeu     : SDNode<"ARMISD::VCGEU", SDTARMVCMP>; | 
|  | 23 | def NEONvcgt      : SDNode<"ARMISD::VCGT", SDTARMVCMP>; | 
|  | 24 | def NEONvcgtu     : SDNode<"ARMISD::VCGTU", SDTARMVCMP>; | 
|  | 25 | def NEONvtst      : SDNode<"ARMISD::VTST", SDTARMVCMP>; | 
|  | 26 |  | 
|  | 27 | // Types for vector shift by immediates.  The "SHX" version is for long and | 
|  | 28 | // narrow operations where the source and destination vectors have different | 
|  | 29 | // types.  The "SHINS" version is for shift and insert operations. | 
|  | 30 | def SDTARMVSH     : SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisSameAs<0, 1>, | 
|  | 31 | SDTCisVT<2, i32>]>; | 
|  | 32 | def SDTARMVSHX    : SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisInt<1>, | 
|  | 33 | SDTCisVT<2, i32>]>; | 
|  | 34 | def SDTARMVSHINS  : SDTypeProfile<1, 3, [SDTCisInt<0>, SDTCisSameAs<0, 1>, | 
|  | 35 | SDTCisSameAs<0, 2>, SDTCisVT<3, i32>]>; | 
|  | 36 |  | 
|  | 37 | def NEONvshl      : SDNode<"ARMISD::VSHL", SDTARMVSH>; | 
|  | 38 | def NEONvshrs     : SDNode<"ARMISD::VSHRs", SDTARMVSH>; | 
|  | 39 | def NEONvshru     : SDNode<"ARMISD::VSHRu", SDTARMVSH>; | 
|  | 40 | def NEONvshlls    : SDNode<"ARMISD::VSHLLs", SDTARMVSHX>; | 
|  | 41 | def NEONvshllu    : SDNode<"ARMISD::VSHLLu", SDTARMVSHX>; | 
|  | 42 | def NEONvshlli    : SDNode<"ARMISD::VSHLLi", SDTARMVSHX>; | 
|  | 43 | def NEONvshrn     : SDNode<"ARMISD::VSHRN", SDTARMVSHX>; | 
|  | 44 |  | 
|  | 45 | def NEONvrshrs    : SDNode<"ARMISD::VRSHRs", SDTARMVSH>; | 
|  | 46 | def NEONvrshru    : SDNode<"ARMISD::VRSHRu", SDTARMVSH>; | 
|  | 47 | def NEONvrshrn    : SDNode<"ARMISD::VRSHRN", SDTARMVSHX>; | 
|  | 48 |  | 
|  | 49 | def NEONvqshls    : SDNode<"ARMISD::VQSHLs", SDTARMVSH>; | 
|  | 50 | def NEONvqshlu    : SDNode<"ARMISD::VQSHLu", SDTARMVSH>; | 
|  | 51 | def NEONvqshlsu   : SDNode<"ARMISD::VQSHLsu", SDTARMVSH>; | 
|  | 52 | def NEONvqshrns   : SDNode<"ARMISD::VQSHRNs", SDTARMVSHX>; | 
|  | 53 | def NEONvqshrnu   : SDNode<"ARMISD::VQSHRNu", SDTARMVSHX>; | 
|  | 54 | def NEONvqshrnsu  : SDNode<"ARMISD::VQSHRNsu", SDTARMVSHX>; | 
|  | 55 |  | 
|  | 56 | def NEONvqrshrns  : SDNode<"ARMISD::VQRSHRNs", SDTARMVSHX>; | 
|  | 57 | def NEONvqrshrnu  : SDNode<"ARMISD::VQRSHRNu", SDTARMVSHX>; | 
|  | 58 | def NEONvqrshrnsu : SDNode<"ARMISD::VQRSHRNsu", SDTARMVSHX>; | 
|  | 59 |  | 
|  | 60 | def NEONvsli      : SDNode<"ARMISD::VSLI", SDTARMVSHINS>; | 
|  | 61 | def NEONvsri      : SDNode<"ARMISD::VSRI", SDTARMVSHINS>; | 
|  | 62 |  | 
|  | 63 | def SDTARMVGETLN  : SDTypeProfile<1, 2, [SDTCisVT<0, i32>, SDTCisInt<1>, | 
|  | 64 | SDTCisVT<2, i32>]>; | 
|  | 65 | def NEONvgetlaneu : SDNode<"ARMISD::VGETLANEu", SDTARMVGETLN>; | 
|  | 66 | def NEONvgetlanes : SDNode<"ARMISD::VGETLANEs", SDTARMVGETLN>; | 
|  | 67 |  | 
| Bob Wilson | eb54d51 | 2009-08-14 05:13:08 +0000 | [diff] [blame] | 68 | def NEONvdup      : SDNode<"ARMISD::VDUP", SDTypeProfile<1, 1, [SDTCisVec<0>]>>; | 
|  | 69 |  | 
| Bob Wilson | cce31f6 | 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 | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 75 |  | 
| Bob Wilson | 32cd855 | 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 | ea3a402 | 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 | ce3ff1b | 2009-08-21 12:40:50 +0000 | [diff] [blame] | 85 | def SDTARMVSHUF2  : SDTypeProfile<2, 2, [SDTCisVec<0>, SDTCisSameAs<0, 1>, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 86 | SDTCisSameAs<0, 2>, | 
|  | 87 | SDTCisSameAs<0, 3>]>; | 
| Anton Korobeynikov | 232b19c | 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 | ce3ff1b | 2009-08-21 12:40:50 +0000 | [diff] [blame] | 91 |  | 
| Bob Wilson | c6c13a3 | 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 | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 97 | //===----------------------------------------------------------------------===// | 
|  | 98 | // NEON operand definitions | 
|  | 99 | //===----------------------------------------------------------------------===// | 
|  | 100 |  | 
| Bob Wilson | d95ccd6 | 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 | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 114 | //===----------------------------------------------------------------------===// | 
|  | 115 | // NEON load / store instructions | 
|  | 116 | //===----------------------------------------------------------------------===// | 
|  | 117 |  | 
| Bob Wilson | 340861d | 2010-03-23 05:25:43 +0000 | [diff] [blame] | 118 | let mayLoad = 1 in { | 
| Bob Wilson | 59f75bb | 2010-03-23 18:54:46 +0000 | [diff] [blame] | 119 | // Use vldmia to load a Q register as a D register pair. | 
|  | 120 | // This is equivalent to VLDMD except that it has a Q register operand | 
|  | 121 | // instead of a pair of D registers. | 
|  | 122 | def VLDMQ | 
|  | 123 | : AXDI5<(outs QPR:$dst), (ins addrmode5:$addr, pred:$p), | 
|  | 124 | IndexModeNone, IIC_fpLoadm, | 
|  | 125 | "vldm${addr:submode}${p}\t${addr:base}, ${dst:dregpair}", "", []>; | 
|  | 126 | def VLDMQ_UPD | 
|  | 127 | : AXDI5<(outs QPR:$dst, GPR:$wb), (ins addrmode5:$addr, pred:$p), | 
|  | 128 | IndexModeUpd, IIC_fpLoadm, | 
|  | 129 | "vldm${addr:submode}${p}\t${addr:base}!, ${dst:dregpair}", | 
|  | 130 | "$addr.base = $wb", []>; | 
|  | 131 |  | 
| Bob Wilson | 340861d | 2010-03-23 05:25:43 +0000 | [diff] [blame] | 132 | // Use vld1 to load a Q register as a D register pair. | 
| Bob Wilson | 9b680e2 | 2010-03-23 06:26:18 +0000 | [diff] [blame] | 133 | // This alternative to VLDMQ allows an alignment to be specified. | 
| Bob Wilson | 340861d | 2010-03-23 05:25:43 +0000 | [diff] [blame] | 134 | // This is equivalent to VLD1q64 except that it has a Q register operand. | 
|  | 135 | def VLD1q | 
|  | 136 | : NLdSt<0,0b10,0b1010,0b1100, (outs QPR:$dst), (ins addrmode6:$addr), | 
|  | 137 | IIC_VLD1, "vld1", "64", "${dst:dregpair}, $addr", "", []>; | 
|  | 138 | def VLD1q_UPD | 
|  | 139 | : NLdSt<0,0b10,0b1010,0b1100, (outs QPR:$dst, GPR:$wb), | 
|  | 140 | (ins addrmode6:$addr, am6offset:$offset), IIC_VLD1, "vld1", "64", | 
|  | 141 | "${dst:dregpair}, $addr$offset", "$addr.addr = $wb", []>; | 
|  | 142 | } // mayLoad = 1 | 
|  | 143 |  | 
| Bob Wilson | cc0a2a7 | 2010-03-23 06:20:33 +0000 | [diff] [blame] | 144 | let mayStore = 1 in { | 
| Bob Wilson | 59f75bb | 2010-03-23 18:54:46 +0000 | [diff] [blame] | 145 | // Use vstmia to store a Q register as a D register pair. | 
|  | 146 | // This is equivalent to VSTMD except that it has a Q register operand | 
|  | 147 | // instead of a pair of D registers. | 
|  | 148 | def VSTMQ | 
|  | 149 | : AXDI5<(outs), (ins QPR:$src, addrmode5:$addr, pred:$p), | 
|  | 150 | IndexModeNone, IIC_fpStorem, | 
|  | 151 | "vstm${addr:submode}${p}\t${addr:base}, ${src:dregpair}", "", []>; | 
|  | 152 | def VSTMQ_UPD | 
|  | 153 | : AXDI5<(outs GPR:$wb), (ins QPR:$src, addrmode5:$addr, pred:$p), | 
|  | 154 | IndexModeUpd, IIC_fpStorem, | 
|  | 155 | "vstm${addr:submode}${p}\t${addr:base}!, ${src:dregpair}", | 
|  | 156 | "$addr.base = $wb", []>; | 
|  | 157 |  | 
| Bob Wilson | cc0a2a7 | 2010-03-23 06:20:33 +0000 | [diff] [blame] | 158 | // Use vst1 to store a Q register as a D register pair. | 
| Bob Wilson | 9b680e2 | 2010-03-23 06:26:18 +0000 | [diff] [blame] | 159 | // This alternative to VSTMQ allows an alignment to be specified. | 
| Bob Wilson | cc0a2a7 | 2010-03-23 06:20:33 +0000 | [diff] [blame] | 160 | // This is equivalent to VST1q64 except that it has a Q register operand. | 
|  | 161 | def VST1q | 
|  | 162 | : NLdSt<0,0b00,0b1010,0b1100, (outs), (ins addrmode6:$addr, QPR:$src), | 
|  | 163 | IIC_VST, "vst1", "64", "${src:dregpair}, $addr", "", []>; | 
|  | 164 | def VST1q_UPD | 
|  | 165 | : NLdSt<0,0b00,0b1010,0b1100, (outs GPR:$wb), | 
|  | 166 | (ins addrmode6:$addr, am6offset:$offset, QPR:$src), | 
|  | 167 | IIC_VST, "vst1", "64", "{$src:dregpair}, $addr$offset", | 
|  | 168 | "$addr.addr = $wb", []>; | 
|  | 169 | } // mayStore = 1 | 
|  | 170 |  | 
| Bob Wilson | 340861d | 2010-03-23 05:25:43 +0000 | [diff] [blame] | 171 | let mayLoad = 1, hasExtraDefRegAllocReq = 1 in { | 
|  | 172 |  | 
| Bob Wilson | f731a2d | 2009-07-08 18:11:30 +0000 | [diff] [blame] | 173 | //   VLD1     : Vector Load (multiple single elements) | 
| Bob Wilson | 340861d | 2010-03-23 05:25:43 +0000 | [diff] [blame] | 174 | class VLD1D<bits<4> op7_4, string Dt> | 
|  | 175 | : NLdSt<0,0b10,0b0111,op7_4, (outs DPR:$dst), | 
|  | 176 | (ins addrmode6:$addr), IIC_VLD1, | 
|  | 177 | "vld1", Dt, "\\{$dst\\}, $addr", "", []>; | 
|  | 178 | class VLD1Q<bits<4> op7_4, string Dt> | 
|  | 179 | : NLdSt<0,0b10,0b1010,op7_4, (outs DPR:$dst1, DPR:$dst2), | 
|  | 180 | (ins addrmode6:$addr), IIC_VLD1, | 
|  | 181 | "vld1", Dt, "\\{$dst1, $dst2\\}, $addr", "", []>; | 
| Bob Wilson | f731a2d | 2009-07-08 18:11:30 +0000 | [diff] [blame] | 182 |  | 
| Bob Wilson | 340861d | 2010-03-23 05:25:43 +0000 | [diff] [blame] | 183 | def  VLD1d8   : VLD1D<0b0000, "8">; | 
|  | 184 | def  VLD1d16  : VLD1D<0b0100, "16">; | 
|  | 185 | def  VLD1d32  : VLD1D<0b1000, "32">; | 
|  | 186 | def  VLD1d64  : VLD1D<0b1100, "64">; | 
| Bob Wilson | f731a2d | 2009-07-08 18:11:30 +0000 | [diff] [blame] | 187 |  | 
| Bob Wilson | 340861d | 2010-03-23 05:25:43 +0000 | [diff] [blame] | 188 | def  VLD1q8   : VLD1Q<0b0000, "8">; | 
|  | 189 | def  VLD1q16  : VLD1Q<0b0100, "16">; | 
|  | 190 | def  VLD1q32  : VLD1Q<0b1000, "32">; | 
|  | 191 | def  VLD1q64  : VLD1Q<0b1100, "64">; | 
| Bob Wilson | 496766c | 2010-03-20 17:59:03 +0000 | [diff] [blame] | 192 |  | 
|  | 193 | // ...with address register writeback: | 
|  | 194 | class VLD1DWB<bits<4> op7_4, string Dt> | 
|  | 195 | : NLdSt<0,0b10,0b0111,op7_4, (outs DPR:$dst, GPR:$wb), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 196 | (ins addrmode6:$addr, am6offset:$offset), IIC_VLD1, | 
|  | 197 | "vld1", Dt, "\\{$dst\\}, $addr$offset", | 
| Bob Wilson | 496766c | 2010-03-20 17:59:03 +0000 | [diff] [blame] | 198 | "$addr.addr = $wb", []>; | 
|  | 199 | class VLD1QWB<bits<4> op7_4, string Dt> | 
|  | 200 | : NLdSt<0,0b10,0b1010,op7_4, (outs QPR:$dst, GPR:$wb), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 201 | (ins addrmode6:$addr, am6offset:$offset), IIC_VLD1, | 
|  | 202 | "vld1", Dt, "${dst:dregpair}, $addr$offset", | 
| Bob Wilson | 496766c | 2010-03-20 17:59:03 +0000 | [diff] [blame] | 203 | "$addr.addr = $wb", []>; | 
|  | 204 |  | 
|  | 205 | def VLD1d8_UPD  : VLD1DWB<0b0000, "8">; | 
|  | 206 | def VLD1d16_UPD : VLD1DWB<0b0100, "16">; | 
|  | 207 | def VLD1d32_UPD : VLD1DWB<0b1000, "32">; | 
|  | 208 | def VLD1d64_UPD : VLD1DWB<0b1100, "64">; | 
|  | 209 |  | 
|  | 210 | def VLD1q8_UPD  : VLD1QWB<0b0000, "8">; | 
|  | 211 | def VLD1q16_UPD : VLD1QWB<0b0100, "16">; | 
|  | 212 | def VLD1q32_UPD : VLD1QWB<0b1000, "32">; | 
|  | 213 | def VLD1q64_UPD : VLD1QWB<0b1100, "64">; | 
| Bob Wilson | 496766c | 2010-03-20 17:59:03 +0000 | [diff] [blame] | 214 |  | 
| Bob Wilson | c286c88 | 2010-03-22 18:22:06 +0000 | [diff] [blame] | 215 | // ...with 3 registers (some of these are only for the disassembler): | 
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 216 | class VLD1D3<bits<4> op7_4, string Dt> | 
| Bob Wilson | 7ee900d | 2010-03-20 19:57:03 +0000 | [diff] [blame] | 217 | : NLdSt<0,0b10,0b0110,op7_4, (outs DPR:$dst1, DPR:$dst2, DPR:$dst3), | 
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 218 | (ins addrmode6:$addr), IIC_VLD1, "vld1", Dt, | 
| Bob Wilson | 98bf518 | 2010-03-22 18:02:38 +0000 | [diff] [blame] | 219 | "\\{$dst1, $dst2, $dst3\\}, $addr", "", []>; | 
| Bob Wilson | 496766c | 2010-03-20 17:59:03 +0000 | [diff] [blame] | 220 | class VLD1D3WB<bits<4> op7_4, string Dt> | 
|  | 221 | : NLdSt<0,0b10,0b0110,op7_4, (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, GPR:$wb), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 222 | (ins addrmode6:$addr, am6offset:$offset), IIC_VLD1, "vld1", Dt, | 
| Bob Wilson | 98bf518 | 2010-03-22 18:02:38 +0000 | [diff] [blame] | 223 | "\\{$dst1, $dst2, $dst3\\}, $addr$offset", "$addr.addr = $wb", []>; | 
| Bob Wilson | c286c88 | 2010-03-22 18:22:06 +0000 | [diff] [blame] | 224 |  | 
|  | 225 | def VLD1d8T      : VLD1D3<0b0000, "8">; | 
|  | 226 | def VLD1d16T     : VLD1D3<0b0100, "16">; | 
|  | 227 | def VLD1d32T     : VLD1D3<0b1000, "32">; | 
|  | 228 | def VLD1d64T     : VLD1D3<0b1100, "64">; | 
|  | 229 |  | 
|  | 230 | def VLD1d8T_UPD  : VLD1D3WB<0b0000, "8">; | 
|  | 231 | def VLD1d16T_UPD : VLD1D3WB<0b0100, "16">; | 
|  | 232 | def VLD1d32T_UPD : VLD1D3WB<0b1000, "32">; | 
| Bob Wilson | e60e3ab | 2010-03-22 20:31:39 +0000 | [diff] [blame] | 233 | def VLD1d64T_UPD : VLD1D3WB<0b1100, "64">; | 
| Bob Wilson | c286c88 | 2010-03-22 18:22:06 +0000 | [diff] [blame] | 234 |  | 
|  | 235 | // ...with 4 registers (some of these are only for the disassembler): | 
|  | 236 | class VLD1D4<bits<4> op7_4, string Dt> | 
|  | 237 | : NLdSt<0,0b10,0b0010,op7_4,(outs DPR:$dst1, DPR:$dst2, DPR:$dst3, DPR:$dst4), | 
|  | 238 | (ins addrmode6:$addr), IIC_VLD1, "vld1", Dt, | 
|  | 239 | "\\{$dst1, $dst2, $dst3, $dst4\\}, $addr", "", []>; | 
| Bob Wilson | 496766c | 2010-03-20 17:59:03 +0000 | [diff] [blame] | 240 | class VLD1D4WB<bits<4> op7_4, string Dt> | 
|  | 241 | : NLdSt<0,0b10,0b0010,op7_4, | 
|  | 242 | (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, DPR:$dst4, GPR:$wb), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 243 | (ins addrmode6:$addr, am6offset:$offset), IIC_VLD1, "vld1", Dt, | 
|  | 244 | "\\{$dst1, $dst2, $dst3, $dst4\\}, $addr$offset", "$addr.addr = $wb", | 
| Bob Wilson | 98bf518 | 2010-03-22 18:02:38 +0000 | [diff] [blame] | 245 | []>; | 
| Johnny Chen | b14a5c5 | 2010-02-23 20:51:23 +0000 | [diff] [blame] | 246 |  | 
| Bob Wilson | c286c88 | 2010-03-22 18:22:06 +0000 | [diff] [blame] | 247 | def VLD1d8Q      : VLD1D4<0b0000, "8">; | 
|  | 248 | def VLD1d16Q     : VLD1D4<0b0100, "16">; | 
|  | 249 | def VLD1d32Q     : VLD1D4<0b1000, "32">; | 
|  | 250 | def VLD1d64Q     : VLD1D4<0b1100, "64">; | 
| Bob Wilson | 496766c | 2010-03-20 17:59:03 +0000 | [diff] [blame] | 251 |  | 
|  | 252 | def VLD1d8Q_UPD  : VLD1D4WB<0b0000, "8">; | 
|  | 253 | def VLD1d16Q_UPD : VLD1D4WB<0b0100, "16">; | 
|  | 254 | def VLD1d32Q_UPD : VLD1D4WB<0b1000, "32">; | 
| Bob Wilson | c53a112 | 2010-03-22 18:13:18 +0000 | [diff] [blame] | 255 | def VLD1d64Q_UPD : VLD1D4WB<0b1100, "64">; | 
| Bob Wilson | 25cae66 | 2009-08-12 17:04:56 +0000 | [diff] [blame] | 256 |  | 
| Bob Wilson | 20f79e3 | 2009-08-05 00:49:09 +0000 | [diff] [blame] | 257 | //   VLD2     : Vector Load (multiple 2-element structures) | 
| Bob Wilson | d092669 | 2010-03-20 18:14:26 +0000 | [diff] [blame] | 258 | class VLD2D<bits<4> op11_8, bits<4> op7_4, string Dt> | 
|  | 259 | : NLdSt<0, 0b10, op11_8, op7_4, (outs DPR:$dst1, DPR:$dst2), | 
| Bob Wilson | 50820a2 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 260 | (ins addrmode6:$addr), IIC_VLD2, | 
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 261 | "vld2", Dt, "\\{$dst1, $dst2\\}, $addr", "", []>; | 
|  | 262 | class VLD2Q<bits<4> op7_4, string Dt> | 
| Bob Wilson | d092669 | 2010-03-20 18:14:26 +0000 | [diff] [blame] | 263 | : NLdSt<0, 0b10, 0b0011, op7_4, | 
| Bob Wilson | 50820a2 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 264 | (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, DPR:$dst4), | 
| Bob Wilson | e6b778d | 2009-10-06 22:01:59 +0000 | [diff] [blame] | 265 | (ins addrmode6:$addr), IIC_VLD2, | 
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 266 | "vld2", Dt, "\\{$dst1, $dst2, $dst3, $dst4\\}, $addr", "", []>; | 
| Bob Wilson | 20f79e3 | 2009-08-05 00:49:09 +0000 | [diff] [blame] | 267 |  | 
| Bob Wilson | d092669 | 2010-03-20 18:14:26 +0000 | [diff] [blame] | 268 | def  VLD2d8   : VLD2D<0b1000, 0b0000, "8">; | 
|  | 269 | def  VLD2d16  : VLD2D<0b1000, 0b0100, "16">; | 
|  | 270 | def  VLD2d32  : VLD2D<0b1000, 0b1000, "32">; | 
| Bob Wilson | 20f79e3 | 2009-08-05 00:49:09 +0000 | [diff] [blame] | 271 |  | 
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 272 | def  VLD2q8   : VLD2Q<0b0000, "8">; | 
|  | 273 | def  VLD2q16  : VLD2Q<0b0100, "16">; | 
|  | 274 | def  VLD2q32  : VLD2Q<0b1000, "32">; | 
| Bob Wilson | e6b778d | 2009-10-06 22:01:59 +0000 | [diff] [blame] | 275 |  | 
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 276 | // ...with address register writeback: | 
|  | 277 | class VLD2DWB<bits<4> op11_8, bits<4> op7_4, string Dt> | 
|  | 278 | : NLdSt<0, 0b10, op11_8, op7_4, (outs DPR:$dst1, DPR:$dst2, GPR:$wb), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 279 | (ins addrmode6:$addr, am6offset:$offset), IIC_VLD2, | 
|  | 280 | "vld2", Dt, "\\{$dst1, $dst2\\}, $addr$offset", | 
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 281 | "$addr.addr = $wb", []>; | 
|  | 282 | class VLD2QWB<bits<4> op7_4, string Dt> | 
|  | 283 | : NLdSt<0, 0b10, 0b0011, op7_4, | 
|  | 284 | (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, DPR:$dst4, GPR:$wb), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 285 | (ins addrmode6:$addr, am6offset:$offset), IIC_VLD2, | 
|  | 286 | "vld2", Dt, "\\{$dst1, $dst2, $dst3, $dst4\\}, $addr$offset", | 
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 287 | "$addr.addr = $wb", []>; | 
|  | 288 |  | 
|  | 289 | def VLD2d8_UPD  : VLD2DWB<0b1000, 0b0000, "8">; | 
|  | 290 | def VLD2d16_UPD : VLD2DWB<0b1000, 0b0100, "16">; | 
|  | 291 | def VLD2d32_UPD : VLD2DWB<0b1000, 0b1000, "32">; | 
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 292 |  | 
|  | 293 | def VLD2q8_UPD  : VLD2QWB<0b0000, "8">; | 
|  | 294 | def VLD2q16_UPD : VLD2QWB<0b0100, "16">; | 
|  | 295 | def VLD2q32_UPD : VLD2QWB<0b1000, "32">; | 
|  | 296 |  | 
| Bob Wilson | d092669 | 2010-03-20 18:14:26 +0000 | [diff] [blame] | 297 | // ...with double-spaced registers (for disassembly only): | 
|  | 298 | def VLD2b8      : VLD2D<0b1001, 0b0000, "8">; | 
|  | 299 | def VLD2b16     : VLD2D<0b1001, 0b0100, "16">; | 
|  | 300 | def VLD2b32     : VLD2D<0b1001, 0b1000, "32">; | 
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 301 | def VLD2b8_UPD  : VLD2DWB<0b1001, 0b0000, "8">; | 
|  | 302 | def VLD2b16_UPD : VLD2DWB<0b1001, 0b0100, "16">; | 
|  | 303 | def VLD2b32_UPD : VLD2DWB<0b1001, 0b1000, "32">; | 
| Johnny Chen | b14a5c5 | 2010-02-23 20:51:23 +0000 | [diff] [blame] | 304 |  | 
| Bob Wilson | 20f79e3 | 2009-08-05 00:49:09 +0000 | [diff] [blame] | 305 | //   VLD3     : Vector Load (multiple 3-element structures) | 
| Bob Wilson | d092669 | 2010-03-20 18:14:26 +0000 | [diff] [blame] | 306 | class VLD3D<bits<4> op11_8, bits<4> op7_4, string Dt> | 
|  | 307 | : NLdSt<0, 0b10, op11_8, op7_4, (outs DPR:$dst1, DPR:$dst2, DPR:$dst3), | 
| Bob Wilson | 50820a2 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 308 | (ins addrmode6:$addr), IIC_VLD3, | 
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 309 | "vld3", Dt, "\\{$dst1, $dst2, $dst3\\}, $addr", "", []>; | 
| Bob Wilson | 20f79e3 | 2009-08-05 00:49:09 +0000 | [diff] [blame] | 310 |  | 
| Bob Wilson | d092669 | 2010-03-20 18:14:26 +0000 | [diff] [blame] | 311 | def  VLD3d8   : VLD3D<0b0100, 0b0000, "8">; | 
|  | 312 | def  VLD3d16  : VLD3D<0b0100, 0b0100, "16">; | 
|  | 313 | def  VLD3d32  : VLD3D<0b0100, 0b1000, "32">; | 
| Bob Wilson | 20f79e3 | 2009-08-05 00:49:09 +0000 | [diff] [blame] | 314 |  | 
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 315 | // ...with address register writeback: | 
|  | 316 | class VLD3DWB<bits<4> op11_8, bits<4> op7_4, string Dt> | 
|  | 317 | : NLdSt<0, 0b10, op11_8, op7_4, | 
|  | 318 | (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, GPR:$wb), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 319 | (ins addrmode6:$addr, am6offset:$offset), IIC_VLD3, | 
|  | 320 | "vld3", Dt, "\\{$dst1, $dst2, $dst3\\}, $addr$offset", | 
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 321 | "$addr.addr = $wb", []>; | 
|  | 322 |  | 
|  | 323 | def VLD3d8_UPD  : VLD3DWB<0b0100, 0b0000, "8">; | 
|  | 324 | def VLD3d16_UPD : VLD3DWB<0b0100, 0b0100, "16">; | 
|  | 325 | def VLD3d32_UPD : VLD3DWB<0b0100, 0b1000, "32">; | 
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 326 |  | 
|  | 327 | // ...with double-spaced registers (non-updating versions for disassembly only): | 
| Bob Wilson | d092669 | 2010-03-20 18:14:26 +0000 | [diff] [blame] | 328 | def VLD3q8      : VLD3D<0b0101, 0b0000, "8">; | 
|  | 329 | def VLD3q16     : VLD3D<0b0101, 0b0100, "16">; | 
|  | 330 | def VLD3q32     : VLD3D<0b0101, 0b1000, "32">; | 
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 331 | def VLD3q8_UPD  : VLD3DWB<0b0101, 0b0000, "8">; | 
|  | 332 | def VLD3q16_UPD : VLD3DWB<0b0101, 0b0100, "16">; | 
|  | 333 | def VLD3q32_UPD : VLD3DWB<0b0101, 0b1000, "32">; | 
| Bob Wilson | d092669 | 2010-03-20 18:14:26 +0000 | [diff] [blame] | 334 |  | 
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 335 | // ...alternate versions to be allocated odd register numbers: | 
|  | 336 | def VLD3q8odd_UPD  : VLD3DWB<0b0101, 0b0000, "8">; | 
|  | 337 | def VLD3q16odd_UPD : VLD3DWB<0b0101, 0b0100, "16">; | 
|  | 338 | def VLD3q32odd_UPD : VLD3DWB<0b0101, 0b1000, "32">; | 
| Bob Wilson | 6bbefc2 | 2009-10-07 17:24:55 +0000 | [diff] [blame] | 339 |  | 
| Bob Wilson | 20f79e3 | 2009-08-05 00:49:09 +0000 | [diff] [blame] | 340 | //   VLD4     : Vector Load (multiple 4-element structures) | 
| Bob Wilson | d092669 | 2010-03-20 18:14:26 +0000 | [diff] [blame] | 341 | class VLD4D<bits<4> op11_8, bits<4> op7_4, string Dt> | 
|  | 342 | : NLdSt<0, 0b10, op11_8, op7_4, | 
| Bob Wilson | 50820a2 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 343 | (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, DPR:$dst4), | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 344 | (ins addrmode6:$addr), IIC_VLD4, | 
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 345 | "vld4", Dt, "\\{$dst1, $dst2, $dst3, $dst4\\}, $addr", "", []>; | 
| Bob Wilson | 20f79e3 | 2009-08-05 00:49:09 +0000 | [diff] [blame] | 346 |  | 
| Bob Wilson | d092669 | 2010-03-20 18:14:26 +0000 | [diff] [blame] | 347 | def  VLD4d8   : VLD4D<0b0000, 0b0000, "8">; | 
|  | 348 | def  VLD4d16  : VLD4D<0b0000, 0b0100, "16">; | 
|  | 349 | def  VLD4d32  : VLD4D<0b0000, 0b1000, "32">; | 
| Bob Wilson | da9817c | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 350 |  | 
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 351 | // ...with address register writeback: | 
|  | 352 | class VLD4DWB<bits<4> op11_8, bits<4> op7_4, string Dt> | 
|  | 353 | : NLdSt<0, 0b10, op11_8, op7_4, | 
|  | 354 | (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, DPR:$dst4, GPR:$wb), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 355 | (ins addrmode6:$addr, am6offset:$offset), IIC_VLD4, | 
|  | 356 | "vld4", Dt, "\\{$dst1, $dst2, $dst3, $dst4\\}, $addr$offset", | 
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 357 | "$addr.addr = $wb", []>; | 
|  | 358 |  | 
|  | 359 | def VLD4d8_UPD  : VLD4DWB<0b0000, 0b0000, "8">; | 
|  | 360 | def VLD4d16_UPD : VLD4DWB<0b0000, 0b0100, "16">; | 
|  | 361 | def VLD4d32_UPD : VLD4DWB<0b0000, 0b1000, "32">; | 
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 362 |  | 
|  | 363 | // ...with double-spaced registers (non-updating versions for disassembly only): | 
| Bob Wilson | d092669 | 2010-03-20 18:14:26 +0000 | [diff] [blame] | 364 | def VLD4q8      : VLD4D<0b0001, 0b0000, "8">; | 
|  | 365 | def VLD4q16     : VLD4D<0b0001, 0b0100, "16">; | 
|  | 366 | def VLD4q32     : VLD4D<0b0001, 0b1000, "32">; | 
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 367 | def VLD4q8_UPD  : VLD4DWB<0b0001, 0b0000, "8">; | 
|  | 368 | def VLD4q16_UPD : VLD4DWB<0b0001, 0b0100, "16">; | 
|  | 369 | def VLD4q32_UPD : VLD4DWB<0b0001, 0b1000, "32">; | 
| Bob Wilson | d092669 | 2010-03-20 18:14:26 +0000 | [diff] [blame] | 370 |  | 
| Bob Wilson | cf32465 | 2010-03-20 20:10:51 +0000 | [diff] [blame] | 371 | // ...alternate versions to be allocated odd register numbers: | 
|  | 372 | def VLD4q8odd_UPD  : VLD4DWB<0b0001, 0b0000, "8">; | 
|  | 373 | def VLD4q16odd_UPD : VLD4DWB<0b0001, 0b0100, "16">; | 
|  | 374 | def VLD4q32odd_UPD : VLD4DWB<0b0001, 0b1000, "32">; | 
| Bob Wilson | 50820a2 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 375 |  | 
|  | 376 | //   VLD1LN   : Vector Load (single element to one lane) | 
|  | 377 | //   FIXME: Not yet implemented. | 
| Bob Wilson | ab3a947 | 2009-10-07 18:09:32 +0000 | [diff] [blame] | 378 |  | 
| Bob Wilson | da9817c | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 379 | //   VLD2LN   : Vector Load (single 2-element structure to one lane) | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 380 | class VLD2LN<bits<4> op11_8, bits<4> op7_4, string Dt> | 
|  | 381 | : NLdSt<1, 0b10, op11_8, op7_4, (outs DPR:$dst1, DPR:$dst2), | 
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 382 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, nohash_imm:$lane), | 
|  | 383 | IIC_VLD2, "vld2", Dt, "\\{$dst1[$lane], $dst2[$lane]\\}, $addr", | 
|  | 384 | "$src1 = $dst1, $src2 = $dst2", []>; | 
| Bob Wilson | da9817c | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 385 |  | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 386 | def VLD2LNd8  : VLD2LN<0b0001, {?,?,?,?}, "8">; | 
|  | 387 | def VLD2LNd16 : VLD2LN<0b0101, {?,?,0,?}, "16">; | 
|  | 388 | def VLD2LNd32 : VLD2LN<0b1001, {?,0,?,?}, "32">; | 
| Bob Wilson | c2728f4 | 2009-10-08 18:56:10 +0000 | [diff] [blame] | 389 |  | 
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 390 | // ...with double-spaced registers: | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 391 | def VLD2LNq16 : VLD2LN<0b0101, {?,?,1,?}, "16">; | 
|  | 392 | def VLD2LNq32 : VLD2LN<0b1001, {?,1,?,?}, "32">; | 
| Bob Wilson | c2728f4 | 2009-10-08 18:56:10 +0000 | [diff] [blame] | 393 |  | 
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 394 | // ...alternate versions to be allocated odd register numbers: | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 395 | def VLD2LNq16odd : VLD2LN<0b0101, {?,?,1,?}, "16">; | 
|  | 396 | def VLD2LNq32odd : VLD2LN<0b1001, {?,1,?,?}, "32">; | 
| Bob Wilson | da9817c | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 397 |  | 
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 398 | // ...with address register writeback: | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 399 | class VLD2LNWB<bits<4> op11_8, bits<4> op7_4, string Dt> | 
|  | 400 | : NLdSt<1, 0b10, op11_8, op7_4, (outs DPR:$dst1, DPR:$dst2, GPR:$wb), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 401 | (ins addrmode6:$addr, am6offset:$offset, | 
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 402 | DPR:$src1, DPR:$src2, nohash_imm:$lane), IIC_VLD2, "vld2", Dt, | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 403 | "\\{$dst1[$lane], $dst2[$lane]\\}, $addr$offset", | 
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 404 | "$src1 = $dst1, $src2 = $dst2, $addr.addr = $wb", []>; | 
|  | 405 |  | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 406 | def VLD2LNd8_UPD  : VLD2LNWB<0b0001, {?,?,?,?}, "8">; | 
|  | 407 | def VLD2LNd16_UPD : VLD2LNWB<0b0101, {?,?,0,?}, "16">; | 
|  | 408 | def VLD2LNd32_UPD : VLD2LNWB<0b1001, {?,0,?,?}, "32">; | 
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 409 |  | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 410 | def VLD2LNq16_UPD : VLD2LNWB<0b0101, {?,?,1,?}, "16">; | 
|  | 411 | def VLD2LNq32_UPD : VLD2LNWB<0b1001, {?,1,?,?}, "32">; | 
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 412 |  | 
| Bob Wilson | da9817c | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 413 | //   VLD3LN   : Vector Load (single 3-element structure to one lane) | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 414 | class VLD3LN<bits<4> op11_8, bits<4> op7_4, string Dt> | 
|  | 415 | : NLdSt<1, 0b10, op11_8, op7_4, (outs DPR:$dst1, DPR:$dst2, DPR:$dst3), | 
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 416 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3, | 
|  | 417 | nohash_imm:$lane), IIC_VLD3, "vld3", Dt, | 
|  | 418 | "\\{$dst1[$lane], $dst2[$lane], $dst3[$lane]\\}, $addr", | 
|  | 419 | "$src1 = $dst1, $src2 = $dst2, $src3 = $dst3", []>; | 
| Bob Wilson | da9817c | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 420 |  | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 421 | def VLD3LNd8  : VLD3LN<0b0010, {?,?,?,0}, "8">; | 
|  | 422 | def VLD3LNd16 : VLD3LN<0b0110, {?,?,0,0}, "16">; | 
|  | 423 | def VLD3LNd32 : VLD3LN<0b1010, {?,0,0,0}, "32">; | 
| Bob Wilson | cf54e93 | 2009-10-08 22:27:33 +0000 | [diff] [blame] | 424 |  | 
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 425 | // ...with double-spaced registers: | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 426 | def VLD3LNq16 : VLD3LN<0b0110, {?,?,1,0}, "16">; | 
|  | 427 | def VLD3LNq32 : VLD3LN<0b1010, {?,1,0,0}, "32">; | 
| Bob Wilson | cf54e93 | 2009-10-08 22:27:33 +0000 | [diff] [blame] | 428 |  | 
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 429 | // ...alternate versions to be allocated odd register numbers: | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 430 | def VLD3LNq16odd : VLD3LN<0b0110, {?,?,1,0}, "16">; | 
|  | 431 | def VLD3LNq32odd : VLD3LN<0b1010, {?,1,0,0}, "32">; | 
| Bob Wilson | da9817c | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 432 |  | 
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 433 | // ...with address register writeback: | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 434 | class VLD3LNWB<bits<4> op11_8, bits<4> op7_4, string Dt> | 
|  | 435 | : NLdSt<1, 0b10, op11_8, op7_4, | 
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 436 | (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, GPR:$wb), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 437 | (ins addrmode6:$addr, am6offset:$offset, | 
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 438 | DPR:$src1, DPR:$src2, DPR:$src3, nohash_imm:$lane), | 
|  | 439 | IIC_VLD3, "vld3", Dt, | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 440 | "\\{$dst1[$lane], $dst2[$lane], $dst3[$lane]\\}, $addr$offset", | 
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 441 | "$src1 = $dst1, $src2 = $dst2, $src3 = $dst3, $addr.addr = $wb", | 
|  | 442 | []>; | 
|  | 443 |  | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 444 | def VLD3LNd8_UPD  : VLD3LNWB<0b0010, {?,?,?,0}, "8">; | 
|  | 445 | def VLD3LNd16_UPD : VLD3LNWB<0b0110, {?,?,0,0}, "16">; | 
|  | 446 | def VLD3LNd32_UPD : VLD3LNWB<0b1010, {?,0,0,0}, "32">; | 
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 447 |  | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 448 | def VLD3LNq16_UPD : VLD3LNWB<0b0110, {?,?,1,0}, "16">; | 
|  | 449 | def VLD3LNq32_UPD : VLD3LNWB<0b1010, {?,1,0,0}, "32">; | 
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 450 |  | 
| Bob Wilson | da9817c | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 451 | //   VLD4LN   : Vector Load (single 4-element structure to one lane) | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 452 | class VLD4LN<bits<4> op11_8, bits<4> op7_4, string Dt> | 
|  | 453 | : NLdSt<1, 0b10, op11_8, op7_4, | 
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 454 | (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, DPR:$dst4), | 
|  | 455 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4, | 
|  | 456 | nohash_imm:$lane), IIC_VLD4, "vld4", Dt, | 
| Bob Wilson | 7430a98 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 457 | "\\{$dst1[$lane], $dst2[$lane], $dst3[$lane], $dst4[$lane]\\}, $addr", | 
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 458 | "$src1 = $dst1, $src2 = $dst2, $src3 = $dst3, $src4 = $dst4", []>; | 
| Bob Wilson | da9817c | 2009-09-01 04:26:28 +0000 | [diff] [blame] | 459 |  | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 460 | def VLD4LNd8  : VLD4LN<0b0011, {?,?,?,?}, "8">; | 
|  | 461 | def VLD4LNd16 : VLD4LN<0b0111, {?,?,0,?}, "16">; | 
|  | 462 | def VLD4LNd32 : VLD4LN<0b1011, {?,0,?,?}, "32">; | 
| Bob Wilson | 38ba472 | 2009-10-08 22:53:57 +0000 | [diff] [blame] | 463 |  | 
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 464 | // ...with double-spaced registers: | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 465 | def VLD4LNq16 : VLD4LN<0b0111, {?,?,1,?}, "16">; | 
|  | 466 | def VLD4LNq32 : VLD4LN<0b1011, {?,1,?,?}, "32">; | 
| Bob Wilson | 38ba472 | 2009-10-08 22:53:57 +0000 | [diff] [blame] | 467 |  | 
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 468 | // ...alternate versions to be allocated odd register numbers: | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 469 | def VLD4LNq16odd : VLD4LN<0b0111, {?,?,1,?}, "16">; | 
|  | 470 | def VLD4LNq32odd : VLD4LN<0b1011, {?,1,?,?}, "32">; | 
| Bob Wilson | 50820a2 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 471 |  | 
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 472 | // ...with address register writeback: | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 473 | class VLD4LNWB<bits<4> op11_8, bits<4> op7_4, string Dt> | 
|  | 474 | : NLdSt<1, 0b10, op11_8, op7_4, | 
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 475 | (outs DPR:$dst1, DPR:$dst2, DPR:$dst3, DPR:$dst4, GPR:$wb), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 476 | (ins addrmode6:$addr, am6offset:$offset, | 
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 477 | DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4, nohash_imm:$lane), | 
|  | 478 | IIC_VLD4, "vld4", Dt, | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 479 | "\\{$dst1[$lane], $dst2[$lane], $dst3[$lane], $dst4[$lane]\\}, $addr$offset", | 
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 480 | "$src1 = $dst1, $src2 = $dst2, $src3 = $dst3, $src4 = $dst4, $addr.addr = $wb", | 
|  | 481 | []>; | 
|  | 482 |  | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 483 | def VLD4LNd8_UPD  : VLD4LNWB<0b0011, {?,?,?,?}, "8">; | 
|  | 484 | def VLD4LNd16_UPD : VLD4LNWB<0b0111, {?,?,0,?}, "16">; | 
|  | 485 | def VLD4LNd32_UPD : VLD4LNWB<0b1011, {?,0,?,?}, "32">; | 
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 486 |  | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 487 | def VLD4LNq16_UPD : VLD4LNWB<0b0111, {?,?,1,?}, "16">; | 
|  | 488 | def VLD4LNq32_UPD : VLD4LNWB<0b1011, {?,1,?,?}, "32">; | 
| Bob Wilson | 9152d96 | 2010-03-20 20:47:18 +0000 | [diff] [blame] | 489 |  | 
| Bob Wilson | 50820a2 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 490 | //   VLD1DUP  : Vector Load (single element to all lanes) | 
|  | 491 | //   VLD2DUP  : Vector Load (single 2-element structure to all lanes) | 
|  | 492 | //   VLD3DUP  : Vector Load (single 3-element structure to all lanes) | 
|  | 493 | //   VLD4DUP  : Vector Load (single 4-element structure to all lanes) | 
|  | 494 | //   FIXME: Not yet implemented. | 
| Evan Cheng | 1b2b64f | 2009-10-01 08:22:27 +0000 | [diff] [blame] | 495 | } // mayLoad = 1, hasExtraDefRegAllocReq = 1 | 
| Bob Wilson | f042ead | 2009-08-12 00:49:01 +0000 | [diff] [blame] | 496 |  | 
| Bob Wilson | 322cbff | 2010-03-20 20:54:36 +0000 | [diff] [blame] | 497 | let mayStore = 1, hasExtraSrcRegAllocReq = 1 in { | 
|  | 498 |  | 
| Bob Wilson | cc0a2a7 | 2010-03-23 06:20:33 +0000 | [diff] [blame] | 499 | //   VST1     : Vector Store (multiple single elements) | 
|  | 500 | class VST1D<bits<4> op7_4, string Dt> | 
|  | 501 | : NLdSt<0,0b00,0b0111,op7_4, (outs), (ins addrmode6:$addr, DPR:$src), IIC_VST, | 
|  | 502 | "vst1", Dt, "\\{$src\\}, $addr", "", []>; | 
|  | 503 | class VST1Q<bits<4> op7_4, string Dt> | 
|  | 504 | : NLdSt<0,0b00,0b1010,op7_4, (outs), | 
|  | 505 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2), IIC_VST, | 
|  | 506 | "vst1", Dt, "\\{$src1, $src2\\}, $addr", "", []>; | 
|  | 507 |  | 
|  | 508 | def  VST1d8   : VST1D<0b0000, "8">; | 
|  | 509 | def  VST1d16  : VST1D<0b0100, "16">; | 
|  | 510 | def  VST1d32  : VST1D<0b1000, "32">; | 
|  | 511 | def  VST1d64  : VST1D<0b1100, "64">; | 
|  | 512 |  | 
|  | 513 | def  VST1q8   : VST1Q<0b0000, "8">; | 
|  | 514 | def  VST1q16  : VST1Q<0b0100, "16">; | 
|  | 515 | def  VST1q32  : VST1Q<0b1000, "32">; | 
|  | 516 | def  VST1q64  : VST1Q<0b1100, "64">; | 
|  | 517 |  | 
| Bob Wilson | 322cbff | 2010-03-20 20:54:36 +0000 | [diff] [blame] | 518 | // ...with address register writeback: | 
|  | 519 | class VST1DWB<bits<4> op7_4, string Dt> | 
|  | 520 | : NLdSt<0, 0b00, 0b0111, op7_4, (outs GPR:$wb), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 521 | (ins addrmode6:$addr, am6offset:$offset, DPR:$src), IIC_VST, | 
|  | 522 | "vst1", Dt, "\\{$src\\}, $addr$offset", "$addr.addr = $wb", []>; | 
| Bob Wilson | 322cbff | 2010-03-20 20:54:36 +0000 | [diff] [blame] | 523 | class VST1QWB<bits<4> op7_4, string Dt> | 
|  | 524 | : NLdSt<0, 0b00, 0b1010, op7_4, (outs GPR:$wb), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 525 | (ins addrmode6:$addr, am6offset:$offset, QPR:$src), IIC_VST, | 
|  | 526 | "vst1", Dt, "${src:dregpair}, $addr$offset", "$addr.addr = $wb", []>; | 
| Bob Wilson | 322cbff | 2010-03-20 20:54:36 +0000 | [diff] [blame] | 527 |  | 
|  | 528 | def VST1d8_UPD  : VST1DWB<0b0000, "8">; | 
|  | 529 | def VST1d16_UPD : VST1DWB<0b0100, "16">; | 
|  | 530 | def VST1d32_UPD : VST1DWB<0b1000, "32">; | 
|  | 531 | def VST1d64_UPD : VST1DWB<0b1100, "64">; | 
|  | 532 |  | 
|  | 533 | def VST1q8_UPD  : VST1QWB<0b0000, "8">; | 
|  | 534 | def VST1q16_UPD : VST1QWB<0b0100, "16">; | 
|  | 535 | def VST1q32_UPD : VST1QWB<0b1000, "32">; | 
|  | 536 | def VST1q64_UPD : VST1QWB<0b1100, "64">; | 
|  | 537 |  | 
| Bob Wilson | c286c88 | 2010-03-22 18:22:06 +0000 | [diff] [blame] | 538 | // ...with 3 registers (some of these are only for the disassembler): | 
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 539 | class VST1D3<bits<4> op7_4, string Dt> | 
| Johnny Chen | d5c472d | 2010-02-24 02:57:20 +0000 | [diff] [blame] | 540 | : NLdSt<0, 0b00, 0b0110, op7_4, (outs), | 
| Bob Wilson | 7ee900d | 2010-03-20 19:57:03 +0000 | [diff] [blame] | 541 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3), | 
| Bob Wilson | 98bf518 | 2010-03-22 18:02:38 +0000 | [diff] [blame] | 542 | IIC_VST, "vst1", Dt, "\\{$src1, $src2, $src3\\}, $addr", "", []>; | 
| Bob Wilson | 322cbff | 2010-03-20 20:54:36 +0000 | [diff] [blame] | 543 | class VST1D3WB<bits<4> op7_4, string Dt> | 
|  | 544 | : NLdSt<0, 0b00, 0b0110, op7_4, (outs GPR:$wb), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 545 | (ins addrmode6:$addr, am6offset:$offset, | 
| Bob Wilson | 322cbff | 2010-03-20 20:54:36 +0000 | [diff] [blame] | 546 | DPR:$src1, DPR:$src2, DPR:$src3), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 547 | IIC_VST, "vst1", Dt, "\\{$src1, $src2, $src3\\}, $addr$offset", | 
| Bob Wilson | 98bf518 | 2010-03-22 18:02:38 +0000 | [diff] [blame] | 548 | "$addr.addr = $wb", []>; | 
| Bob Wilson | c286c88 | 2010-03-22 18:22:06 +0000 | [diff] [blame] | 549 |  | 
|  | 550 | def VST1d8T      : VST1D3<0b0000, "8">; | 
|  | 551 | def VST1d16T     : VST1D3<0b0100, "16">; | 
|  | 552 | def VST1d32T     : VST1D3<0b1000, "32">; | 
|  | 553 | def VST1d64T     : VST1D3<0b1100, "64">; | 
|  | 554 |  | 
|  | 555 | def VST1d8T_UPD  : VST1D3WB<0b0000, "8">; | 
|  | 556 | def VST1d16T_UPD : VST1D3WB<0b0100, "16">; | 
|  | 557 | def VST1d32T_UPD : VST1D3WB<0b1000, "32">; | 
|  | 558 | def VST1d64T_UPD : VST1D3WB<0b1100, "64">; | 
|  | 559 |  | 
|  | 560 | // ...with 4 registers (some of these are only for the disassembler): | 
|  | 561 | class VST1D4<bits<4> op7_4, string Dt> | 
|  | 562 | : NLdSt<0, 0b00, 0b0010, op7_4, (outs), | 
|  | 563 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4), | 
|  | 564 | IIC_VST, "vst1", Dt, "\\{$src1, $src2, $src3, $src4\\}, $addr", "", | 
|  | 565 | []>; | 
| Bob Wilson | 322cbff | 2010-03-20 20:54:36 +0000 | [diff] [blame] | 566 | class VST1D4WB<bits<4> op7_4, string Dt> | 
|  | 567 | : NLdSt<0, 0b00, 0b0010, op7_4, (outs GPR:$wb), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 568 | (ins addrmode6:$addr, am6offset:$offset, | 
| Bob Wilson | 322cbff | 2010-03-20 20:54:36 +0000 | [diff] [blame] | 569 | DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 570 | IIC_VST, "vst1", Dt, "\\{$src1, $src2, $src3, $src4\\}, $addr$offset", | 
| Bob Wilson | 98bf518 | 2010-03-22 18:02:38 +0000 | [diff] [blame] | 571 | "$addr.addr = $wb", []>; | 
| Bob Wilson | 322cbff | 2010-03-20 20:54:36 +0000 | [diff] [blame] | 572 |  | 
| Bob Wilson | c286c88 | 2010-03-22 18:22:06 +0000 | [diff] [blame] | 573 | def VST1d8Q      : VST1D4<0b0000, "8">; | 
|  | 574 | def VST1d16Q     : VST1D4<0b0100, "16">; | 
|  | 575 | def VST1d32Q     : VST1D4<0b1000, "32">; | 
|  | 576 | def VST1d64Q     : VST1D4<0b1100, "64">; | 
| Bob Wilson | 322cbff | 2010-03-20 20:54:36 +0000 | [diff] [blame] | 577 |  | 
|  | 578 | def VST1d8Q_UPD  : VST1D4WB<0b0000, "8">; | 
|  | 579 | def VST1d16Q_UPD : VST1D4WB<0b0100, "16">; | 
|  | 580 | def VST1d32Q_UPD : VST1D4WB<0b1000, "32">; | 
| Bob Wilson | c53a112 | 2010-03-22 18:13:18 +0000 | [diff] [blame] | 581 | def VST1d64Q_UPD : VST1D4WB<0b1100, "64">; | 
| Bob Wilson | 25cae66 | 2009-08-12 17:04:56 +0000 | [diff] [blame] | 582 |  | 
| Bob Wilson | 0127031 | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 583 | //   VST2     : Vector Store (multiple 2-element structures) | 
| Bob Wilson | 89ba42c | 2010-03-20 21:15:48 +0000 | [diff] [blame] | 584 | class VST2D<bits<4> op11_8, bits<4> op7_4, string Dt> | 
|  | 585 | : NLdSt<0, 0b00, op11_8, op7_4, (outs), | 
|  | 586 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2), | 
|  | 587 | IIC_VST, "vst2", Dt, "\\{$src1, $src2\\}, $addr", "", []>; | 
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 588 | class VST2Q<bits<4> op7_4, string Dt> | 
| Bob Wilson | 89ba42c | 2010-03-20 21:15:48 +0000 | [diff] [blame] | 589 | : NLdSt<0, 0b00, 0b0011, op7_4, (outs), | 
| Bob Wilson | 50820a2 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 590 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4), | 
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 591 | IIC_VST, "vst2", Dt, "\\{$src1, $src2, $src3, $src4\\}, $addr", | 
| Bob Wilson | 3dcb537 | 2009-10-07 18:47:39 +0000 | [diff] [blame] | 592 | "", []>; | 
| Bob Wilson | 0127031 | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 593 |  | 
| Bob Wilson | 89ba42c | 2010-03-20 21:15:48 +0000 | [diff] [blame] | 594 | def  VST2d8   : VST2D<0b1000, 0b0000, "8">; | 
|  | 595 | def  VST2d16  : VST2D<0b1000, 0b0100, "16">; | 
|  | 596 | def  VST2d32  : VST2D<0b1000, 0b1000, "32">; | 
| Bob Wilson | 0127031 | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 597 |  | 
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 598 | def  VST2q8   : VST2Q<0b0000, "8">; | 
|  | 599 | def  VST2q16  : VST2Q<0b0100, "16">; | 
|  | 600 | def  VST2q32  : VST2Q<0b1000, "32">; | 
| Bob Wilson | 3dcb537 | 2009-10-07 18:47:39 +0000 | [diff] [blame] | 601 |  | 
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 602 | // ...with address register writeback: | 
|  | 603 | class VST2DWB<bits<4> op11_8, bits<4> op7_4, string Dt> | 
|  | 604 | : NLdSt<0, 0b00, op11_8, op7_4, (outs GPR:$wb), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 605 | (ins addrmode6:$addr, am6offset:$offset, DPR:$src1, DPR:$src2), | 
|  | 606 | IIC_VST, "vst2", Dt, "\\{$src1, $src2\\}, $addr$offset", | 
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 607 | "$addr.addr = $wb", []>; | 
|  | 608 | class VST2QWB<bits<4> op7_4, string Dt> | 
|  | 609 | : NLdSt<0, 0b00, 0b0011, op7_4, (outs GPR:$wb), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 610 | (ins addrmode6:$addr, am6offset:$offset, | 
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 611 | DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 612 | IIC_VST, "vst2", Dt, "\\{$src1, $src2, $src3, $src4\\}, $addr$offset", | 
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 613 | "$addr.addr = $wb", []>; | 
|  | 614 |  | 
|  | 615 | def VST2d8_UPD  : VST2DWB<0b1000, 0b0000, "8">; | 
|  | 616 | def VST2d16_UPD : VST2DWB<0b1000, 0b0100, "16">; | 
|  | 617 | def VST2d32_UPD : VST2DWB<0b1000, 0b1000, "32">; | 
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 618 |  | 
|  | 619 | def VST2q8_UPD  : VST2QWB<0b0000, "8">; | 
|  | 620 | def VST2q16_UPD : VST2QWB<0b0100, "16">; | 
|  | 621 | def VST2q32_UPD : VST2QWB<0b1000, "32">; | 
|  | 622 |  | 
| Bob Wilson | 89ba42c | 2010-03-20 21:15:48 +0000 | [diff] [blame] | 623 | // ...with double-spaced registers (for disassembly only): | 
|  | 624 | def VST2b8      : VST2D<0b1001, 0b0000, "8">; | 
|  | 625 | def VST2b16     : VST2D<0b1001, 0b0100, "16">; | 
|  | 626 | def VST2b32     : VST2D<0b1001, 0b1000, "32">; | 
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 627 | def VST2b8_UPD  : VST2DWB<0b1001, 0b0000, "8">; | 
|  | 628 | def VST2b16_UPD : VST2DWB<0b1001, 0b0100, "16">; | 
|  | 629 | def VST2b32_UPD : VST2DWB<0b1001, 0b1000, "32">; | 
| Johnny Chen | d5c472d | 2010-02-24 02:57:20 +0000 | [diff] [blame] | 630 |  | 
| Bob Wilson | 0127031 | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 631 | //   VST3     : Vector Store (multiple 3-element structures) | 
| Bob Wilson | 89ba42c | 2010-03-20 21:15:48 +0000 | [diff] [blame] | 632 | class VST3D<bits<4> op11_8, bits<4> op7_4, string Dt> | 
|  | 633 | : NLdSt<0, 0b00, op11_8, op7_4, (outs), | 
| Bob Wilson | 50820a2 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 634 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3), IIC_VST, | 
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 635 | "vst3", Dt, "\\{$src1, $src2, $src3\\}, $addr", "", []>; | 
| Bob Wilson | 0127031 | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 636 |  | 
| Bob Wilson | 89ba42c | 2010-03-20 21:15:48 +0000 | [diff] [blame] | 637 | def  VST3d8   : VST3D<0b0100, 0b0000, "8">; | 
|  | 638 | def  VST3d16  : VST3D<0b0100, 0b0100, "16">; | 
|  | 639 | def  VST3d32  : VST3D<0b0100, 0b1000, "32">; | 
| Bob Wilson | 0127031 | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 640 |  | 
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 641 | // ...with address register writeback: | 
|  | 642 | class VST3DWB<bits<4> op11_8, bits<4> op7_4, string Dt> | 
|  | 643 | : NLdSt<0, 0b00, op11_8, op7_4, (outs GPR:$wb), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 644 | (ins addrmode6:$addr, am6offset:$offset, | 
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 645 | DPR:$src1, DPR:$src2, DPR:$src3), IIC_VST, | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 646 | "vst3", Dt, "\\{$src1, $src2, $src3\\}, $addr$offset", | 
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 647 | "$addr.addr = $wb", []>; | 
|  | 648 |  | 
|  | 649 | def VST3d8_UPD  : VST3DWB<0b0100, 0b0000, "8">; | 
|  | 650 | def VST3d16_UPD : VST3DWB<0b0100, 0b0100, "16">; | 
|  | 651 | def VST3d32_UPD : VST3DWB<0b0100, 0b1000, "32">; | 
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 652 |  | 
|  | 653 | // ...with double-spaced registers (non-updating versions for disassembly only): | 
| Bob Wilson | 89ba42c | 2010-03-20 21:15:48 +0000 | [diff] [blame] | 654 | def VST3q8      : VST3D<0b0101, 0b0000, "8">; | 
|  | 655 | def VST3q16     : VST3D<0b0101, 0b0100, "16">; | 
|  | 656 | def VST3q32     : VST3D<0b0101, 0b1000, "32">; | 
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 657 | def VST3q8_UPD  : VST3DWB<0b0101, 0b0000, "8">; | 
|  | 658 | def VST3q16_UPD : VST3DWB<0b0101, 0b0100, "16">; | 
|  | 659 | def VST3q32_UPD : VST3DWB<0b0101, 0b1000, "32">; | 
| Bob Wilson | 89ba42c | 2010-03-20 21:15:48 +0000 | [diff] [blame] | 660 |  | 
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 661 | // ...alternate versions to be allocated odd register numbers: | 
|  | 662 | def VST3q8odd_UPD  : VST3DWB<0b0101, 0b0000, "8">; | 
|  | 663 | def VST3q16odd_UPD : VST3DWB<0b0101, 0b0100, "16">; | 
|  | 664 | def VST3q32odd_UPD : VST3DWB<0b0101, 0b1000, "32">; | 
| Bob Wilson | 2346486 | 2009-10-07 20:30:08 +0000 | [diff] [blame] | 665 |  | 
| Bob Wilson | 0127031 | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 666 | //   VST4     : Vector Store (multiple 4-element structures) | 
| Bob Wilson | 89ba42c | 2010-03-20 21:15:48 +0000 | [diff] [blame] | 667 | class VST4D<bits<4> op11_8, bits<4> op7_4, string Dt> | 
|  | 668 | : NLdSt<0, 0b00, op11_8, op7_4, (outs), | 
| Bob Wilson | 50820a2 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 669 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4), | 
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 670 | IIC_VST, "vst4", Dt, "\\{$src1, $src2, $src3, $src4\\}, $addr", | 
| Bob Wilson | 9129376 | 2009-08-25 17:46:06 +0000 | [diff] [blame] | 671 | "", []>; | 
| Bob Wilson | 0127031 | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 672 |  | 
| Bob Wilson | 89ba42c | 2010-03-20 21:15:48 +0000 | [diff] [blame] | 673 | def  VST4d8   : VST4D<0b0000, 0b0000, "8">; | 
|  | 674 | def  VST4d16  : VST4D<0b0000, 0b0100, "16">; | 
|  | 675 | def  VST4d32  : VST4D<0b0000, 0b1000, "32">; | 
| Bob Wilson | d779775 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 676 |  | 
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 677 | // ...with address register writeback: | 
|  | 678 | class VST4DWB<bits<4> op11_8, bits<4> op7_4, string Dt> | 
|  | 679 | : NLdSt<0, 0b00, op11_8, op7_4, (outs GPR:$wb), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 680 | (ins addrmode6:$addr, am6offset:$offset, | 
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 681 | DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4), IIC_VST, | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 682 | "vst4", Dt, "\\{$src1, $src2, $src3, $src4\\}, $addr$offset", | 
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 683 | "$addr.addr = $wb", []>; | 
|  | 684 |  | 
|  | 685 | def VST4d8_UPD  : VST4DWB<0b0000, 0b0000, "8">; | 
|  | 686 | def VST4d16_UPD : VST4DWB<0b0000, 0b0100, "16">; | 
|  | 687 | def VST4d32_UPD : VST4DWB<0b0000, 0b1000, "32">; | 
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 688 |  | 
|  | 689 | // ...with double-spaced registers (non-updating versions for disassembly only): | 
| Bob Wilson | 89ba42c | 2010-03-20 21:15:48 +0000 | [diff] [blame] | 690 | def VST4q8      : VST4D<0b0001, 0b0000, "8">; | 
|  | 691 | def VST4q16     : VST4D<0b0001, 0b0100, "16">; | 
|  | 692 | def VST4q32     : VST4D<0b0001, 0b1000, "32">; | 
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 693 | def VST4q8_UPD  : VST4DWB<0b0001, 0b0000, "8">; | 
|  | 694 | def VST4q16_UPD : VST4DWB<0b0001, 0b0100, "16">; | 
|  | 695 | def VST4q32_UPD : VST4DWB<0b0001, 0b1000, "32">; | 
| Bob Wilson | 89ba42c | 2010-03-20 21:15:48 +0000 | [diff] [blame] | 696 |  | 
| Bob Wilson | b18adef | 2010-03-20 21:45:18 +0000 | [diff] [blame] | 697 | // ...alternate versions to be allocated odd register numbers: | 
|  | 698 | def VST4q8odd_UPD  : VST4DWB<0b0001, 0b0000, "8">; | 
|  | 699 | def VST4q16odd_UPD : VST4DWB<0b0001, 0b0100, "16">; | 
|  | 700 | def VST4q32odd_UPD : VST4DWB<0b0001, 0b1000, "32">; | 
| Bob Wilson | 50820a2 | 2009-10-07 21:53:04 +0000 | [diff] [blame] | 701 |  | 
|  | 702 | //   VST1LN   : Vector Store (single element from one lane) | 
|  | 703 | //   FIXME: Not yet implemented. | 
| Bob Wilson | e7ef4a9 | 2009-10-07 20:49:18 +0000 | [diff] [blame] | 704 |  | 
| Bob Wilson | d779775 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 705 | //   VST2LN   : Vector Store (single 2-element structure from one lane) | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 706 | class VST2LN<bits<4> op11_8, bits<4> op7_4, string Dt> | 
|  | 707 | : NLdSt<1, 0b00, op11_8, op7_4, (outs), | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 708 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, nohash_imm:$lane), | 
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 709 | IIC_VST, "vst2", Dt, "\\{$src1[$lane], $src2[$lane]\\}, $addr", | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 710 | "", []>; | 
| Bob Wilson | d779775 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 711 |  | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 712 | def VST2LNd8  : VST2LN<0b0001, {?,?,?,?}, "8">; | 
|  | 713 | def VST2LNd16 : VST2LN<0b0101, {?,?,0,?}, "16">; | 
|  | 714 | def VST2LNd32 : VST2LN<0b1001, {?,0,?,?}, "32">; | 
| Bob Wilson | b851eb3 | 2009-10-08 23:38:24 +0000 | [diff] [blame] | 715 |  | 
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 716 | // ...with double-spaced registers: | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 717 | def VST2LNq16 : VST2LN<0b0101, {?,?,1,?}, "16">; | 
|  | 718 | def VST2LNq32 : VST2LN<0b1001, {?,1,?,?}, "32">; | 
| Bob Wilson | b851eb3 | 2009-10-08 23:38:24 +0000 | [diff] [blame] | 719 |  | 
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 720 | // ...alternate versions to be allocated odd register numbers: | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 721 | def VST2LNq16odd : VST2LN<0b0101, {?,?,1,?}, "16">; | 
|  | 722 | def VST2LNq32odd : VST2LN<0b1001, {?,1,?,?}, "32">; | 
| Bob Wilson | d779775 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 723 |  | 
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 724 | // ...with address register writeback: | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 725 | class VST2LNWB<bits<4> op11_8, bits<4> op7_4, string Dt> | 
|  | 726 | : NLdSt<1, 0b00, op11_8, op7_4, (outs GPR:$wb), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 727 | (ins addrmode6:$addr, am6offset:$offset, | 
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 728 | DPR:$src1, DPR:$src2, nohash_imm:$lane), IIC_VST, "vst2", Dt, | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 729 | "\\{$src1[$lane], $src2[$lane]\\}, $addr$offset", | 
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 730 | "$addr.addr = $wb", []>; | 
|  | 731 |  | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 732 | def VST2LNd8_UPD  : VST2LNWB<0b0001, {?,?,?,?}, "8">; | 
|  | 733 | def VST2LNd16_UPD : VST2LNWB<0b0101, {?,?,0,?}, "16">; | 
|  | 734 | def VST2LNd32_UPD : VST2LNWB<0b1001, {?,0,?,?}, "32">; | 
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 735 |  | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 736 | def VST2LNq16_UPD : VST2LNWB<0b0101, {?,?,1,?}, "16">; | 
|  | 737 | def VST2LNq32_UPD : VST2LNWB<0b1001, {?,1,?,?}, "32">; | 
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 738 |  | 
| Bob Wilson | d779775 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 739 | //   VST3LN   : Vector Store (single 3-element structure from one lane) | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 740 | class VST3LN<bits<4> op11_8, bits<4> op7_4, string Dt> | 
|  | 741 | : NLdSt<1, 0b00, op11_8, op7_4, (outs), | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 742 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3, | 
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 743 | nohash_imm:$lane), IIC_VST, "vst3", Dt, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 744 | "\\{$src1[$lane], $src2[$lane], $src3[$lane]\\}, $addr", "", []>; | 
| Bob Wilson | d779775 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 745 |  | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 746 | def VST3LNd8  : VST3LN<0b0010, {?,?,?,0}, "8">; | 
|  | 747 | def VST3LNd16 : VST3LN<0b0110, {?,?,0,0}, "16">; | 
|  | 748 | def VST3LNd32 : VST3LN<0b1010, {?,0,0,0}, "32">; | 
| Bob Wilson | c4090308 | 2009-10-08 23:51:31 +0000 | [diff] [blame] | 749 |  | 
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 750 | // ...with double-spaced registers: | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 751 | def VST3LNq16 : VST3LN<0b0110, {?,?,1,0}, "16">; | 
|  | 752 | def VST3LNq32 : VST3LN<0b1010, {?,1,0,0}, "32">; | 
| Bob Wilson | c4090308 | 2009-10-08 23:51:31 +0000 | [diff] [blame] | 753 |  | 
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 754 | // ...alternate versions to be allocated odd register numbers: | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 755 | def VST3LNq16odd : VST3LN<0b0110, {?,?,1,0}, "16">; | 
|  | 756 | def VST3LNq32odd : VST3LN<0b1010, {?,1,0,0}, "32">; | 
| Bob Wilson | d779775 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 757 |  | 
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 758 | // ...with address register writeback: | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 759 | class VST3LNWB<bits<4> op11_8, bits<4> op7_4, string Dt> | 
|  | 760 | : NLdSt<1, 0b00, op11_8, op7_4, (outs GPR:$wb), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 761 | (ins addrmode6:$addr, am6offset:$offset, | 
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 762 | DPR:$src1, DPR:$src2, DPR:$src3, nohash_imm:$lane), | 
|  | 763 | IIC_VST, "vst3", Dt, | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 764 | "\\{$src1[$lane], $src2[$lane], $src3[$lane]\\}, $addr$offset", | 
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 765 | "$addr.addr = $wb", []>; | 
|  | 766 |  | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 767 | def VST3LNd8_UPD  : VST3LNWB<0b0010, {?,?,?,0}, "8">; | 
|  | 768 | def VST3LNd16_UPD : VST3LNWB<0b0110, {?,?,0,0}, "16">; | 
|  | 769 | def VST3LNd32_UPD : VST3LNWB<0b1010, {?,0,0,0}, "32">; | 
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 770 |  | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 771 | def VST3LNq16_UPD : VST3LNWB<0b0110, {?,?,1,0}, "16">; | 
|  | 772 | def VST3LNq32_UPD : VST3LNWB<0b1010, {?,1,0,0}, "32">; | 
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 773 |  | 
| Bob Wilson | d779775 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 774 | //   VST4LN   : Vector Store (single 4-element structure from one lane) | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 775 | class VST4LN<bits<4> op11_8, bits<4> op7_4, string Dt> | 
|  | 776 | : NLdSt<1, 0b00, op11_8, op7_4, (outs), | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 777 | (ins addrmode6:$addr, DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4, | 
| Bob Wilson | a7f236a | 2010-03-18 20:18:39 +0000 | [diff] [blame] | 778 | nohash_imm:$lane), IIC_VST, "vst4", Dt, | 
| Bob Wilson | 7430a98 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 779 | "\\{$src1[$lane], $src2[$lane], $src3[$lane], $src4[$lane]\\}, $addr", | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 780 | "", []>; | 
| Bob Wilson | d779775 | 2009-09-01 18:51:56 +0000 | [diff] [blame] | 781 |  | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 782 | def VST4LNd8  : VST4LN<0b0011, {?,?,?,?}, "8">; | 
|  | 783 | def VST4LNd16 : VST4LN<0b0111, {?,?,0,?}, "16">; | 
|  | 784 | def VST4LNd32 : VST4LN<0b1011, {?,0,?,?}, "32">; | 
| Bob Wilson | 84e7967 | 2009-10-09 00:01:36 +0000 | [diff] [blame] | 785 |  | 
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 786 | // ...with double-spaced registers: | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 787 | def VST4LNq16 : VST4LN<0b0111, {?,?,1,?}, "16">; | 
|  | 788 | def VST4LNq32 : VST4LN<0b1011, {?,1,?,?}, "32">; | 
| Bob Wilson | 84e7967 | 2009-10-09 00:01:36 +0000 | [diff] [blame] | 789 |  | 
| Bob Wilson | 9b15842 | 2010-03-20 20:39:53 +0000 | [diff] [blame] | 790 | // ...alternate versions to be allocated odd register numbers: | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 791 | def VST4LNq16odd : VST4LN<0b0111, {?,?,1,?}, "16">; | 
|  | 792 | def VST4LNq32odd : VST4LN<0b1011, {?,1,?,?}, "32">; | 
| Bob Wilson | 84e7967 | 2009-10-09 00:01:36 +0000 | [diff] [blame] | 793 |  | 
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 794 | // ...with address register writeback: | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 795 | class VST4LNWB<bits<4> op11_8, bits<4> op7_4, string Dt> | 
|  | 796 | : NLdSt<1, 0b00, op11_8, op7_4, (outs GPR:$wb), | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 797 | (ins addrmode6:$addr, am6offset:$offset, | 
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 798 | DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4, nohash_imm:$lane), | 
|  | 799 | IIC_VST, "vst4", Dt, | 
| Bob Wilson | ae08a73 | 2010-03-20 22:13:40 +0000 | [diff] [blame] | 800 | "\\{$src1[$lane], $src2[$lane], $src3[$lane], $src4[$lane]\\}, $addr$offset", | 
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 801 | "$addr.addr = $wb", []>; | 
|  | 802 |  | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 803 | def VST4LNd8_UPD  : VST4LNWB<0b0011, {?,?,?,?}, "8">; | 
|  | 804 | def VST4LNd16_UPD : VST4LNWB<0b0111, {?,?,0,?}, "16">; | 
|  | 805 | def VST4LNd32_UPD : VST4LNWB<0b1011, {?,0,?,?}, "32">; | 
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 806 |  | 
| Bob Wilson | debe0bd | 2010-03-22 16:43:10 +0000 | [diff] [blame] | 807 | def VST4LNq16_UPD : VST4LNWB<0b0111, {?,?,1,?}, "16">; | 
|  | 808 | def VST4LNq32_UPD : VST4LNWB<0b1011, {?,1,?,?}, "32">; | 
| Bob Wilson | 59e5141 | 2010-03-20 21:57:36 +0000 | [diff] [blame] | 809 |  | 
| Evan Cheng | 1b2b64f | 2009-10-01 08:22:27 +0000 | [diff] [blame] | 810 | } // mayStore = 1, hasExtraSrcRegAllocReq = 1 | 
| Bob Wilson | 0127031 | 2009-08-06 18:47:44 +0000 | [diff] [blame] | 811 |  | 
| Bob Wilson | f731a2d | 2009-07-08 18:11:30 +0000 | [diff] [blame] | 812 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 813 | //===----------------------------------------------------------------------===// | 
|  | 814 | // NEON pattern fragments | 
|  | 815 | //===----------------------------------------------------------------------===// | 
|  | 816 |  | 
|  | 817 | // Extract D sub-registers of Q registers. | 
|  | 818 | // (arm_dsubreg_0 is 5; arm_dsubreg_1 is 6) | 
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 819 | def DSubReg_i8_reg  : SDNodeXForm<imm, [{ | 
| Owen Anderson | 9f94459 | 2009-08-11 20:47:22 +0000 | [diff] [blame] | 820 | return CurDAG->getTargetConstant(5 + N->getZExtValue() / 8, MVT::i32); | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 821 | }]>; | 
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 822 | def DSubReg_i16_reg : SDNodeXForm<imm, [{ | 
| Owen Anderson | 9f94459 | 2009-08-11 20:47:22 +0000 | [diff] [blame] | 823 | return CurDAG->getTargetConstant(5 + N->getZExtValue() / 4, MVT::i32); | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 824 | }]>; | 
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 825 | def DSubReg_i32_reg : SDNodeXForm<imm, [{ | 
| Owen Anderson | 9f94459 | 2009-08-11 20:47:22 +0000 | [diff] [blame] | 826 | return CurDAG->getTargetConstant(5 + N->getZExtValue() / 2, MVT::i32); | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 827 | }]>; | 
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 828 | def DSubReg_f64_reg : SDNodeXForm<imm, [{ | 
| Owen Anderson | 9f94459 | 2009-08-11 20:47:22 +0000 | [diff] [blame] | 829 | return CurDAG->getTargetConstant(5 + N->getZExtValue(), MVT::i32); | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 830 | }]>; | 
| Anton Korobeynikov | f0da41c | 2009-09-02 21:21:28 +0000 | [diff] [blame] | 831 | def DSubReg_f64_other_reg : SDNodeXForm<imm, [{ | 
|  | 832 | return CurDAG->getTargetConstant(5 + (1 - N->getZExtValue()), MVT::i32); | 
|  | 833 | }]>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 834 |  | 
| Anton Korobeynikov | cd41d07 | 2009-08-28 23:41:26 +0000 | [diff] [blame] | 835 | // Extract S sub-registers of Q/D registers. | 
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 836 | // (arm_ssubreg_0 is 1; arm_ssubreg_1 is 2; etc.) | 
|  | 837 | def SSubReg_f32_reg : SDNodeXForm<imm, [{ | 
| Owen Anderson | 9f94459 | 2009-08-11 20:47:22 +0000 | [diff] [blame] | 838 | return CurDAG->getTargetConstant(1 + N->getZExtValue(), MVT::i32); | 
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 839 | }]>; | 
|  | 840 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 841 | // Translate lane numbers from Q registers to D subregs. | 
|  | 842 | def SubReg_i8_lane  : SDNodeXForm<imm, [{ | 
| Owen Anderson | 9f94459 | 2009-08-11 20:47:22 +0000 | [diff] [blame] | 843 | return CurDAG->getTargetConstant(N->getZExtValue() & 7, MVT::i32); | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 844 | }]>; | 
|  | 845 | def SubReg_i16_lane : SDNodeXForm<imm, [{ | 
| Owen Anderson | 9f94459 | 2009-08-11 20:47:22 +0000 | [diff] [blame] | 846 | return CurDAG->getTargetConstant(N->getZExtValue() & 3, MVT::i32); | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 847 | }]>; | 
|  | 848 | def SubReg_i32_lane : SDNodeXForm<imm, [{ | 
| Owen Anderson | 9f94459 | 2009-08-11 20:47:22 +0000 | [diff] [blame] | 849 | return CurDAG->getTargetConstant(N->getZExtValue() & 1, MVT::i32); | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 850 | }]>; | 
|  | 851 |  | 
|  | 852 | //===----------------------------------------------------------------------===// | 
|  | 853 | // Instruction Classes | 
|  | 854 | //===----------------------------------------------------------------------===// | 
|  | 855 |  | 
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 856 | // Basic 2-register operations: single-, double- and quad-register. | 
|  | 857 | class N2VS<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, | 
|  | 858 | bits<2> op17_16, bits<5> op11_7, bit op4, string OpcodeStr, | 
|  | 859 | string Dt, ValueType ResTy, ValueType OpTy, SDNode OpNode> | 
| Johnny Chen | e99953c | 2010-03-24 19:47:14 +0000 | [diff] [blame] | 860 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, | 
|  | 861 | (outs DPR_VFP2:$dst), (ins DPR_VFP2:$src), | 
|  | 862 | IIC_VUNAD, OpcodeStr, Dt, "$dst, $src", "", []>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 863 | class N2VD<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, | 
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 864 | bits<2> op17_16, bits<5> op11_7, bit op4, string OpcodeStr, | 
|  | 865 | string Dt, ValueType ResTy, ValueType OpTy, SDNode OpNode> | 
| Johnny Chen | e99953c | 2010-03-24 19:47:14 +0000 | [diff] [blame] | 866 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, (outs DPR:$dst), | 
|  | 867 | (ins DPR:$src), IIC_VUNAD, OpcodeStr, Dt,"$dst, $src", "", | 
|  | 868 | [(set DPR:$dst, (ResTy (OpNode (OpTy DPR:$src))))]>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 869 | class N2VQ<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, | 
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 870 | bits<2> op17_16, bits<5> op11_7, bit op4, string OpcodeStr, | 
|  | 871 | string Dt, ValueType ResTy, ValueType OpTy, SDNode OpNode> | 
| Johnny Chen | e99953c | 2010-03-24 19:47:14 +0000 | [diff] [blame] | 872 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 1, op4, (outs QPR:$dst), | 
|  | 873 | (ins QPR:$src), IIC_VUNAQ, OpcodeStr, Dt,"$dst, $src", "", | 
|  | 874 | [(set QPR:$dst, (ResTy (OpNode (OpTy QPR:$src))))]>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 875 |  | 
| Bob Wilson | cb2deb2 | 2010-02-17 22:42:54 +0000 | [diff] [blame] | 876 | // Basic 2-register intrinsics, both double- and quad-register. | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 877 | class N2VDInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, | 
| Johnny Chen | d82f900 | 2010-03-25 20:39:04 +0000 | [diff] [blame] | 878 | bits<2> op17_16, bits<5> op11_7, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 879 | InstrItinClass itin, string OpcodeStr, string Dt, | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 880 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> | 
|  | 881 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, (outs DPR:$dst), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 882 | (ins DPR:$src), itin, OpcodeStr, Dt, "$dst, $src", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 883 | [(set DPR:$dst, (ResTy (IntOp (OpTy DPR:$src))))]>; | 
|  | 884 | class N2VQInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 885 | bits<2> op17_16, bits<5> op11_7, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 886 | InstrItinClass itin, string OpcodeStr, string Dt, | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 887 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> | 
|  | 888 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 1, op4, (outs QPR:$dst), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 889 | (ins QPR:$src), itin, OpcodeStr, Dt, "$dst, $src", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 890 | [(set QPR:$dst, (ResTy (IntOp (OpTy QPR:$src))))]>; | 
|  | 891 |  | 
|  | 892 | // Narrow 2-register intrinsics. | 
|  | 893 | class N2VNInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, | 
|  | 894 | bits<2> op17_16, bits<5> op11_7, bit op6, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 895 | InstrItinClass itin, string OpcodeStr, string Dt, | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 896 | ValueType TyD, ValueType TyQ, Intrinsic IntOp> | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 897 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, op6, op4, (outs DPR:$dst), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 898 | (ins QPR:$src), itin, OpcodeStr, Dt, "$dst, $src", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 899 | [(set DPR:$dst, (TyD (IntOp (TyQ QPR:$src))))]>; | 
|  | 900 |  | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 901 | // Long 2-register intrinsics (currently only used for VMOVL). | 
|  | 902 | class N2VLInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, | 
|  | 903 | bits<2> op17_16, bits<5> op11_7, bit op6, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 904 | InstrItinClass itin, string OpcodeStr, string Dt, | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 905 | ValueType TyQ, ValueType TyD, Intrinsic IntOp> | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 906 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, op6, op4, (outs QPR:$dst), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 907 | (ins DPR:$src), itin, OpcodeStr, Dt, "$dst, $src", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 908 | [(set QPR:$dst, (TyQ (IntOp (TyD DPR:$src))))]>; | 
|  | 909 |  | 
| Bob Wilson | e223107 | 2009-08-08 06:13:25 +0000 | [diff] [blame] | 910 | // 2-register shuffles (VTRN/VZIP/VUZP), both double- and quad-register. | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 911 | class N2VDShuffle<bits<2> op19_18, bits<5> op11_7, string OpcodeStr, string Dt> | 
| Bob Wilson | e223107 | 2009-08-08 06:13:25 +0000 | [diff] [blame] | 912 | : N2V<0b11, 0b11, op19_18, 0b10, op11_7, 0, 0, (outs DPR:$dst1, DPR:$dst2), | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 913 | (ins DPR:$src1, DPR:$src2), IIC_VPERMD, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 914 | OpcodeStr, Dt, "$dst1, $dst2", | 
| Johnny Chen | 274a0d3 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 915 | "$src1 = $dst1, $src2 = $dst2", []>; | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 916 | class N2VQShuffle<bits<2> op19_18, bits<5> op11_7, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 917 | InstrItinClass itin, string OpcodeStr, string Dt> | 
| Bob Wilson | e223107 | 2009-08-08 06:13:25 +0000 | [diff] [blame] | 918 | : N2V<0b11, 0b11, op19_18, 0b10, op11_7, 1, 0, (outs QPR:$dst1, QPR:$dst2), | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 919 | (ins QPR:$src1, QPR:$src2), itin, OpcodeStr, Dt, "$dst1, $dst2", | 
| Johnny Chen | 274a0d3 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 920 | "$src1 = $dst1, $src2 = $dst2", []>; | 
| Bob Wilson | e223107 | 2009-08-08 06:13:25 +0000 | [diff] [blame] | 921 |  | 
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 922 | // Basic 3-register operations: single-, double- and quad-register. | 
|  | 923 | class N3VS<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, | 
|  | 924 | string OpcodeStr, string Dt, ValueType ResTy, ValueType OpTy, | 
|  | 925 | SDNode OpNode, bit Commutable> | 
|  | 926 | : N3V<op24, op23, op21_20, op11_8, 0, op4, | 
|  | 927 | (outs DPR_VFP2:$dst), (ins DPR_VFP2:$src1, DPR_VFP2:$src2), IIC_VBIND, | 
|  | 928 | OpcodeStr, Dt, "$dst, $src1, $src2", "", []> { | 
|  | 929 | let isCommutable = Commutable; | 
|  | 930 | } | 
|  | 931 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 932 | class N3VD<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 933 | InstrItinClass itin, string OpcodeStr, string Dt, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 934 | ValueType ResTy, ValueType OpTy, SDNode OpNode, bit Commutable> | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 935 | : N3V<op24, op23, op21_20, op11_8, 0, op4, | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 936 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2), itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 937 | OpcodeStr, Dt, "$dst, $src1, $src2", "", | 
|  | 938 | [(set DPR:$dst, (ResTy (OpNode (OpTy DPR:$src1), (OpTy DPR:$src2))))]> { | 
|  | 939 | let isCommutable = Commutable; | 
|  | 940 | } | 
|  | 941 | // Same as N3VD but no data type. | 
|  | 942 | class N3VDX<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, | 
|  | 943 | InstrItinClass itin, string OpcodeStr, | 
|  | 944 | ValueType ResTy, ValueType OpTy, | 
|  | 945 | SDNode OpNode, bit Commutable> | 
|  | 946 | : N3VX<op24, op23, op21_20, op11_8, 0, op4, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 947 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2), itin, | 
|  | 948 | OpcodeStr, "$dst, $src1, $src2", "", | 
|  | 949 | [(set DPR:$dst, (ResTy (OpNode (OpTy DPR:$src1), (OpTy DPR:$src2))))]>{ | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 950 | let isCommutable = Commutable; | 
|  | 951 | } | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 952 | class N3VDSL<bits<2> op21_20, bits<4> op11_8, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 953 | InstrItinClass itin, string OpcodeStr, string Dt, | 
|  | 954 | ValueType Ty, SDNode ShOp> | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 955 | : N3V<0, 1, op21_20, op11_8, 1, 0, | 
|  | 956 | (outs DPR:$dst), (ins DPR:$src1, DPR_VFP2:$src2, nohash_imm:$lane), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 957 | itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 958 | [(set (Ty DPR:$dst), | 
|  | 959 | (Ty (ShOp (Ty DPR:$src1), | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 960 | (Ty (NEONvduplane (Ty DPR_VFP2:$src2), imm:$lane)))))]>{ | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 961 | let isCommutable = 0; | 
|  | 962 | } | 
|  | 963 | class N3VDSL16<bits<2> op21_20, bits<4> op11_8, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 964 | string OpcodeStr, string Dt, ValueType Ty, SDNode ShOp> | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 965 | : N3V<0, 1, op21_20, op11_8, 1, 0, | 
|  | 966 | (outs DPR:$dst), (ins DPR:$src1, DPR_8:$src2, nohash_imm:$lane), | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 967 | IIC_VMULi16D, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 968 | [(set (Ty DPR:$dst), | 
|  | 969 | (Ty (ShOp (Ty DPR:$src1), | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 970 | (Ty (NEONvduplane (Ty DPR_8:$src2), imm:$lane)))))]> { | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 971 | let isCommutable = 0; | 
|  | 972 | } | 
|  | 973 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 974 | class N3VQ<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 975 | InstrItinClass itin, string OpcodeStr, string Dt, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 976 | ValueType ResTy, ValueType OpTy, SDNode OpNode, bit Commutable> | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 977 | : N3V<op24, op23, op21_20, op11_8, 1, op4, | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 978 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2), itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 979 | OpcodeStr, Dt, "$dst, $src1, $src2", "", | 
|  | 980 | [(set QPR:$dst, (ResTy (OpNode (OpTy QPR:$src1), (OpTy QPR:$src2))))]> { | 
|  | 981 | let isCommutable = Commutable; | 
|  | 982 | } | 
|  | 983 | class N3VQX<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, | 
|  | 984 | InstrItinClass itin, string OpcodeStr, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 985 | ValueType ResTy, ValueType OpTy, SDNode OpNode, bit Commutable> | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 986 | : N3VX<op24, op23, op21_20, op11_8, 1, op4, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 987 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2), itin, | 
|  | 988 | OpcodeStr, "$dst, $src1, $src2", "", | 
|  | 989 | [(set QPR:$dst, (ResTy (OpNode (OpTy QPR:$src1), (OpTy QPR:$src2))))]>{ | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 990 | let isCommutable = Commutable; | 
|  | 991 | } | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 992 | class N3VQSL<bits<2> op21_20, bits<4> op11_8, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 993 | InstrItinClass itin, string OpcodeStr, string Dt, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 994 | ValueType ResTy, ValueType OpTy, SDNode ShOp> | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 995 | : N3V<1, 1, op21_20, op11_8, 1, 0, | 
|  | 996 | (outs QPR:$dst), (ins QPR:$src1, DPR_VFP2:$src2, nohash_imm:$lane), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 997 | itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 998 | [(set (ResTy QPR:$dst), | 
|  | 999 | (ResTy (ShOp (ResTy QPR:$src1), | 
|  | 1000 | (ResTy (NEONvduplane (OpTy DPR_VFP2:$src2), | 
|  | 1001 | imm:$lane)))))]> { | 
|  | 1002 | let isCommutable = 0; | 
|  | 1003 | } | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1004 | class N3VQSL16<bits<2> op21_20, bits<4> op11_8, string OpcodeStr, string Dt, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1005 | ValueType ResTy, ValueType OpTy, SDNode ShOp> | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1006 | : N3V<1, 1, op21_20, op11_8, 1, 0, | 
|  | 1007 | (outs QPR:$dst), (ins QPR:$src1, DPR_8:$src2, nohash_imm:$lane), | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1008 | IIC_VMULi16Q, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1009 | [(set (ResTy QPR:$dst), | 
|  | 1010 | (ResTy (ShOp (ResTy QPR:$src1), | 
|  | 1011 | (ResTy (NEONvduplane (OpTy DPR_8:$src2), | 
|  | 1012 | imm:$lane)))))]> { | 
|  | 1013 | let isCommutable = 0; | 
|  | 1014 | } | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1015 |  | 
|  | 1016 | // Basic 3-register intrinsics, both double- and quad-register. | 
|  | 1017 | class N3VDInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1018 | InstrItinClass itin, string OpcodeStr, string Dt, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1019 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp, bit Commutable> | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1020 | : N3V<op24, op23, op21_20, op11_8, 0, op4, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1021 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2), itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1022 | OpcodeStr, Dt, "$dst, $src1, $src2", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1023 | [(set DPR:$dst, (ResTy (IntOp (OpTy DPR:$src1), (OpTy DPR:$src2))))]> { | 
|  | 1024 | let isCommutable = Commutable; | 
|  | 1025 | } | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1026 | class N3VDIntSL<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1027 | string OpcodeStr, string Dt, ValueType Ty, Intrinsic IntOp> | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1028 | : N3V<0, 1, op21_20, op11_8, 1, 0, | 
|  | 1029 | (outs DPR:$dst), (ins DPR:$src1, DPR_VFP2:$src2, nohash_imm:$lane), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1030 | itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1031 | [(set (Ty DPR:$dst), | 
|  | 1032 | (Ty (IntOp (Ty DPR:$src1), | 
|  | 1033 | (Ty (NEONvduplane (Ty DPR_VFP2:$src2), | 
|  | 1034 | imm:$lane)))))]> { | 
|  | 1035 | let isCommutable = 0; | 
|  | 1036 | } | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1037 | class N3VDIntSL16<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1038 | string OpcodeStr, string Dt, ValueType Ty, Intrinsic IntOp> | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1039 | : N3V<0, 1, op21_20, op11_8, 1, 0, | 
|  | 1040 | (outs DPR:$dst), (ins DPR:$src1, DPR_8:$src2, nohash_imm:$lane), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1041 | itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1042 | [(set (Ty DPR:$dst), | 
|  | 1043 | (Ty (IntOp (Ty DPR:$src1), | 
|  | 1044 | (Ty (NEONvduplane (Ty DPR_8:$src2), | 
|  | 1045 | imm:$lane)))))]> { | 
|  | 1046 | let isCommutable = 0; | 
|  | 1047 | } | 
|  | 1048 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1049 | class N3VQInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1050 | InstrItinClass itin, string OpcodeStr, string Dt, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1051 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp, bit Commutable> | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1052 | : N3V<op24, op23, op21_20, op11_8, 1, op4, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1053 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2), itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1054 | OpcodeStr, Dt, "$dst, $src1, $src2", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1055 | [(set QPR:$dst, (ResTy (IntOp (OpTy QPR:$src1), (OpTy QPR:$src2))))]> { | 
|  | 1056 | let isCommutable = Commutable; | 
|  | 1057 | } | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1058 | class N3VQIntSL<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1059 | string OpcodeStr, string Dt, | 
|  | 1060 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1061 | : N3V<1, 1, op21_20, op11_8, 1, 0, | 
|  | 1062 | (outs QPR:$dst), (ins QPR:$src1, DPR_VFP2:$src2, nohash_imm:$lane), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1063 | itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1064 | [(set (ResTy QPR:$dst), | 
|  | 1065 | (ResTy (IntOp (ResTy QPR:$src1), | 
|  | 1066 | (ResTy (NEONvduplane (OpTy DPR_VFP2:$src2), | 
|  | 1067 | imm:$lane)))))]> { | 
|  | 1068 | let isCommutable = 0; | 
|  | 1069 | } | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1070 | class N3VQIntSL16<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1071 | string OpcodeStr, string Dt, | 
|  | 1072 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1073 | : N3V<1, 1, op21_20, op11_8, 1, 0, | 
|  | 1074 | (outs QPR:$dst), (ins QPR:$src1, DPR_8:$src2, nohash_imm:$lane), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1075 | itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1076 | [(set (ResTy QPR:$dst), | 
|  | 1077 | (ResTy (IntOp (ResTy QPR:$src1), | 
|  | 1078 | (ResTy (NEONvduplane (OpTy DPR_8:$src2), | 
|  | 1079 | imm:$lane)))))]> { | 
|  | 1080 | let isCommutable = 0; | 
|  | 1081 | } | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1082 |  | 
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 1083 | // Multiply-Add/Sub operations: single-, double- and quad-register. | 
|  | 1084 | class N3VSMulOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, | 
|  | 1085 | InstrItinClass itin, string OpcodeStr, string Dt, | 
|  | 1086 | ValueType Ty, SDNode MulOp, SDNode OpNode> | 
|  | 1087 | : N3V<op24, op23, op21_20, op11_8, 0, op4, | 
|  | 1088 | (outs DPR_VFP2:$dst), | 
|  | 1089 | (ins DPR_VFP2:$src1, DPR_VFP2:$src2, DPR_VFP2:$src3), itin, | 
|  | 1090 | OpcodeStr, Dt, "$dst, $src2, $src3", "$src1 = $dst", []>; | 
|  | 1091 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1092 | class N3VDMulOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1093 | InstrItinClass itin, string OpcodeStr, string Dt, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1094 | ValueType Ty, SDNode MulOp, SDNode OpNode> | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1095 | : N3V<op24, op23, op21_20, op11_8, 0, op4, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1096 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2, DPR:$src3), itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1097 | OpcodeStr, Dt, "$dst, $src2, $src3", "$src1 = $dst", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1098 | [(set DPR:$dst, (Ty (OpNode DPR:$src1, | 
|  | 1099 | (Ty (MulOp DPR:$src2, DPR:$src3)))))]>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1100 | class N3VDMulOpSL<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1101 | string OpcodeStr, string Dt, | 
|  | 1102 | ValueType Ty, SDNode MulOp, SDNode ShOp> | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1103 | : N3V<0, 1, op21_20, op11_8, 1, 0, | 
|  | 1104 | (outs DPR:$dst), | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1105 | (ins DPR:$src1, DPR:$src2, DPR_VFP2:$src3, nohash_imm:$lane), itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1106 | OpcodeStr, Dt, "$dst, $src2, $src3[$lane]", "$src1 = $dst", | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1107 | [(set (Ty DPR:$dst), | 
|  | 1108 | (Ty (ShOp (Ty DPR:$src1), | 
|  | 1109 | (Ty (MulOp DPR:$src2, | 
|  | 1110 | (Ty (NEONvduplane (Ty DPR_VFP2:$src3), | 
| Johnny Chen | 274a0d3 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 1111 | imm:$lane)))))))]>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1112 | class N3VDMulOpSL16<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1113 | string OpcodeStr, string Dt, | 
|  | 1114 | ValueType Ty, SDNode MulOp, SDNode ShOp> | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1115 | : N3V<0, 1, op21_20, op11_8, 1, 0, | 
|  | 1116 | (outs DPR:$dst), | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1117 | (ins DPR:$src1, DPR:$src2, DPR_8:$src3, nohash_imm:$lane), itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1118 | OpcodeStr, Dt, "$dst, $src2, $src3[$lane]", "$src1 = $dst", | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1119 | [(set (Ty DPR:$dst), | 
|  | 1120 | (Ty (ShOp (Ty DPR:$src1), | 
|  | 1121 | (Ty (MulOp DPR:$src2, | 
|  | 1122 | (Ty (NEONvduplane (Ty DPR_8:$src3), | 
| Johnny Chen | 274a0d3 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 1123 | imm:$lane)))))))]>; | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1124 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1125 | class N3VQMulOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1126 | InstrItinClass itin, string OpcodeStr, string Dt, ValueType Ty, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1127 | SDNode MulOp, SDNode OpNode> | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1128 | : N3V<op24, op23, op21_20, op11_8, 1, op4, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1129 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2, QPR:$src3), itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1130 | OpcodeStr, Dt, "$dst, $src2, $src3", "$src1 = $dst", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1131 | [(set QPR:$dst, (Ty (OpNode QPR:$src1, | 
|  | 1132 | (Ty (MulOp QPR:$src2, QPR:$src3)))))]>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1133 | class N3VQMulOpSL<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1134 | string OpcodeStr, string Dt, ValueType ResTy, ValueType OpTy, | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1135 | SDNode MulOp, SDNode ShOp> | 
|  | 1136 | : N3V<1, 1, op21_20, op11_8, 1, 0, | 
|  | 1137 | (outs QPR:$dst), | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1138 | (ins QPR:$src1, QPR:$src2, DPR_VFP2:$src3, nohash_imm:$lane), itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1139 | OpcodeStr, Dt, "$dst, $src2, $src3[$lane]", "$src1 = $dst", | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1140 | [(set (ResTy QPR:$dst), | 
|  | 1141 | (ResTy (ShOp (ResTy QPR:$src1), | 
|  | 1142 | (ResTy (MulOp QPR:$src2, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1143 | (ResTy (NEONvduplane (OpTy DPR_VFP2:$src3), | 
| Johnny Chen | 274a0d3 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 1144 | imm:$lane)))))))]>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1145 | class N3VQMulOpSL16<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1146 | string OpcodeStr, string Dt, | 
|  | 1147 | ValueType ResTy, ValueType OpTy, | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1148 | SDNode MulOp, SDNode ShOp> | 
|  | 1149 | : N3V<1, 1, op21_20, op11_8, 1, 0, | 
|  | 1150 | (outs QPR:$dst), | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1151 | (ins QPR:$src1, QPR:$src2, DPR_8:$src3, nohash_imm:$lane), itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1152 | OpcodeStr, Dt, "$dst, $src2, $src3[$lane]", "$src1 = $dst", | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1153 | [(set (ResTy QPR:$dst), | 
|  | 1154 | (ResTy (ShOp (ResTy QPR:$src1), | 
|  | 1155 | (ResTy (MulOp QPR:$src2, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1156 | (ResTy (NEONvduplane (OpTy DPR_8:$src3), | 
| Johnny Chen | 274a0d3 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 1157 | imm:$lane)))))))]>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1158 |  | 
|  | 1159 | // Neon 3-argument intrinsics, both double- and quad-register. | 
|  | 1160 | // The destination register is also used as the first source operand register. | 
|  | 1161 | class N3VDInt3<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1162 | InstrItinClass itin, string OpcodeStr, string Dt, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1163 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1164 | : N3V<op24, op23, op21_20, op11_8, 0, op4, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1165 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2, DPR:$src3), itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1166 | OpcodeStr, Dt, "$dst, $src2, $src3", "$src1 = $dst", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1167 | [(set DPR:$dst, (ResTy (IntOp (OpTy DPR:$src1), | 
|  | 1168 | (OpTy DPR:$src2), (OpTy DPR:$src3))))]>; | 
|  | 1169 | class N3VQInt3<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1170 | InstrItinClass itin, string OpcodeStr, string Dt, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1171 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1172 | : N3V<op24, op23, op21_20, op11_8, 1, op4, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1173 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2, QPR:$src3), itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1174 | OpcodeStr, Dt, "$dst, $src2, $src3", "$src1 = $dst", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1175 | [(set QPR:$dst, (ResTy (IntOp (OpTy QPR:$src1), | 
|  | 1176 | (OpTy QPR:$src2), (OpTy QPR:$src3))))]>; | 
|  | 1177 |  | 
|  | 1178 | // Neon Long 3-argument intrinsic.  The destination register is | 
|  | 1179 | // a quad-register and is also used as the first source operand register. | 
|  | 1180 | class N3VLInt3<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1181 | InstrItinClass itin, string OpcodeStr, string Dt, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1182 | ValueType TyQ, ValueType TyD, Intrinsic IntOp> | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1183 | : N3V<op24, op23, op21_20, op11_8, 0, op4, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1184 | (outs QPR:$dst), (ins QPR:$src1, DPR:$src2, DPR:$src3), itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1185 | OpcodeStr, Dt, "$dst, $src2, $src3", "$src1 = $dst", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1186 | [(set QPR:$dst, | 
|  | 1187 | (TyQ (IntOp (TyQ QPR:$src1), (TyD DPR:$src2), (TyD DPR:$src3))))]>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1188 | class N3VLInt3SL<bit op24, bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1189 | string OpcodeStr, string Dt, | 
|  | 1190 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1191 | : N3V<op24, 1, op21_20, op11_8, 1, 0, | 
|  | 1192 | (outs QPR:$dst), | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1193 | (ins QPR:$src1, DPR:$src2, DPR_VFP2:$src3, nohash_imm:$lane), itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1194 | OpcodeStr, Dt, "$dst, $src2, $src3[$lane]", "$src1 = $dst", | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1195 | [(set (ResTy QPR:$dst), | 
|  | 1196 | (ResTy (IntOp (ResTy QPR:$src1), | 
|  | 1197 | (OpTy DPR:$src2), | 
|  | 1198 | (OpTy (NEONvduplane (OpTy DPR_VFP2:$src3), | 
|  | 1199 | imm:$lane)))))]>; | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1200 | class N3VLInt3SL16<bit op24, bits<2> op21_20, bits<4> op11_8, | 
|  | 1201 | InstrItinClass itin, string OpcodeStr, string Dt, | 
|  | 1202 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1203 | : N3V<op24, 1, op21_20, op11_8, 1, 0, | 
|  | 1204 | (outs QPR:$dst), | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1205 | (ins QPR:$src1, DPR:$src2, DPR_8:$src3, nohash_imm:$lane), itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1206 | OpcodeStr, Dt, "$dst, $src2, $src3[$lane]", "$src1 = $dst", | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1207 | [(set (ResTy QPR:$dst), | 
|  | 1208 | (ResTy (IntOp (ResTy QPR:$src1), | 
|  | 1209 | (OpTy DPR:$src2), | 
|  | 1210 | (OpTy (NEONvduplane (OpTy DPR_8:$src3), | 
|  | 1211 | imm:$lane)))))]>; | 
|  | 1212 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1213 | // Narrowing 3-register intrinsics. | 
|  | 1214 | class N3VNInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1215 | string OpcodeStr, string Dt, ValueType TyD, ValueType TyQ, | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1216 | Intrinsic IntOp, bit Commutable> | 
|  | 1217 | : N3V<op24, op23, op21_20, op11_8, 0, op4, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1218 | (outs DPR:$dst), (ins QPR:$src1, QPR:$src2), IIC_VBINi4D, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1219 | OpcodeStr, Dt, "$dst, $src1, $src2", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1220 | [(set DPR:$dst, (TyD (IntOp (TyQ QPR:$src1), (TyQ QPR:$src2))))]> { | 
|  | 1221 | let isCommutable = Commutable; | 
|  | 1222 | } | 
|  | 1223 |  | 
|  | 1224 | // Long 3-register intrinsics. | 
|  | 1225 | class N3VLInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1226 | InstrItinClass itin, string OpcodeStr, string Dt, | 
|  | 1227 | ValueType TyQ, ValueType TyD, Intrinsic IntOp, bit Commutable> | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1228 | : N3V<op24, op23, op21_20, op11_8, 0, op4, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1229 | (outs QPR:$dst), (ins DPR:$src1, DPR:$src2), itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1230 | OpcodeStr, Dt, "$dst, $src1, $src2", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1231 | [(set QPR:$dst, (TyQ (IntOp (TyD DPR:$src1), (TyD DPR:$src2))))]> { | 
|  | 1232 | let isCommutable = Commutable; | 
|  | 1233 | } | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1234 | class N3VLIntSL<bit op24, bits<2> op21_20, bits<4> op11_8, InstrItinClass itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1235 | string OpcodeStr, string Dt, | 
|  | 1236 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1237 | : N3V<op24, 1, op21_20, op11_8, 1, 0, | 
|  | 1238 | (outs QPR:$dst), (ins DPR:$src1, DPR_VFP2:$src2, nohash_imm:$lane), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1239 | itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1240 | [(set (ResTy QPR:$dst), | 
|  | 1241 | (ResTy (IntOp (OpTy DPR:$src1), | 
|  | 1242 | (OpTy (NEONvduplane (OpTy DPR_VFP2:$src2), | 
| Johnny Chen | 274a0d3 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 1243 | imm:$lane)))))]>; | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1244 | class N3VLIntSL16<bit op24, bits<2> op21_20, bits<4> op11_8, | 
|  | 1245 | InstrItinClass itin, string OpcodeStr, string Dt, | 
|  | 1246 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1247 | : N3V<op24, 1, op21_20, op11_8, 1, 0, | 
|  | 1248 | (outs QPR:$dst), (ins DPR:$src1, DPR_8:$src2, nohash_imm:$lane), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1249 | itin, OpcodeStr, Dt, "$dst, $src1, $src2[$lane]", "", | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1250 | [(set (ResTy QPR:$dst), | 
|  | 1251 | (ResTy (IntOp (OpTy DPR:$src1), | 
|  | 1252 | (OpTy (NEONvduplane (OpTy DPR_8:$src2), | 
| Johnny Chen | 274a0d3 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 1253 | imm:$lane)))))]>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1254 |  | 
|  | 1255 | // Wide 3-register intrinsics. | 
|  | 1256 | class N3VWInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1257 | string OpcodeStr, string Dt, ValueType TyQ, ValueType TyD, | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1258 | Intrinsic IntOp, bit Commutable> | 
|  | 1259 | : N3V<op24, op23, op21_20, op11_8, 0, op4, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1260 | (outs QPR:$dst), (ins QPR:$src1, DPR:$src2), IIC_VSUBiD, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1261 | OpcodeStr, Dt, "$dst, $src1, $src2", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1262 | [(set QPR:$dst, (TyQ (IntOp (TyQ QPR:$src1), (TyD DPR:$src2))))]> { | 
|  | 1263 | let isCommutable = Commutable; | 
|  | 1264 | } | 
|  | 1265 |  | 
|  | 1266 | // Pairwise long 2-register intrinsics, both double- and quad-register. | 
|  | 1267 | class N2VDPLInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1268 | bits<2> op17_16, bits<5> op11_7, bit op4, | 
|  | 1269 | string OpcodeStr, string Dt, | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1270 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> | 
|  | 1271 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, (outs DPR:$dst), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1272 | (ins DPR:$src), IIC_VSHLiD, OpcodeStr, Dt, "$dst, $src", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1273 | [(set DPR:$dst, (ResTy (IntOp (OpTy DPR:$src))))]>; | 
|  | 1274 | class N2VQPLInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1275 | bits<2> op17_16, bits<5> op11_7, bit op4, | 
|  | 1276 | string OpcodeStr, string Dt, | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1277 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> | 
|  | 1278 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 1, op4, (outs QPR:$dst), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1279 | (ins QPR:$src), IIC_VSHLiD, OpcodeStr, Dt, "$dst, $src", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1280 | [(set QPR:$dst, (ResTy (IntOp (OpTy QPR:$src))))]>; | 
|  | 1281 |  | 
|  | 1282 | // Pairwise long 2-register accumulate intrinsics, | 
|  | 1283 | // both double- and quad-register. | 
|  | 1284 | // The destination register is also used as the first source operand register. | 
|  | 1285 | class N2VDPLInt2<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1286 | bits<2> op17_16, bits<5> op11_7, bit op4, | 
|  | 1287 | string OpcodeStr, string Dt, | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1288 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> | 
|  | 1289 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1290 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2), IIC_VPALiD, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1291 | OpcodeStr, Dt, "$dst, $src2", "$src1 = $dst", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1292 | [(set DPR:$dst, (ResTy (IntOp (ResTy DPR:$src1), (OpTy DPR:$src2))))]>; | 
|  | 1293 | class N2VQPLInt2<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1294 | bits<2> op17_16, bits<5> op11_7, bit op4, | 
|  | 1295 | string OpcodeStr, string Dt, | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1296 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp> | 
|  | 1297 | : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 1, op4, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1298 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2), IIC_VPALiQ, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1299 | OpcodeStr, Dt, "$dst, $src2", "$src1 = $dst", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1300 | [(set QPR:$dst, (ResTy (IntOp (ResTy QPR:$src1), (OpTy QPR:$src2))))]>; | 
|  | 1301 |  | 
|  | 1302 | // Shift by immediate, | 
|  | 1303 | // both double- and quad-register. | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1304 | class N2VDSh<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1305 | Format f, InstrItinClass itin, string OpcodeStr, string Dt, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1306 | ValueType Ty, SDNode OpNode> | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1307 | : N2VImm<op24, op23, op11_8, op7, 0, op4, | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1308 | (outs DPR:$dst), (ins DPR:$src, i32imm:$SIMM), f, itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1309 | OpcodeStr, Dt, "$dst, $src, $SIMM", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1310 | [(set DPR:$dst, (Ty (OpNode (Ty DPR:$src), (i32 imm:$SIMM))))]>; | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1311 | class N2VQSh<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1312 | Format f, InstrItinClass itin, string OpcodeStr, string Dt, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1313 | ValueType Ty, SDNode OpNode> | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1314 | : N2VImm<op24, op23, op11_8, op7, 1, op4, | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1315 | (outs QPR:$dst), (ins QPR:$src, i32imm:$SIMM), f, itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1316 | OpcodeStr, Dt, "$dst, $src, $SIMM", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1317 | [(set QPR:$dst, (Ty (OpNode (Ty QPR:$src), (i32 imm:$SIMM))))]>; | 
|  | 1318 |  | 
| Johnny Chen | 274a0d3 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 1319 | // Long shift by immediate. | 
|  | 1320 | class N2VLSh<bit op24, bit op23, bits<4> op11_8, bit op7, bit op6, bit op4, | 
|  | 1321 | string OpcodeStr, string Dt, | 
|  | 1322 | ValueType ResTy, ValueType OpTy, SDNode OpNode> | 
|  | 1323 | : N2VImm<op24, op23, op11_8, op7, op6, op4, | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1324 | (outs QPR:$dst), (ins DPR:$src, i32imm:$SIMM), N2RegVShLFrm, | 
| Johnny Chen | d82f900 | 2010-03-25 20:39:04 +0000 | [diff] [blame] | 1325 | IIC_VSHLiD, OpcodeStr, Dt, "$dst, $src, $SIMM", "", | 
| Johnny Chen | 274a0d3 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 1326 | [(set QPR:$dst, (ResTy (OpNode (OpTy DPR:$src), | 
|  | 1327 | (i32 imm:$SIMM))))]>; | 
|  | 1328 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1329 | // Narrow shift by immediate. | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1330 | class N2VNSh<bit op24, bit op23, bits<4> op11_8, bit op7, bit op6, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1331 | InstrItinClass itin, string OpcodeStr, string Dt, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1332 | ValueType ResTy, ValueType OpTy, SDNode OpNode> | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1333 | : N2VImm<op24, op23, op11_8, op7, op6, op4, | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1334 | (outs DPR:$dst), (ins QPR:$src, i32imm:$SIMM), N2RegVShRFrm, itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1335 | OpcodeStr, Dt, "$dst, $src, $SIMM", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1336 | [(set DPR:$dst, (ResTy (OpNode (OpTy QPR:$src), | 
|  | 1337 | (i32 imm:$SIMM))))]>; | 
|  | 1338 |  | 
|  | 1339 | // Shift right by immediate and accumulate, | 
|  | 1340 | // both double- and quad-register. | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1341 | class N2VDShAdd<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1342 | string OpcodeStr, string Dt, ValueType Ty, SDNode ShOp> | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1343 | : N2VImm<op24, op23, op11_8, op7, 0, op4, (outs DPR:$dst), | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1344 | (ins DPR:$src1, DPR:$src2, i32imm:$SIMM), N2RegVShRFrm, IIC_VPALiD, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1345 | OpcodeStr, Dt, "$dst, $src2, $SIMM", "$src1 = $dst", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1346 | [(set DPR:$dst, (Ty (add DPR:$src1, | 
|  | 1347 | (Ty (ShOp DPR:$src2, (i32 imm:$SIMM))))))]>; | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1348 | class N2VQShAdd<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1349 | string OpcodeStr, string Dt, ValueType Ty, SDNode ShOp> | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1350 | : N2VImm<op24, op23, op11_8, op7, 1, op4, (outs QPR:$dst), | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1351 | (ins QPR:$src1, QPR:$src2, i32imm:$SIMM), N2RegVShRFrm, IIC_VPALiD, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1352 | OpcodeStr, Dt, "$dst, $src2, $SIMM", "$src1 = $dst", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1353 | [(set QPR:$dst, (Ty (add QPR:$src1, | 
|  | 1354 | (Ty (ShOp QPR:$src2, (i32 imm:$SIMM))))))]>; | 
|  | 1355 |  | 
|  | 1356 | // Shift by immediate and insert, | 
|  | 1357 | // both double- and quad-register. | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1358 | class N2VDShIns<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1359 | Format f, string OpcodeStr, string Dt, ValueType Ty,SDNode ShOp> | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1360 | : N2VImm<op24, op23, op11_8, op7, 0, op4, (outs DPR:$dst), | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1361 | (ins DPR:$src1, DPR:$src2, i32imm:$SIMM), f, IIC_VSHLiD, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1362 | OpcodeStr, Dt, "$dst, $src2, $SIMM", "$src1 = $dst", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1363 | [(set DPR:$dst, (Ty (ShOp DPR:$src1, DPR:$src2, (i32 imm:$SIMM))))]>; | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1364 | class N2VQShIns<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1365 | Format f, string OpcodeStr, string Dt, ValueType Ty,SDNode ShOp> | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1366 | : N2VImm<op24, op23, op11_8, op7, 1, op4, (outs QPR:$dst), | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1367 | (ins QPR:$src1, QPR:$src2, i32imm:$SIMM), f, IIC_VSHLiQ, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1368 | OpcodeStr, Dt, "$dst, $src2, $SIMM", "$src1 = $dst", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1369 | [(set QPR:$dst, (Ty (ShOp QPR:$src1, QPR:$src2, (i32 imm:$SIMM))))]>; | 
|  | 1370 |  | 
|  | 1371 | // Convert, with fractional bits immediate, | 
|  | 1372 | // both double- and quad-register. | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1373 | class N2VCvtD<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1374 | string OpcodeStr, string Dt, ValueType ResTy, ValueType OpTy, | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1375 | Intrinsic IntOp> | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1376 | : N2VImm<op24, op23, op11_8, op7, 0, op4, | 
| Johnny Chen | d82f900 | 2010-03-25 20:39:04 +0000 | [diff] [blame] | 1377 | (outs DPR:$dst), (ins DPR:$src, i32imm:$SIMM), NVCVTFrm, | 
|  | 1378 | IIC_VUNAD, OpcodeStr, Dt, "$dst, $src, $SIMM", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1379 | [(set DPR:$dst, (ResTy (IntOp (OpTy DPR:$src), (i32 imm:$SIMM))))]>; | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1380 | class N2VCvtQ<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1381 | string OpcodeStr, string Dt, ValueType ResTy, ValueType OpTy, | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1382 | Intrinsic IntOp> | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1383 | : N2VImm<op24, op23, op11_8, op7, 1, op4, | 
| Johnny Chen | d82f900 | 2010-03-25 20:39:04 +0000 | [diff] [blame] | 1384 | (outs QPR:$dst), (ins QPR:$src, i32imm:$SIMM), NVCVTFrm, | 
|  | 1385 | IIC_VUNAQ, OpcodeStr, Dt, "$dst, $src, $SIMM", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1386 | [(set QPR:$dst, (ResTy (IntOp (OpTy QPR:$src), (i32 imm:$SIMM))))]>; | 
|  | 1387 |  | 
|  | 1388 | //===----------------------------------------------------------------------===// | 
|  | 1389 | // Multiclasses | 
|  | 1390 | //===----------------------------------------------------------------------===// | 
|  | 1391 |  | 
| Bob Wilson | d76b9b7 | 2009-10-03 04:44:16 +0000 | [diff] [blame] | 1392 | // Abbreviations used in multiclass suffixes: | 
|  | 1393 | //   Q = quarter int (8 bit) elements | 
|  | 1394 | //   H = half int (16 bit) elements | 
|  | 1395 | //   S = single int (32 bit) elements | 
|  | 1396 | //   D = double int (64 bit) elements | 
|  | 1397 |  | 
| Johnny Chen | 886915e | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 1398 | // Neon 2-register vector operations -- for disassembly only. | 
|  | 1399 |  | 
|  | 1400 | // First with only element sizes of 8, 16 and 32 bits: | 
| Johnny Chen | 21dbd6f | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 1401 | multiclass N2V_QHS_cmp<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16, | 
|  | 1402 | bits<5> op11_7, bit op4, string opc, string Dt, | 
|  | 1403 | string asm> { | 
| Johnny Chen | 886915e | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 1404 | // 64-bit vector types. | 
|  | 1405 | def v8i8  : N2V<op24_23, op21_20, 0b00, op17_16, op11_7, 0, op4, | 
|  | 1406 | (outs DPR:$dst), (ins DPR:$src), NoItinerary, | 
| Johnny Chen | 21dbd6f | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 1407 | opc, !strconcat(Dt, "8"), asm, "", []>; | 
| Johnny Chen | 886915e | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 1408 | def v4i16 : N2V<op24_23, op21_20, 0b01, op17_16, op11_7, 0, op4, | 
|  | 1409 | (outs DPR:$dst), (ins DPR:$src), NoItinerary, | 
| Johnny Chen | 21dbd6f | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 1410 | opc, !strconcat(Dt, "16"), asm, "", []>; | 
| Johnny Chen | 886915e | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 1411 | def v2i32 : N2V<op24_23, op21_20, 0b10, op17_16, op11_7, 0, op4, | 
|  | 1412 | (outs DPR:$dst), (ins DPR:$src), NoItinerary, | 
| Johnny Chen | 21dbd6f | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 1413 | opc, !strconcat(Dt, "32"), asm, "", []>; | 
| Johnny Chen | 886915e | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 1414 | def v2f32 : N2V<op24_23, op21_20, 0b10, op17_16, op11_7, 0, op4, | 
|  | 1415 | (outs DPR:$dst), (ins DPR:$src), NoItinerary, | 
|  | 1416 | opc, "f32", asm, "", []> { | 
|  | 1417 | let Inst{10} = 1; // overwrite F = 1 | 
|  | 1418 | } | 
|  | 1419 |  | 
|  | 1420 | // 128-bit vector types. | 
|  | 1421 | def v16i8 : N2V<op24_23, op21_20, 0b00, op17_16, op11_7, 1, op4, | 
|  | 1422 | (outs QPR:$dst), (ins QPR:$src), NoItinerary, | 
| Johnny Chen | 21dbd6f | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 1423 | opc, !strconcat(Dt, "8"), asm, "", []>; | 
| Johnny Chen | 886915e | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 1424 | def v8i16 : N2V<op24_23, op21_20, 0b01, op17_16, op11_7, 1, op4, | 
|  | 1425 | (outs QPR:$dst), (ins QPR:$src), NoItinerary, | 
| Johnny Chen | 21dbd6f | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 1426 | opc, !strconcat(Dt, "16"), asm, "", []>; | 
| Johnny Chen | 886915e | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 1427 | def v4i32 : N2V<op24_23, op21_20, 0b10, op17_16, op11_7, 1, op4, | 
|  | 1428 | (outs QPR:$dst), (ins QPR:$src), NoItinerary, | 
| Johnny Chen | 21dbd6f | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 1429 | opc, !strconcat(Dt, "32"), asm, "", []>; | 
| Johnny Chen | 886915e | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 1430 | def v4f32 : N2V<op24_23, op21_20, 0b10, op17_16, op11_7, 1, op4, | 
|  | 1431 | (outs QPR:$dst), (ins QPR:$src), NoItinerary, | 
|  | 1432 | opc, "f32", asm, "", []> { | 
|  | 1433 | let Inst{10} = 1; // overwrite F = 1 | 
|  | 1434 | } | 
|  | 1435 | } | 
|  | 1436 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1437 | // Neon 3-register vector operations. | 
|  | 1438 |  | 
|  | 1439 | // First with only element sizes of 8, 16 and 32 bits: | 
|  | 1440 | multiclass N3V_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1441 | InstrItinClass itinD16, InstrItinClass itinD32, | 
|  | 1442 | InstrItinClass itinQ16, InstrItinClass itinQ32, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1443 | string OpcodeStr, string Dt, | 
|  | 1444 | SDNode OpNode, bit Commutable = 0> { | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1445 | // 64-bit vector types. | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1446 | def v8i8  : N3VD<op24, op23, 0b00, op11_8, op4, itinD16, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1447 | OpcodeStr, !strconcat(Dt, "8"), | 
|  | 1448 | v8i8, v8i8, OpNode, Commutable>; | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1449 | def v4i16 : N3VD<op24, op23, 0b01, op11_8, op4, itinD16, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1450 | OpcodeStr, !strconcat(Dt, "16"), | 
|  | 1451 | v4i16, v4i16, OpNode, Commutable>; | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1452 | def v2i32 : N3VD<op24, op23, 0b10, op11_8, op4, itinD32, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1453 | OpcodeStr, !strconcat(Dt, "32"), | 
|  | 1454 | v2i32, v2i32, OpNode, Commutable>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1455 |  | 
|  | 1456 | // 128-bit vector types. | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1457 | def v16i8 : N3VQ<op24, op23, 0b00, op11_8, op4, itinQ16, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1458 | OpcodeStr, !strconcat(Dt, "8"), | 
|  | 1459 | v16i8, v16i8, OpNode, Commutable>; | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1460 | def v8i16 : N3VQ<op24, op23, 0b01, op11_8, op4, itinQ16, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1461 | OpcodeStr, !strconcat(Dt, "16"), | 
|  | 1462 | v8i16, v8i16, OpNode, Commutable>; | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1463 | def v4i32 : N3VQ<op24, op23, 0b10, op11_8, op4, itinQ32, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1464 | OpcodeStr, !strconcat(Dt, "32"), | 
|  | 1465 | v4i32, v4i32, OpNode, Commutable>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1466 | } | 
|  | 1467 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1468 | multiclass N3VSL_HS<bits<4> op11_8, string OpcodeStr, string Dt, SDNode ShOp> { | 
|  | 1469 | def v4i16 : N3VDSL16<0b01, op11_8, OpcodeStr, !strconcat(Dt, "16"), | 
|  | 1470 | v4i16, ShOp>; | 
|  | 1471 | def v2i32 : N3VDSL<0b10, op11_8, IIC_VMULi32D, OpcodeStr, !strconcat(Dt,"32"), | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1472 | v2i32, ShOp>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1473 | def v8i16 : N3VQSL16<0b01, op11_8, OpcodeStr, !strconcat(Dt, "16"), | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1474 | v8i16, v4i16, ShOp>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1475 | def v4i32 : N3VQSL<0b10, op11_8, IIC_VMULi32Q, OpcodeStr, !strconcat(Dt,"32"), | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1476 | v4i32, v2i32, ShOp>; | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1477 | } | 
|  | 1478 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1479 | // ....then also with element size 64 bits: | 
|  | 1480 | multiclass N3V_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1481 | InstrItinClass itinD, InstrItinClass itinQ, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1482 | string OpcodeStr, string Dt, | 
|  | 1483 | SDNode OpNode, bit Commutable = 0> | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1484 | : N3V_QHS<op24, op23, op11_8, op4, itinD, itinD, itinQ, itinQ, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1485 | OpcodeStr, Dt, OpNode, Commutable> { | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1486 | def v1i64 : N3VD<op24, op23, 0b11, op11_8, op4, itinD, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1487 | OpcodeStr, !strconcat(Dt, "64"), | 
|  | 1488 | v1i64, v1i64, OpNode, Commutable>; | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1489 | def v2i64 : N3VQ<op24, op23, 0b11, op11_8, op4, itinQ, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1490 | OpcodeStr, !strconcat(Dt, "64"), | 
|  | 1491 | v2i64, v2i64, OpNode, Commutable>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1492 | } | 
|  | 1493 |  | 
|  | 1494 |  | 
|  | 1495 | // Neon Narrowing 2-register vector intrinsics, | 
|  | 1496 | //   source operand element sizes of 16, 32 and 64 bits: | 
|  | 1497 | multiclass N2VNInt_HSD<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16, | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1498 | bits<5> op11_7, bit op6, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1499 | InstrItinClass itin, string OpcodeStr, string Dt, | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1500 | Intrinsic IntOp> { | 
|  | 1501 | def v8i8  : N2VNInt<op24_23, op21_20, 0b00, op17_16, op11_7, op6, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1502 | itin, OpcodeStr, !strconcat(Dt, "16"), | 
|  | 1503 | v8i8, v8i16, IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1504 | def v4i16 : N2VNInt<op24_23, op21_20, 0b01, op17_16, op11_7, op6, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1505 | itin, OpcodeStr, !strconcat(Dt, "32"), | 
|  | 1506 | v4i16, v4i32, IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1507 | def v2i32 : N2VNInt<op24_23, op21_20, 0b10, op17_16, op11_7, op6, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1508 | itin, OpcodeStr, !strconcat(Dt, "64"), | 
|  | 1509 | v2i32, v2i64, IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1510 | } | 
|  | 1511 |  | 
|  | 1512 |  | 
|  | 1513 | // Neon Lengthening 2-register vector intrinsic (currently specific to VMOVL). | 
|  | 1514 | //   source operand element sizes of 16, 32 and 64 bits: | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1515 | multiclass N2VLInt_QHS<bits<2> op24_23, bits<5> op11_7, bit op6, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1516 | string OpcodeStr, string Dt, Intrinsic IntOp> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1517 | def v8i16 : N2VLInt<op24_23, 0b00, 0b10, 0b00, op11_7, op6, op4, IIC_VQUNAiD, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1518 | OpcodeStr, !strconcat(Dt, "8"), v8i16, v8i8, IntOp>; | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1519 | def v4i32 : N2VLInt<op24_23, 0b01, 0b00, 0b00, op11_7, op6, op4, IIC_VQUNAiD, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1520 | OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, IntOp>; | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1521 | def v2i64 : N2VLInt<op24_23, 0b10, 0b00, 0b00, op11_7, op6, op4, IIC_VQUNAiD, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1522 | OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1523 | } | 
|  | 1524 |  | 
|  | 1525 |  | 
|  | 1526 | // Neon 3-register vector intrinsics. | 
|  | 1527 |  | 
|  | 1528 | // First with only element sizes of 16 and 32 bits: | 
|  | 1529 | multiclass N3VInt_HS<bit op24, bit op23, bits<4> op11_8, bit op4, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1530 | InstrItinClass itinD16, InstrItinClass itinD32, | 
|  | 1531 | InstrItinClass itinQ16, InstrItinClass itinQ32, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1532 | string OpcodeStr, string Dt, | 
|  | 1533 | Intrinsic IntOp, bit Commutable = 0> { | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1534 | // 64-bit vector types. | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1535 | def v4i16 : N3VDInt<op24, op23, 0b01, op11_8, op4, itinD16, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1536 | OpcodeStr, !strconcat(Dt, "16"), | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1537 | v4i16, v4i16, IntOp, Commutable>; | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1538 | def v2i32 : N3VDInt<op24, op23, 0b10, op11_8, op4, itinD32, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1539 | OpcodeStr, !strconcat(Dt, "32"), | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1540 | v2i32, v2i32, IntOp, Commutable>; | 
|  | 1541 |  | 
|  | 1542 | // 128-bit vector types. | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1543 | def v8i16 : N3VQInt<op24, op23, 0b01, op11_8, op4, itinQ16, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1544 | OpcodeStr, !strconcat(Dt, "16"), | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1545 | v8i16, v8i16, IntOp, Commutable>; | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1546 | def v4i32 : N3VQInt<op24, op23, 0b10, op11_8, op4, itinQ32, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1547 | OpcodeStr, !strconcat(Dt, "32"), | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1548 | v4i32, v4i32, IntOp, Commutable>; | 
|  | 1549 | } | 
|  | 1550 |  | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1551 | multiclass N3VIntSL_HS<bits<4> op11_8, | 
|  | 1552 | InstrItinClass itinD16, InstrItinClass itinD32, | 
|  | 1553 | InstrItinClass itinQ16, InstrItinClass itinQ32, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1554 | string OpcodeStr, string Dt, Intrinsic IntOp> { | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1555 | def v4i16 : N3VDIntSL16<0b01, op11_8, itinD16, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1556 | OpcodeStr, !strconcat(Dt, "16"), v4i16, IntOp>; | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1557 | def v2i32 : N3VDIntSL<0b10, op11_8, itinD32, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1558 | OpcodeStr, !strconcat(Dt, "32"), v2i32, IntOp>; | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1559 | def v8i16 : N3VQIntSL16<0b01, op11_8, itinQ16, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1560 | OpcodeStr, !strconcat(Dt, "16"), v8i16, v4i16, IntOp>; | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 1561 | def v4i32 : N3VQIntSL<0b10, op11_8, itinQ32, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1562 | OpcodeStr, !strconcat(Dt, "32"), v4i32, v2i32, IntOp>; | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1563 | } | 
|  | 1564 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1565 | // ....then also with element size of 8 bits: | 
|  | 1566 | multiclass N3VInt_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1567 | InstrItinClass itinD16, InstrItinClass itinD32, | 
|  | 1568 | InstrItinClass itinQ16, InstrItinClass itinQ32, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1569 | string OpcodeStr, string Dt, | 
|  | 1570 | Intrinsic IntOp, bit Commutable = 0> | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1571 | : N3VInt_HS<op24, op23, op11_8, op4, itinD16, itinD32, itinQ16, itinQ32, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1572 | OpcodeStr, Dt, IntOp, Commutable> { | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1573 | def v8i8  : N3VDInt<op24, op23, 0b00, op11_8, op4, itinD16, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1574 | OpcodeStr, !strconcat(Dt, "8"), | 
|  | 1575 | v8i8, v8i8, IntOp, Commutable>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1576 | def v16i8 : N3VQInt<op24, op23, 0b00, op11_8, op4, itinQ16, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1577 | OpcodeStr, !strconcat(Dt, "8"), | 
|  | 1578 | v16i8, v16i8, IntOp, Commutable>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1579 | } | 
|  | 1580 |  | 
|  | 1581 | // ....then also with element size of 64 bits: | 
|  | 1582 | multiclass N3VInt_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1583 | InstrItinClass itinD16, InstrItinClass itinD32, | 
|  | 1584 | InstrItinClass itinQ16, InstrItinClass itinQ32, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1585 | string OpcodeStr, string Dt, | 
|  | 1586 | Intrinsic IntOp, bit Commutable = 0> | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1587 | : N3VInt_QHS<op24, op23, op11_8, op4, itinD16, itinD32, itinQ16, itinQ32, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1588 | OpcodeStr, Dt, IntOp, Commutable> { | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1589 | def v1i64 : N3VDInt<op24, op23, 0b11, op11_8, op4, itinD32, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1590 | OpcodeStr, !strconcat(Dt, "64"), | 
|  | 1591 | v1i64, v1i64, IntOp, Commutable>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1592 | def v2i64 : N3VQInt<op24, op23, 0b11, op11_8, op4, itinQ32, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1593 | OpcodeStr, !strconcat(Dt, "64"), | 
|  | 1594 | v2i64, v2i64, IntOp, Commutable>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1595 | } | 
|  | 1596 |  | 
| Johnny Chen | 2cf0495 | 2010-03-26 21:26:28 +0000 | [diff] [blame^] | 1597 | // N3VSh_QHSD is similar to N3VInt_QHSD, except that it is for 3-Register Vector | 
|  | 1598 | // Shift Instructions (N3RegVShFrm), which do not follow the N3RegFrm's operand | 
|  | 1599 | // order of D:Vd N:Vn M:Vm. | 
|  | 1600 | // | 
|  | 1601 | // The operand order of N3RegVShFrm is D:Vd M:Vm N:Vn (notice that M:Vm is the | 
|  | 1602 | // first src operand). | 
|  | 1603 | class N3VDSh<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, | 
|  | 1604 | InstrItinClass itin, string OpcodeStr, string Dt, | 
|  | 1605 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp, bit Commutable> | 
|  | 1606 | : N3Vf<op24, op23, op21_20, op11_8, 0, op4, | 
|  | 1607 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2), N3RegVShFrm, | 
|  | 1608 | itin, OpcodeStr, Dt, "$dst, $src1, $src2", "", | 
|  | 1609 | [(set DPR:$dst, (ResTy (IntOp (OpTy DPR:$src1), (OpTy DPR:$src2))))]> { | 
|  | 1610 | let isCommutable = Commutable; | 
|  | 1611 | } | 
|  | 1612 | class N3VQSh<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4, | 
|  | 1613 | InstrItinClass itin, string OpcodeStr, string Dt, | 
|  | 1614 | ValueType ResTy, ValueType OpTy, Intrinsic IntOp, bit Commutable> | 
|  | 1615 | : N3Vf<op24, op23, op21_20, op11_8, 1, op4, | 
|  | 1616 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2), N3RegVShFrm, | 
|  | 1617 | itin, OpcodeStr, Dt, "$dst, $src1, $src2", "", | 
|  | 1618 | [(set QPR:$dst, (ResTy (IntOp (OpTy QPR:$src1), (OpTy QPR:$src2))))]> { | 
|  | 1619 | let isCommutable = Commutable; | 
|  | 1620 | } | 
|  | 1621 | multiclass N3VSh_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, | 
|  | 1622 | InstrItinClass itinD16, InstrItinClass itinD32, | 
|  | 1623 | InstrItinClass itinQ16, InstrItinClass itinQ32, | 
|  | 1624 | string OpcodeStr, string Dt, | 
|  | 1625 | Intrinsic IntOp, bit Commutable> { | 
|  | 1626 | def v4i16 : N3VDSh<op24, op23, 0b01, op11_8, op4, itinD16, | 
|  | 1627 | OpcodeStr, !strconcat(Dt, "16"), | 
|  | 1628 | v4i16, v4i16, IntOp, Commutable>; | 
|  | 1629 | def v2i32 : N3VDSh<op24, op23, 0b10, op11_8, op4, itinD32, | 
|  | 1630 | OpcodeStr, !strconcat(Dt, "32"), | 
|  | 1631 | v2i32, v2i32, IntOp, Commutable>; | 
|  | 1632 | def v8i16 : N3VQSh<op24, op23, 0b01, op11_8, op4, itinQ16, | 
|  | 1633 | OpcodeStr, !strconcat(Dt, "16"), | 
|  | 1634 | v8i16, v8i16, IntOp, Commutable>; | 
|  | 1635 | def v4i32 : N3VQSh<op24, op23, 0b10, op11_8, op4, itinQ32, | 
|  | 1636 | OpcodeStr, !strconcat(Dt, "32"), | 
|  | 1637 | v4i32, v4i32, IntOp, Commutable>; | 
|  | 1638 | def v8i8  : N3VDSh<op24, op23, 0b00, op11_8, op4, itinD16, | 
|  | 1639 | OpcodeStr, !strconcat(Dt, "8"), | 
|  | 1640 | v8i8, v8i8, IntOp, Commutable>; | 
|  | 1641 | def v16i8 : N3VQSh<op24, op23, 0b00, op11_8, op4, itinQ16, | 
|  | 1642 | OpcodeStr, !strconcat(Dt, "8"), | 
|  | 1643 | v16i8, v16i8, IntOp, Commutable>; | 
|  | 1644 | def v1i64 : N3VDSh<op24, op23, 0b11, op11_8, op4, | 
|  | 1645 | itinD32, OpcodeStr, !strconcat(Dt, "64"), | 
|  | 1646 | v1i64, v1i64, IntOp, Commutable>; | 
|  | 1647 | def v2i64 : N3VQSh<op24, op23, 0b11, op11_8, op4, | 
|  | 1648 | itinQ32, OpcodeStr, !strconcat(Dt, "64"), | 
|  | 1649 | v2i64, v2i64, IntOp, Commutable>; | 
|  | 1650 | } | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1651 |  | 
|  | 1652 | // Neon Narrowing 3-register vector intrinsics, | 
|  | 1653 | //   source operand element sizes of 16, 32 and 64 bits: | 
|  | 1654 | multiclass N3VNInt_HSD<bit op24, bit op23, bits<4> op11_8, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1655 | string OpcodeStr, string Dt, | 
|  | 1656 | Intrinsic IntOp, bit Commutable = 0> { | 
|  | 1657 | def v8i8  : N3VNInt<op24, op23, 0b00, op11_8, op4, | 
|  | 1658 | OpcodeStr, !strconcat(Dt, "16"), | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1659 | v8i8, v8i16, IntOp, Commutable>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1660 | def v4i16 : N3VNInt<op24, op23, 0b01, op11_8, op4, | 
|  | 1661 | OpcodeStr, !strconcat(Dt, "32"), | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1662 | v4i16, v4i32, IntOp, Commutable>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1663 | def v2i32 : N3VNInt<op24, op23, 0b10, op11_8, op4, | 
|  | 1664 | OpcodeStr, !strconcat(Dt, "64"), | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1665 | v2i32, v2i64, IntOp, Commutable>; | 
|  | 1666 | } | 
|  | 1667 |  | 
|  | 1668 |  | 
|  | 1669 | // Neon Long 3-register vector intrinsics. | 
|  | 1670 |  | 
|  | 1671 | // First with only element sizes of 16 and 32 bits: | 
|  | 1672 | multiclass N3VLInt_HS<bit op24, bit op23, bits<4> op11_8, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1673 | InstrItinClass itin, string OpcodeStr, string Dt, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1674 | Intrinsic IntOp, bit Commutable = 0> { | 
|  | 1675 | def v4i32 : N3VLInt<op24, op23, 0b01, op11_8, op4, itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1676 | OpcodeStr, !strconcat(Dt, "16"), | 
|  | 1677 | v4i32, v4i16, IntOp, Commutable>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1678 | def v2i64 : N3VLInt<op24, op23, 0b10, op11_8, op4, itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1679 | OpcodeStr, !strconcat(Dt, "32"), | 
|  | 1680 | v2i64, v2i32, IntOp, Commutable>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1681 | } | 
|  | 1682 |  | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1683 | multiclass N3VLIntSL_HS<bit op24, bits<4> op11_8, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1684 | InstrItinClass itin, string OpcodeStr, string Dt, | 
|  | 1685 | Intrinsic IntOp> { | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1686 | def v4i16 : N3VLIntSL16<op24, 0b01, op11_8, itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1687 | OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, IntOp>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1688 | def v2i32 : N3VLIntSL<op24, 0b10, op11_8, itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1689 | OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, IntOp>; | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1690 | } | 
|  | 1691 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1692 | // ....then also with element size of 8 bits: | 
|  | 1693 | multiclass N3VLInt_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1694 | InstrItinClass itin, string OpcodeStr, string Dt, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1695 | Intrinsic IntOp, bit Commutable = 0> | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1696 | : N3VLInt_HS<op24, op23, op11_8, op4, itin, OpcodeStr, Dt, | 
|  | 1697 | IntOp, Commutable> { | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1698 | def v8i16 : N3VLInt<op24, op23, 0b00, op11_8, op4, itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1699 | OpcodeStr, !strconcat(Dt, "8"), | 
|  | 1700 | v8i16, v8i8, IntOp, Commutable>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1701 | } | 
|  | 1702 |  | 
|  | 1703 |  | 
|  | 1704 | // Neon Wide 3-register vector intrinsics, | 
|  | 1705 | //   source operand element sizes of 8, 16 and 32 bits: | 
|  | 1706 | multiclass N3VWInt_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1707 | string OpcodeStr, string Dt, | 
|  | 1708 | Intrinsic IntOp, bit Commutable = 0> { | 
|  | 1709 | def v8i16 : N3VWInt<op24, op23, 0b00, op11_8, op4, | 
|  | 1710 | OpcodeStr, !strconcat(Dt, "8"), | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1711 | v8i16, v8i8, IntOp, Commutable>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1712 | def v4i32 : N3VWInt<op24, op23, 0b01, op11_8, op4, | 
|  | 1713 | OpcodeStr, !strconcat(Dt, "16"), | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1714 | v4i32, v4i16, IntOp, Commutable>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1715 | def v2i64 : N3VWInt<op24, op23, 0b10, op11_8, op4, | 
|  | 1716 | OpcodeStr, !strconcat(Dt, "32"), | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1717 | v2i64, v2i32, IntOp, Commutable>; | 
|  | 1718 | } | 
|  | 1719 |  | 
|  | 1720 |  | 
|  | 1721 | // Neon Multiply-Op vector operations, | 
|  | 1722 | //   element sizes of 8, 16 and 32 bits: | 
|  | 1723 | multiclass N3VMulOp_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1724 | InstrItinClass itinD16, InstrItinClass itinD32, | 
|  | 1725 | InstrItinClass itinQ16, InstrItinClass itinQ32, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1726 | string OpcodeStr, string Dt, SDNode OpNode> { | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1727 | // 64-bit vector types. | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1728 | def v8i8  : N3VDMulOp<op24, op23, 0b00, op11_8, op4, itinD16, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1729 | OpcodeStr, !strconcat(Dt, "8"), v8i8, mul, OpNode>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1730 | def v4i16 : N3VDMulOp<op24, op23, 0b01, op11_8, op4, itinD16, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1731 | OpcodeStr, !strconcat(Dt, "16"), v4i16, mul, OpNode>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1732 | def v2i32 : N3VDMulOp<op24, op23, 0b10, op11_8, op4, itinD32, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1733 | OpcodeStr, !strconcat(Dt, "32"), v2i32, mul, OpNode>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1734 |  | 
|  | 1735 | // 128-bit vector types. | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1736 | def v16i8 : N3VQMulOp<op24, op23, 0b00, op11_8, op4, itinQ16, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1737 | OpcodeStr, !strconcat(Dt, "8"), v16i8, mul, OpNode>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1738 | def v8i16 : N3VQMulOp<op24, op23, 0b01, op11_8, op4, itinQ16, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1739 | OpcodeStr, !strconcat(Dt, "16"), v8i16, mul, OpNode>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1740 | def v4i32 : N3VQMulOp<op24, op23, 0b10, op11_8, op4, itinQ32, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1741 | OpcodeStr, !strconcat(Dt, "32"), v4i32, mul, OpNode>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1742 | } | 
|  | 1743 |  | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1744 | multiclass N3VMulOpSL_HS<bits<4> op11_8, | 
|  | 1745 | InstrItinClass itinD16, InstrItinClass itinD32, | 
|  | 1746 | InstrItinClass itinQ16, InstrItinClass itinQ32, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1747 | string OpcodeStr, string Dt, SDNode ShOp> { | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1748 | def v4i16 : N3VDMulOpSL16<0b01, op11_8, itinD16, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1749 | OpcodeStr, !strconcat(Dt, "16"), v4i16, mul, ShOp>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1750 | def v2i32 : N3VDMulOpSL<0b10, op11_8, itinD32, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1751 | OpcodeStr, !strconcat(Dt, "32"), v2i32, mul, ShOp>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1752 | def v8i16 : N3VQMulOpSL16<0b01, op11_8, itinQ16, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1753 | OpcodeStr, !strconcat(Dt, "16"), v8i16, v4i16, | 
|  | 1754 | mul, ShOp>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1755 | def v4i32 : N3VQMulOpSL<0b10, op11_8, itinQ32, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1756 | OpcodeStr, !strconcat(Dt, "32"), v4i32, v2i32, | 
|  | 1757 | mul, ShOp>; | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1758 | } | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1759 |  | 
|  | 1760 | // Neon 3-argument intrinsics, | 
|  | 1761 | //   element sizes of 8, 16 and 32 bits: | 
|  | 1762 | multiclass N3VInt3_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1763 | string OpcodeStr, string Dt, Intrinsic IntOp> { | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1764 | // 64-bit vector types. | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1765 | def v8i8  : N3VDInt3<op24, op23, 0b00, op11_8, op4, IIC_VMACi16D, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1766 | OpcodeStr, !strconcat(Dt, "8"), v8i8, v8i8, IntOp>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1767 | def v4i16 : N3VDInt3<op24, op23, 0b01, op11_8, op4, IIC_VMACi16D, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1768 | OpcodeStr, !strconcat(Dt, "16"), v4i16, v4i16, IntOp>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1769 | def v2i32 : N3VDInt3<op24, op23, 0b10, op11_8, op4, IIC_VMACi32D, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1770 | OpcodeStr, !strconcat(Dt, "32"), v2i32, v2i32, IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1771 |  | 
|  | 1772 | // 128-bit vector types. | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1773 | def v16i8 : N3VQInt3<op24, op23, 0b00, op11_8, op4, IIC_VMACi16Q, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1774 | OpcodeStr, !strconcat(Dt, "8"), v16i8, v16i8, IntOp>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1775 | def v8i16 : N3VQInt3<op24, op23, 0b01, op11_8, op4, IIC_VMACi16Q, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1776 | OpcodeStr, !strconcat(Dt, "16"), v8i16, v8i16, IntOp>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1777 | def v4i32 : N3VQInt3<op24, op23, 0b10, op11_8, op4, IIC_VMACi32Q, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1778 | OpcodeStr, !strconcat(Dt, "32"), v4i32, v4i32, IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1779 | } | 
|  | 1780 |  | 
|  | 1781 |  | 
|  | 1782 | // Neon Long 3-argument intrinsics. | 
|  | 1783 |  | 
|  | 1784 | // First with only element sizes of 16 and 32 bits: | 
|  | 1785 | multiclass N3VLInt3_HS<bit op24, bit op23, bits<4> op11_8, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1786 | string OpcodeStr, string Dt, Intrinsic IntOp> { | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1787 | def v4i32 : N3VLInt3<op24, op23, 0b01, op11_8, op4, IIC_VMACi16D, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1788 | OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, IntOp>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1789 | def v2i64 : N3VLInt3<op24, op23, 0b10, op11_8, op4, IIC_VMACi16D, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1790 | OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1791 | } | 
|  | 1792 |  | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1793 | multiclass N3VLInt3SL_HS<bit op24, bits<4> op11_8, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1794 | string OpcodeStr, string Dt, Intrinsic IntOp> { | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1795 | def v4i16 : N3VLInt3SL16<op24, 0b01, op11_8, IIC_VMACi16D, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1796 | OpcodeStr, !strconcat(Dt,"16"), v4i32, v4i16, IntOp>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 1797 | def v2i32 : N3VLInt3SL<op24, 0b10, op11_8, IIC_VMACi32D, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1798 | OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, IntOp>; | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 1799 | } | 
|  | 1800 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1801 | // ....then also with element size of 8 bits: | 
|  | 1802 | multiclass N3VLInt3_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1803 | string OpcodeStr, string Dt, Intrinsic IntOp> | 
|  | 1804 | : N3VLInt3_HS<op24, op23, op11_8, op4, OpcodeStr, Dt, IntOp> { | 
| Bob Wilson | 4138b11 | 2009-10-15 21:57:47 +0000 | [diff] [blame] | 1805 | def v8i16 : N3VLInt3<op24, op23, 0b00, op11_8, op4, IIC_VMACi16D, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1806 | OpcodeStr, !strconcat(Dt, "8"), v8i16, v8i8, IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1807 | } | 
|  | 1808 |  | 
|  | 1809 |  | 
|  | 1810 | // Neon 2-register vector intrinsics, | 
|  | 1811 | //   element sizes of 8, 16 and 32 bits: | 
|  | 1812 | multiclass N2VInt_QHS<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16, | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 1813 | bits<5> op11_7, bit op4, | 
|  | 1814 | InstrItinClass itinD, InstrItinClass itinQ, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1815 | string OpcodeStr, string Dt, Intrinsic IntOp> { | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1816 | // 64-bit vector types. | 
|  | 1817 | def v8i8  : N2VDInt<op24_23, op21_20, 0b00, op17_16, op11_7, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1818 | itinD, OpcodeStr, !strconcat(Dt, "8"), v8i8, v8i8, IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1819 | def v4i16 : N2VDInt<op24_23, op21_20, 0b01, op17_16, op11_7, op4, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1820 | itinD, OpcodeStr, !strconcat(Dt, "16"),v4i16,v4i16,IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1821 | def v2i32 : N2VDInt<op24_23, op21_20, 0b10, op17_16, op11_7, op4, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1822 | itinD, OpcodeStr, !strconcat(Dt, "32"),v2i32,v2i32,IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1823 |  | 
|  | 1824 | // 128-bit vector types. | 
|  | 1825 | def v16i8 : N2VQInt<op24_23, op21_20, 0b00, op17_16, op11_7, op4, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1826 | itinQ, OpcodeStr, !strconcat(Dt, "8"), v16i8,v16i8,IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1827 | def v8i16 : N2VQInt<op24_23, op21_20, 0b01, op17_16, op11_7, op4, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1828 | itinQ, OpcodeStr, !strconcat(Dt, "16"),v8i16,v8i16,IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1829 | def v4i32 : N2VQInt<op24_23, op21_20, 0b10, op17_16, op11_7, op4, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 1830 | itinQ, OpcodeStr, !strconcat(Dt, "32"),v4i32,v4i32,IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1831 | } | 
|  | 1832 |  | 
|  | 1833 |  | 
|  | 1834 | // Neon Pairwise long 2-register intrinsics, | 
|  | 1835 | //   element sizes of 8, 16 and 32 bits: | 
|  | 1836 | multiclass N2VPLInt_QHS<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16, | 
|  | 1837 | bits<5> op11_7, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1838 | string OpcodeStr, string Dt, Intrinsic IntOp> { | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1839 | // 64-bit vector types. | 
|  | 1840 | def v8i8  : N2VDPLInt<op24_23, op21_20, 0b00, op17_16, op11_7, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1841 | OpcodeStr, !strconcat(Dt, "8"), v4i16, v8i8, IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1842 | def v4i16 : N2VDPLInt<op24_23, op21_20, 0b01, op17_16, op11_7, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1843 | OpcodeStr, !strconcat(Dt, "16"), v2i32, v4i16, IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1844 | def v2i32 : N2VDPLInt<op24_23, op21_20, 0b10, op17_16, op11_7, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1845 | OpcodeStr, !strconcat(Dt, "32"), v1i64, v2i32, IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1846 |  | 
|  | 1847 | // 128-bit vector types. | 
|  | 1848 | def v16i8 : N2VQPLInt<op24_23, op21_20, 0b00, op17_16, op11_7, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1849 | OpcodeStr, !strconcat(Dt, "8"), v8i16, v16i8, IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1850 | def v8i16 : N2VQPLInt<op24_23, op21_20, 0b01, op17_16, op11_7, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1851 | OpcodeStr, !strconcat(Dt, "16"), v4i32, v8i16, IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1852 | def v4i32 : N2VQPLInt<op24_23, op21_20, 0b10, op17_16, op11_7, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1853 | OpcodeStr, !strconcat(Dt, "32"), v2i64, v4i32, IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1854 | } | 
|  | 1855 |  | 
|  | 1856 |  | 
|  | 1857 | // Neon Pairwise long 2-register accumulate intrinsics, | 
|  | 1858 | //   element sizes of 8, 16 and 32 bits: | 
|  | 1859 | multiclass N2VPLInt2_QHS<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16, | 
|  | 1860 | bits<5> op11_7, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1861 | string OpcodeStr, string Dt, Intrinsic IntOp> { | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1862 | // 64-bit vector types. | 
|  | 1863 | def v8i8  : N2VDPLInt2<op24_23, op21_20, 0b00, op17_16, op11_7, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1864 | OpcodeStr, !strconcat(Dt, "8"), v4i16, v8i8, IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1865 | def v4i16 : N2VDPLInt2<op24_23, op21_20, 0b01, op17_16, op11_7, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1866 | OpcodeStr, !strconcat(Dt, "16"), v2i32, v4i16, IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1867 | def v2i32 : N2VDPLInt2<op24_23, op21_20, 0b10, op17_16, op11_7, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1868 | OpcodeStr, !strconcat(Dt, "32"), v1i64, v2i32, IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1869 |  | 
|  | 1870 | // 128-bit vector types. | 
|  | 1871 | def v16i8 : N2VQPLInt2<op24_23, op21_20, 0b00, op17_16, op11_7, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1872 | OpcodeStr, !strconcat(Dt, "8"), v8i16, v16i8, IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1873 | def v8i16 : N2VQPLInt2<op24_23, op21_20, 0b01, op17_16, op11_7, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1874 | OpcodeStr, !strconcat(Dt, "16"), v4i32, v8i16, IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1875 | def v4i32 : N2VQPLInt2<op24_23, op21_20, 0b10, op17_16, op11_7, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1876 | OpcodeStr, !strconcat(Dt, "32"), v2i64, v4i32, IntOp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1877 | } | 
|  | 1878 |  | 
|  | 1879 |  | 
|  | 1880 | // Neon 2-register vector shift by immediate, | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1881 | //   with f of either N2RegVShLFrm or N2RegVShRFrm | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1882 | //   element sizes of 8, 16, 32 and 64 bits: | 
|  | 1883 | multiclass N2VSh_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1884 | InstrItinClass itin, string OpcodeStr, string Dt, | 
|  | 1885 | SDNode OpNode, Format f> { | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1886 | // 64-bit vector types. | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1887 | def v8i8  : N2VDSh<op24, op23, op11_8, 0, op4, f, itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1888 | OpcodeStr, !strconcat(Dt, "8"), v8i8, OpNode> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1889 | let Inst{21-19} = 0b001; // imm6 = 001xxx | 
|  | 1890 | } | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1891 | def v4i16 : N2VDSh<op24, op23, op11_8, 0, op4, f, itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1892 | OpcodeStr, !strconcat(Dt, "16"), v4i16, OpNode> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1893 | let Inst{21-20} = 0b01;  // imm6 = 01xxxx | 
|  | 1894 | } | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1895 | def v2i32 : N2VDSh<op24, op23, op11_8, 0, op4, f, itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1896 | OpcodeStr, !strconcat(Dt, "32"), v2i32, OpNode> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1897 | let Inst{21} = 0b1;      // imm6 = 1xxxxx | 
|  | 1898 | } | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1899 | def v1i64 : N2VDSh<op24, op23, op11_8, 1, op4, f, itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1900 | OpcodeStr, !strconcat(Dt, "64"), v1i64, OpNode>; | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1901 | // imm6 = xxxxxx | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1902 |  | 
|  | 1903 | // 128-bit vector types. | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1904 | def v16i8 : N2VQSh<op24, op23, op11_8, 0, op4, f, itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1905 | OpcodeStr, !strconcat(Dt, "8"), v16i8, OpNode> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1906 | let Inst{21-19} = 0b001; // imm6 = 001xxx | 
|  | 1907 | } | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1908 | def v8i16 : N2VQSh<op24, op23, op11_8, 0, op4, f, itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1909 | OpcodeStr, !strconcat(Dt, "16"), v8i16, OpNode> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1910 | let Inst{21-20} = 0b01;  // imm6 = 01xxxx | 
|  | 1911 | } | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1912 | def v4i32 : N2VQSh<op24, op23, op11_8, 0, op4, f, itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1913 | OpcodeStr, !strconcat(Dt, "32"), v4i32, OpNode> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1914 | let Inst{21} = 0b1;      // imm6 = 1xxxxx | 
|  | 1915 | } | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1916 | def v2i64 : N2VQSh<op24, op23, op11_8, 1, op4, f, itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1917 | OpcodeStr, !strconcat(Dt, "64"), v2i64, OpNode>; | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1918 | // imm6 = xxxxxx | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1919 | } | 
|  | 1920 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1921 | // Neon Shift-Accumulate vector operations, | 
|  | 1922 | //   element sizes of 8, 16, 32 and 64 bits: | 
|  | 1923 | multiclass N2VShAdd_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1924 | string OpcodeStr, string Dt, SDNode ShOp> { | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1925 | // 64-bit vector types. | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1926 | def v8i8  : N2VDShAdd<op24, op23, op11_8, 0, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1927 | OpcodeStr, !strconcat(Dt, "8"), v8i8, ShOp> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1928 | let Inst{21-19} = 0b001; // imm6 = 001xxx | 
|  | 1929 | } | 
|  | 1930 | def v4i16 : N2VDShAdd<op24, op23, op11_8, 0, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1931 | OpcodeStr, !strconcat(Dt, "16"), v4i16, ShOp> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1932 | let Inst{21-20} = 0b01;  // imm6 = 01xxxx | 
|  | 1933 | } | 
|  | 1934 | def v2i32 : N2VDShAdd<op24, op23, op11_8, 0, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1935 | OpcodeStr, !strconcat(Dt, "32"), v2i32, ShOp> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1936 | let Inst{21} = 0b1;      // imm6 = 1xxxxx | 
|  | 1937 | } | 
|  | 1938 | def v1i64 : N2VDShAdd<op24, op23, op11_8, 1, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1939 | OpcodeStr, !strconcat(Dt, "64"), v1i64, ShOp>; | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1940 | // imm6 = xxxxxx | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1941 |  | 
|  | 1942 | // 128-bit vector types. | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1943 | def v16i8 : N2VQShAdd<op24, op23, op11_8, 0, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1944 | OpcodeStr, !strconcat(Dt, "8"), v16i8, ShOp> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1945 | let Inst{21-19} = 0b001; // imm6 = 001xxx | 
|  | 1946 | } | 
|  | 1947 | def v8i16 : N2VQShAdd<op24, op23, op11_8, 0, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1948 | OpcodeStr, !strconcat(Dt, "16"), v8i16, ShOp> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1949 | let Inst{21-20} = 0b01;  // imm6 = 01xxxx | 
|  | 1950 | } | 
|  | 1951 | def v4i32 : N2VQShAdd<op24, op23, op11_8, 0, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1952 | OpcodeStr, !strconcat(Dt, "32"), v4i32, ShOp> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1953 | let Inst{21} = 0b1;      // imm6 = 1xxxxx | 
|  | 1954 | } | 
|  | 1955 | def v2i64 : N2VQShAdd<op24, op23, op11_8, 1, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 1956 | OpcodeStr, !strconcat(Dt, "64"), v2i64, ShOp>; | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1957 | // imm6 = xxxxxx | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1958 | } | 
|  | 1959 |  | 
|  | 1960 |  | 
|  | 1961 | // Neon Shift-Insert vector operations, | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1962 | //   with f of either N2RegVShLFrm or N2RegVShRFrm | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1963 | //   element sizes of 8, 16, 32 and 64 bits: | 
|  | 1964 | multiclass N2VShIns_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1965 | string OpcodeStr, SDNode ShOp, | 
|  | 1966 | Format f> { | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1967 | // 64-bit vector types. | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1968 | def v8i8  : N2VDShIns<op24, op23, op11_8, 0, op4, | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1969 | f, OpcodeStr, "8", v8i8, ShOp> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1970 | let Inst{21-19} = 0b001; // imm6 = 001xxx | 
|  | 1971 | } | 
|  | 1972 | def v4i16 : N2VDShIns<op24, op23, op11_8, 0, op4, | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1973 | f, OpcodeStr, "16", v4i16, ShOp> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1974 | let Inst{21-20} = 0b01;  // imm6 = 01xxxx | 
|  | 1975 | } | 
|  | 1976 | def v2i32 : N2VDShIns<op24, op23, op11_8, 0, op4, | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1977 | f, OpcodeStr, "32", v2i32, ShOp> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1978 | let Inst{21} = 0b1;      // imm6 = 1xxxxx | 
|  | 1979 | } | 
|  | 1980 | def v1i64 : N2VDShIns<op24, op23, op11_8, 1, op4, | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1981 | f, OpcodeStr, "64", v1i64, ShOp>; | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1982 | // imm6 = xxxxxx | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 1983 |  | 
|  | 1984 | // 128-bit vector types. | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1985 | def v16i8 : N2VQShIns<op24, op23, op11_8, 0, op4, | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1986 | f, OpcodeStr, "8", v16i8, ShOp> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1987 | let Inst{21-19} = 0b001; // imm6 = 001xxx | 
|  | 1988 | } | 
|  | 1989 | def v8i16 : N2VQShIns<op24, op23, op11_8, 0, op4, | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1990 | f, OpcodeStr, "16", v8i16, ShOp> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1991 | let Inst{21-20} = 0b01;  // imm6 = 01xxxx | 
|  | 1992 | } | 
|  | 1993 | def v4i32 : N2VQShIns<op24, op23, op11_8, 0, op4, | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1994 | f, OpcodeStr, "32", v4i32, ShOp> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1995 | let Inst{21} = 0b1;      // imm6 = 1xxxxx | 
|  | 1996 | } | 
|  | 1997 | def v2i64 : N2VQShIns<op24, op23, op11_8, 1, op4, | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 1998 | f, OpcodeStr, "64", v2i64, ShOp>; | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 1999 | // imm6 = xxxxxx | 
|  | 2000 | } | 
|  | 2001 |  | 
|  | 2002 | // Neon Shift Long operations, | 
|  | 2003 | //   element sizes of 8, 16, 32 bits: | 
|  | 2004 | multiclass N2VLSh_QHS<bit op24, bit op23, bits<4> op11_8, bit op7, bit op6, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2005 | bit op4, string OpcodeStr, string Dt, SDNode OpNode> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2006 | def v8i16 : N2VLSh<op24, op23, op11_8, op7, op6, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2007 | OpcodeStr, !strconcat(Dt, "8"), v8i16, v8i8, OpNode> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2008 | let Inst{21-19} = 0b001; // imm6 = 001xxx | 
|  | 2009 | } | 
|  | 2010 | def v4i32 : N2VLSh<op24, op23, op11_8, op7, op6, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2011 | OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, OpNode> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2012 | let Inst{21-20} = 0b01;  // imm6 = 01xxxx | 
|  | 2013 | } | 
|  | 2014 | def v2i64 : N2VLSh<op24, op23, op11_8, op7, op6, op4, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2015 | OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, OpNode> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2016 | let Inst{21} = 0b1;      // imm6 = 1xxxxx | 
|  | 2017 | } | 
|  | 2018 | } | 
|  | 2019 |  | 
|  | 2020 | // Neon Shift Narrow operations, | 
|  | 2021 | //   element sizes of 16, 32, 64 bits: | 
|  | 2022 | multiclass N2VNSh_HSD<bit op24, bit op23, bits<4> op11_8, bit op7, bit op6, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2023 | bit op4, InstrItinClass itin, string OpcodeStr, string Dt, | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2024 | SDNode OpNode> { | 
|  | 2025 | def v8i8 : N2VNSh<op24, op23, op11_8, op7, op6, op4, itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2026 | OpcodeStr, !strconcat(Dt, "16"), v8i8, v8i16, OpNode> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2027 | let Inst{21-19} = 0b001; // imm6 = 001xxx | 
|  | 2028 | } | 
|  | 2029 | def v4i16 : N2VNSh<op24, op23, op11_8, op7, op6, op4, itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2030 | OpcodeStr, !strconcat(Dt, "32"), v4i16, v4i32, OpNode> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2031 | let Inst{21-20} = 0b01;  // imm6 = 01xxxx | 
|  | 2032 | } | 
|  | 2033 | def v2i32 : N2VNSh<op24, op23, op11_8, op7, op6, op4, itin, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2034 | OpcodeStr, !strconcat(Dt, "64"), v2i32, v2i64, OpNode> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2035 | let Inst{21} = 0b1;      // imm6 = 1xxxxx | 
|  | 2036 | } | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2037 | } | 
|  | 2038 |  | 
|  | 2039 | //===----------------------------------------------------------------------===// | 
|  | 2040 | // Instruction Definitions. | 
|  | 2041 | //===----------------------------------------------------------------------===// | 
|  | 2042 |  | 
|  | 2043 | // Vector Add Operations. | 
|  | 2044 |  | 
|  | 2045 | //   VADD     : Vector Add (integer and floating-point) | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2046 | defm VADD     : N3V_QHSD<0, 0, 0b1000, 0, IIC_VBINiD, IIC_VBINiQ, "vadd", "i", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2047 | add, 1>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2048 | def  VADDfd   : N3VD<0, 0, 0b00, 0b1101, 0, IIC_VBIND, "vadd", "f32", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2049 | v2f32, v2f32, fadd, 1>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2050 | def  VADDfq   : N3VQ<0, 0, 0b00, 0b1101, 0, IIC_VBINQ, "vadd", "f32", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2051 | v4f32, v4f32, fadd, 1>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2052 | //   VADDL    : Vector Add Long (Q = D + D) | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2053 | defm VADDLs   : N3VLInt_QHS<0,1,0b0000,0, IIC_VSHLiD, "vaddl", "s", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2054 | int_arm_neon_vaddls, 1>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2055 | defm VADDLu   : N3VLInt_QHS<1,1,0b0000,0, IIC_VSHLiD, "vaddl", "u", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2056 | int_arm_neon_vaddlu, 1>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2057 | //   VADDW    : Vector Add Wide (Q = Q + D) | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2058 | defm VADDWs   : N3VWInt_QHS<0,1,0b0001,0, "vaddw", "s", int_arm_neon_vaddws, 0>; | 
|  | 2059 | defm VADDWu   : N3VWInt_QHS<1,1,0b0001,0, "vaddw", "u", int_arm_neon_vaddwu, 0>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2060 | //   VHADD    : Vector Halving Add | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2061 | defm VHADDs   : N3VInt_QHS<0,0,0b0000,0, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2062 | IIC_VBINi4Q, "vhadd", "s", int_arm_neon_vhadds, 1>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2063 | defm VHADDu   : N3VInt_QHS<1,0,0b0000,0, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2064 | IIC_VBINi4Q, "vhadd", "u", int_arm_neon_vhaddu, 1>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2065 | //   VRHADD   : Vector Rounding Halving Add | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2066 | defm VRHADDs  : N3VInt_QHS<0,0,0b0001,0, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2067 | IIC_VBINi4Q, "vrhadd", "s", int_arm_neon_vrhadds, 1>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2068 | defm VRHADDu  : N3VInt_QHS<1,0,0b0001,0, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2069 | IIC_VBINi4Q, "vrhadd", "u", int_arm_neon_vrhaddu, 1>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2070 | //   VQADD    : Vector Saturating Add | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2071 | defm VQADDs   : N3VInt_QHSD<0,0,0b0000,1, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2072 | IIC_VBINi4Q, "vqadd", "s", int_arm_neon_vqadds, 1>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2073 | defm VQADDu   : N3VInt_QHSD<1,0,0b0000,1, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2074 | IIC_VBINi4Q, "vqadd", "u", int_arm_neon_vqaddu, 1>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2075 | //   VADDHN   : Vector Add and Narrow Returning High Half (D = Q + Q) | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2076 | defm VADDHN   : N3VNInt_HSD<0,1,0b0100,0, "vaddhn", "i", | 
|  | 2077 | int_arm_neon_vaddhn, 1>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2078 | //   VRADDHN  : Vector Rounding Add and Narrow Returning High Half (D = Q + Q) | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2079 | defm VRADDHN  : N3VNInt_HSD<1,1,0b0100,0, "vraddhn", "i", | 
|  | 2080 | int_arm_neon_vraddhn, 1>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2081 |  | 
|  | 2082 | // Vector Multiply Operations. | 
|  | 2083 |  | 
|  | 2084 | //   VMUL     : Vector Multiply (integer, polynomial and floating-point) | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2085 | defm VMUL     : N3V_QHS<0, 0, 0b1001, 1, IIC_VMULi16D, IIC_VMULi32D, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2086 | IIC_VMULi16Q, IIC_VMULi32Q, "vmul", "i", mul, 1>; | 
|  | 2087 | def  VMULpd   : N3VDInt<1, 0, 0b00, 0b1001, 1, IIC_VMULi16D, "vmul", "p8", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2088 | v8i8, v8i8, int_arm_neon_vmulp, 1>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2089 | def  VMULpq   : N3VQInt<1, 0, 0b00, 0b1001, 1, IIC_VMULi16Q, "vmul", "p8", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2090 | v16i8, v16i8, int_arm_neon_vmulp, 1>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2091 | def  VMULfd   : N3VD<1, 0, 0b00, 0b1101, 1, IIC_VBIND, "vmul", "f32", | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2092 | v2f32, v2f32, fmul, 1>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2093 | def  VMULfq   : N3VQ<1, 0, 0b00, 0b1101, 1, IIC_VBINQ, "vmul", "f32", | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2094 | v4f32, v4f32, fmul, 1>; | 
|  | 2095 | defm VMULsl   : N3VSL_HS<0b1000, "vmul", "i", mul>; | 
|  | 2096 | def  VMULslfd : N3VDSL<0b10, 0b1001, IIC_VBIND, "vmul", "f32", v2f32, fmul>; | 
|  | 2097 | def  VMULslfq : N3VQSL<0b10, 0b1001, IIC_VBINQ, "vmul", "f32", v4f32, | 
|  | 2098 | v2f32, fmul>; | 
|  | 2099 |  | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2100 | def : Pat<(v8i16 (mul (v8i16 QPR:$src1), | 
|  | 2101 | (v8i16 (NEONvduplane (v8i16 QPR:$src2), imm:$lane)))), | 
|  | 2102 | (v8i16 (VMULslv8i16 (v8i16 QPR:$src1), | 
|  | 2103 | (v4i16 (EXTRACT_SUBREG QPR:$src2, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2104 | (DSubReg_i16_reg imm:$lane))), | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2105 | (SubReg_i16_lane imm:$lane)))>; | 
|  | 2106 | def : Pat<(v4i32 (mul (v4i32 QPR:$src1), | 
|  | 2107 | (v4i32 (NEONvduplane (v4i32 QPR:$src2), imm:$lane)))), | 
|  | 2108 | (v4i32 (VMULslv4i32 (v4i32 QPR:$src1), | 
|  | 2109 | (v2i32 (EXTRACT_SUBREG QPR:$src2, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2110 | (DSubReg_i32_reg imm:$lane))), | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2111 | (SubReg_i32_lane imm:$lane)))>; | 
|  | 2112 | def : Pat<(v4f32 (fmul (v4f32 QPR:$src1), | 
|  | 2113 | (v4f32 (NEONvduplane (v4f32 QPR:$src2), imm:$lane)))), | 
|  | 2114 | (v4f32 (VMULslfq (v4f32 QPR:$src1), | 
|  | 2115 | (v2f32 (EXTRACT_SUBREG QPR:$src2, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2116 | (DSubReg_i32_reg imm:$lane))), | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2117 | (SubReg_i32_lane imm:$lane)))>; | 
|  | 2118 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2119 | //   VQDMULH  : Vector Saturating Doubling Multiply Returning High Half | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2120 | defm VQDMULH  : N3VInt_HS<0, 0, 0b1011, 0, IIC_VMULi16D, IIC_VMULi32D, | 
|  | 2121 | IIC_VMULi16Q, IIC_VMULi32Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2122 | "vqdmulh", "s", int_arm_neon_vqdmulh, 1>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2123 | defm VQDMULHsl: N3VIntSL_HS<0b1100, IIC_VMULi16D, IIC_VMULi32D, | 
|  | 2124 | IIC_VMULi16Q, IIC_VMULi32Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2125 | "vqdmulh", "s",  int_arm_neon_vqdmulh>; | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2126 | def : Pat<(v8i16 (int_arm_neon_vqdmulh (v8i16 QPR:$src1), | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2127 | (v8i16 (NEONvduplane (v8i16 QPR:$src2), | 
|  | 2128 | imm:$lane)))), | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2129 | (v8i16 (VQDMULHslv8i16 (v8i16 QPR:$src1), | 
|  | 2130 | (v4i16 (EXTRACT_SUBREG QPR:$src2, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2131 | (DSubReg_i16_reg imm:$lane))), | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2132 | (SubReg_i16_lane imm:$lane)))>; | 
|  | 2133 | def : Pat<(v4i32 (int_arm_neon_vqdmulh (v4i32 QPR:$src1), | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2134 | (v4i32 (NEONvduplane (v4i32 QPR:$src2), | 
|  | 2135 | imm:$lane)))), | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2136 | (v4i32 (VQDMULHslv4i32 (v4i32 QPR:$src1), | 
|  | 2137 | (v2i32 (EXTRACT_SUBREG QPR:$src2, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2138 | (DSubReg_i32_reg imm:$lane))), | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2139 | (SubReg_i32_lane imm:$lane)))>; | 
|  | 2140 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2141 | //   VQRDMULH : Vector Rounding Saturating Doubling Multiply Returning High Half | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2142 | defm VQRDMULH   : N3VInt_HS<1, 0, 0b1011, 0, IIC_VMULi16D, IIC_VMULi32D, | 
|  | 2143 | IIC_VMULi16Q, IIC_VMULi32Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2144 | "vqrdmulh", "s", int_arm_neon_vqrdmulh, 1>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2145 | defm VQRDMULHsl : N3VIntSL_HS<0b1101, IIC_VMULi16D, IIC_VMULi32D, | 
|  | 2146 | IIC_VMULi16Q, IIC_VMULi32Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2147 | "vqrdmulh", "s",  int_arm_neon_vqrdmulh>; | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2148 | def : Pat<(v8i16 (int_arm_neon_vqrdmulh (v8i16 QPR:$src1), | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2149 | (v8i16 (NEONvduplane (v8i16 QPR:$src2), | 
|  | 2150 | imm:$lane)))), | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2151 | (v8i16 (VQRDMULHslv8i16 (v8i16 QPR:$src1), | 
|  | 2152 | (v4i16 (EXTRACT_SUBREG QPR:$src2, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2153 | (DSubReg_i16_reg imm:$lane))), | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2154 | (SubReg_i16_lane imm:$lane)))>; | 
|  | 2155 | def : Pat<(v4i32 (int_arm_neon_vqrdmulh (v4i32 QPR:$src1), | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2156 | (v4i32 (NEONvduplane (v4i32 QPR:$src2), | 
|  | 2157 | imm:$lane)))), | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2158 | (v4i32 (VQRDMULHslv4i32 (v4i32 QPR:$src1), | 
|  | 2159 | (v2i32 (EXTRACT_SUBREG QPR:$src2, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2160 | (DSubReg_i32_reg imm:$lane))), | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2161 | (SubReg_i32_lane imm:$lane)))>; | 
|  | 2162 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2163 | //   VMULL    : Vector Multiply Long (integer and polynomial) (Q = D * D) | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2164 | defm VMULLs   : N3VLInt_QHS<0,1,0b1100,0, IIC_VMULi16D, "vmull", "s", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2165 | int_arm_neon_vmulls, 1>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2166 | defm VMULLu   : N3VLInt_QHS<1,1,0b1100,0, IIC_VMULi16D, "vmull", "u", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2167 | int_arm_neon_vmullu, 1>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2168 | def  VMULLp   : N3VLInt<0, 1, 0b00, 0b1110, 0, IIC_VMULi16D, "vmull", "p8", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2169 | v8i16, v8i8, int_arm_neon_vmullp, 1>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2170 | defm VMULLsls : N3VLIntSL_HS<0, 0b1010, IIC_VMULi16D, "vmull", "s", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2171 | int_arm_neon_vmulls>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2172 | defm VMULLslu : N3VLIntSL_HS<1, 0b1010, IIC_VMULi16D, "vmull", "u", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2173 | int_arm_neon_vmullu>; | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2174 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2175 | //   VQDMULL  : Vector Saturating Doubling Multiply Long (Q = D * D) | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2176 | defm VQDMULL  : N3VLInt_HS<0,1,0b1101,0, IIC_VMULi16D, "vqdmull", "s", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2177 | int_arm_neon_vqdmull, 1>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2178 | defm VQDMULLsl: N3VLIntSL_HS<0, 0b1011, IIC_VMULi16D, "vqdmull", "s", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2179 | int_arm_neon_vqdmull>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2180 |  | 
|  | 2181 | // Vector Multiply-Accumulate and Multiply-Subtract Operations. | 
|  | 2182 |  | 
|  | 2183 | //   VMLA     : Vector Multiply Accumulate (integer and floating-point) | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2184 | defm VMLA     : N3VMulOp_QHS<0, 0, 0b1001, 0, IIC_VMACi16D, IIC_VMACi32D, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2185 | IIC_VMACi16Q, IIC_VMACi32Q, "vmla", "i", add>; | 
|  | 2186 | def  VMLAfd   : N3VDMulOp<0, 0, 0b00, 0b1101, 1, IIC_VMACD, "vmla", "f32", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2187 | v2f32, fmul, fadd>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2188 | def  VMLAfq   : N3VQMulOp<0, 0, 0b00, 0b1101, 1, IIC_VMACQ, "vmla", "f32", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2189 | v4f32, fmul, fadd>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2190 | defm VMLAsl   : N3VMulOpSL_HS<0b0000, IIC_VMACi16D, IIC_VMACi32D, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2191 | IIC_VMACi16Q, IIC_VMACi32Q, "vmla", "i", add>; | 
|  | 2192 | def  VMLAslfd : N3VDMulOpSL<0b10, 0b0001, IIC_VMACD, "vmla", "f32", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2193 | v2f32, fmul, fadd>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2194 | def  VMLAslfq : N3VQMulOpSL<0b10, 0b0001, IIC_VMACQ, "vmla", "f32", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2195 | v4f32, v2f32, fmul, fadd>; | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2196 |  | 
|  | 2197 | def : Pat<(v8i16 (add (v8i16 QPR:$src1), | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2198 | (mul (v8i16 QPR:$src2), | 
|  | 2199 | (v8i16 (NEONvduplane (v8i16 QPR:$src3), imm:$lane))))), | 
|  | 2200 | (v8i16 (VMLAslv8i16 (v8i16 QPR:$src1), (v8i16 QPR:$src2), | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2201 | (v4i16 (EXTRACT_SUBREG QPR:$src3, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2202 | (DSubReg_i16_reg imm:$lane))), | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2203 | (SubReg_i16_lane imm:$lane)))>; | 
|  | 2204 |  | 
|  | 2205 | def : Pat<(v4i32 (add (v4i32 QPR:$src1), | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2206 | (mul (v4i32 QPR:$src2), | 
|  | 2207 | (v4i32 (NEONvduplane (v4i32 QPR:$src3), imm:$lane))))), | 
|  | 2208 | (v4i32 (VMLAslv4i32 (v4i32 QPR:$src1), (v4i32 QPR:$src2), | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2209 | (v2i32 (EXTRACT_SUBREG QPR:$src3, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2210 | (DSubReg_i32_reg imm:$lane))), | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2211 | (SubReg_i32_lane imm:$lane)))>; | 
|  | 2212 |  | 
|  | 2213 | def : Pat<(v4f32 (fadd (v4f32 QPR:$src1), | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2214 | (fmul (v4f32 QPR:$src2), | 
|  | 2215 | (v4f32 (NEONvduplane (v4f32 QPR:$src3), imm:$lane))))), | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2216 | (v4f32 (VMLAslfq (v4f32 QPR:$src1), | 
|  | 2217 | (v4f32 QPR:$src2), | 
|  | 2218 | (v2f32 (EXTRACT_SUBREG QPR:$src3, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2219 | (DSubReg_i32_reg imm:$lane))), | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2220 | (SubReg_i32_lane imm:$lane)))>; | 
|  | 2221 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2222 | //   VMLAL    : Vector Multiply Accumulate Long (Q += D * D) | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2223 | defm VMLALs   : N3VLInt3_QHS<0,1,0b1000,0, "vmlal", "s", int_arm_neon_vmlals>; | 
|  | 2224 | defm VMLALu   : N3VLInt3_QHS<1,1,0b1000,0, "vmlal", "u", int_arm_neon_vmlalu>; | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2225 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2226 | defm VMLALsls : N3VLInt3SL_HS<0, 0b0010, "vmlal", "s", int_arm_neon_vmlals>; | 
|  | 2227 | defm VMLALslu : N3VLInt3SL_HS<1, 0b0010, "vmlal", "u", int_arm_neon_vmlalu>; | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2228 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2229 | //   VQDMLAL  : Vector Saturating Doubling Multiply Accumulate Long (Q += D * D) | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2230 | defm VQDMLAL  : N3VLInt3_HS<0, 1, 0b1001, 0, "vqdmlal", "s", | 
|  | 2231 | int_arm_neon_vqdmlal>; | 
|  | 2232 | defm VQDMLALsl: N3VLInt3SL_HS<0, 0b0011, "vqdmlal", "s", int_arm_neon_vqdmlal>; | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2233 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2234 | //   VMLS     : Vector Multiply Subtract (integer and floating-point) | 
| Bob Wilson | a9abf57 | 2009-10-03 04:41:21 +0000 | [diff] [blame] | 2235 | defm VMLS     : N3VMulOp_QHS<1, 0, 0b1001, 0, IIC_VMACi16D, IIC_VMACi32D, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2236 | IIC_VMACi16Q, IIC_VMACi32Q, "vmls", "i", sub>; | 
|  | 2237 | def  VMLSfd   : N3VDMulOp<0, 0, 0b10, 0b1101, 1, IIC_VMACD, "vmls", "f32", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2238 | v2f32, fmul, fsub>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2239 | def  VMLSfq   : N3VQMulOp<0, 0, 0b10, 0b1101, 1, IIC_VMACQ, "vmls", "f32", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2240 | v4f32, fmul, fsub>; | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2241 | defm VMLSsl   : N3VMulOpSL_HS<0b0100, IIC_VMACi16D, IIC_VMACi32D, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2242 | IIC_VMACi16Q, IIC_VMACi32Q, "vmls", "i", sub>; | 
|  | 2243 | def  VMLSslfd : N3VDMulOpSL<0b10, 0b0101, IIC_VMACD, "vmls", "f32", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2244 | v2f32, fmul, fsub>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2245 | def  VMLSslfq : N3VQMulOpSL<0b10, 0b0101, IIC_VMACQ, "vmls", "f32", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2246 | v4f32, v2f32, fmul, fsub>; | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2247 |  | 
|  | 2248 | def : Pat<(v8i16 (sub (v8i16 QPR:$src1), | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2249 | (mul (v8i16 QPR:$src2), | 
|  | 2250 | (v8i16 (NEONvduplane (v8i16 QPR:$src3), imm:$lane))))), | 
|  | 2251 | (v8i16 (VMLSslv8i16 (v8i16 QPR:$src1), (v8i16 QPR:$src2), | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2252 | (v4i16 (EXTRACT_SUBREG QPR:$src3, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2253 | (DSubReg_i16_reg imm:$lane))), | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2254 | (SubReg_i16_lane imm:$lane)))>; | 
|  | 2255 |  | 
|  | 2256 | def : Pat<(v4i32 (sub (v4i32 QPR:$src1), | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2257 | (mul (v4i32 QPR:$src2), | 
|  | 2258 | (v4i32 (NEONvduplane (v4i32 QPR:$src3), imm:$lane))))), | 
|  | 2259 | (v4i32 (VMLSslv4i32 (v4i32 QPR:$src1), (v4i32 QPR:$src2), | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2260 | (v2i32 (EXTRACT_SUBREG QPR:$src3, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2261 | (DSubReg_i32_reg imm:$lane))), | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2262 | (SubReg_i32_lane imm:$lane)))>; | 
|  | 2263 |  | 
|  | 2264 | def : Pat<(v4f32 (fsub (v4f32 QPR:$src1), | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2265 | (fmul (v4f32 QPR:$src2), | 
|  | 2266 | (v4f32 (NEONvduplane (v4f32 QPR:$src3), imm:$lane))))), | 
|  | 2267 | (v4f32 (VMLSslfq (v4f32 QPR:$src1), (v4f32 QPR:$src2), | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2268 | (v2f32 (EXTRACT_SUBREG QPR:$src3, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2269 | (DSubReg_i32_reg imm:$lane))), | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2270 | (SubReg_i32_lane imm:$lane)))>; | 
|  | 2271 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2272 | //   VMLSL    : Vector Multiply Subtract Long (Q -= D * D) | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2273 | defm VMLSLs   : N3VLInt3_QHS<0,1,0b1010,0, "vmlsl", "s", int_arm_neon_vmlsls>; | 
|  | 2274 | defm VMLSLu   : N3VLInt3_QHS<1,1,0b1010,0, "vmlsl", "u", int_arm_neon_vmlslu>; | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2275 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2276 | defm VMLSLsls : N3VLInt3SL_HS<0, 0b0110, "vmlsl", "s", int_arm_neon_vmlsls>; | 
|  | 2277 | defm VMLSLslu : N3VLInt3SL_HS<1, 0b0110, "vmlsl", "u", int_arm_neon_vmlslu>; | 
| Anton Korobeynikov | 59e2b8e | 2009-09-08 15:22:32 +0000 | [diff] [blame] | 2278 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2279 | //   VQDMLSL  : Vector Saturating Doubling Multiply Subtract Long (Q -= D * D) | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2280 | defm VQDMLSL  : N3VLInt3_HS<0, 1, 0b1011, 0, "vqdmlsl", "s", | 
|  | 2281 | int_arm_neon_vqdmlsl>; | 
|  | 2282 | defm VQDMLSLsl: N3VLInt3SL_HS<0, 0b111, "vqdmlsl", "s", int_arm_neon_vqdmlsl>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2283 |  | 
|  | 2284 | // Vector Subtract Operations. | 
|  | 2285 |  | 
|  | 2286 | //   VSUB     : Vector Subtract (integer and floating-point) | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2287 | defm VSUB     : N3V_QHSD<1, 0, 0b1000, 0, IIC_VSUBiD, IIC_VSUBiQ, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2288 | "vsub", "i", sub, 0>; | 
|  | 2289 | def  VSUBfd   : N3VD<0, 0, 0b10, 0b1101, 0, IIC_VBIND, "vsub", "f32", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2290 | v2f32, v2f32, fsub, 0>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2291 | def  VSUBfq   : N3VQ<0, 0, 0b10, 0b1101, 0, IIC_VBINQ, "vsub", "f32", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2292 | v4f32, v4f32, fsub, 0>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2293 | //   VSUBL    : Vector Subtract Long (Q = D - D) | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2294 | defm VSUBLs   : N3VLInt_QHS<0,1,0b0010,0, IIC_VSHLiD, "vsubl", "s", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2295 | int_arm_neon_vsubls, 1>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2296 | defm VSUBLu   : N3VLInt_QHS<1,1,0b0010,0, IIC_VSHLiD, "vsubl", "u", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2297 | int_arm_neon_vsublu, 1>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2298 | //   VSUBW    : Vector Subtract Wide (Q = Q - D) | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2299 | defm VSUBWs   : N3VWInt_QHS<0,1,0b0011,0, "vsubw", "s", int_arm_neon_vsubws, 0>; | 
|  | 2300 | defm VSUBWu   : N3VWInt_QHS<1,1,0b0011,0, "vsubw", "u", int_arm_neon_vsubwu, 0>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2301 | //   VHSUB    : Vector Halving Subtract | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2302 | defm VHSUBs   : N3VInt_QHS<0, 0, 0b0010, 0, IIC_VBINi4D, IIC_VBINi4D, | 
|  | 2303 | IIC_VBINi4Q, IIC_VBINi4Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2304 | "vhsub", "s", int_arm_neon_vhsubs, 0>; | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2305 | defm VHSUBu   : N3VInt_QHS<1, 0, 0b0010, 0, IIC_VBINi4D, IIC_VBINi4D, | 
|  | 2306 | IIC_VBINi4Q, IIC_VBINi4Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2307 | "vhsub", "u", int_arm_neon_vhsubu, 0>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2308 | //   VQSUB    : Vector Saturing Subtract | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2309 | defm VQSUBs   : N3VInt_QHSD<0, 0, 0b0010, 1, IIC_VBINi4D, IIC_VBINi4D, | 
|  | 2310 | IIC_VBINi4Q, IIC_VBINi4Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2311 | "vqsub", "s", int_arm_neon_vqsubs, 0>; | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2312 | defm VQSUBu   : N3VInt_QHSD<1, 0, 0b0010, 1, IIC_VBINi4D, IIC_VBINi4D, | 
|  | 2313 | IIC_VBINi4Q, IIC_VBINi4Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2314 | "vqsub", "u", int_arm_neon_vqsubu, 0>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2315 | //   VSUBHN   : Vector Subtract and Narrow Returning High Half (D = Q - Q) | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2316 | defm VSUBHN   : N3VNInt_HSD<0,1,0b0110,0, "vsubhn", "i", | 
|  | 2317 | int_arm_neon_vsubhn, 0>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2318 | //   VRSUBHN  : Vector Rounding Subtract and Narrow Returning High Half (D=Q-Q) | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2319 | defm VRSUBHN  : N3VNInt_HSD<1,1,0b0110,0, "vrsubhn", "i", | 
|  | 2320 | int_arm_neon_vrsubhn, 0>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2321 |  | 
|  | 2322 | // Vector Comparisons. | 
|  | 2323 |  | 
|  | 2324 | //   VCEQ     : Vector Compare Equal | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2325 | defm VCEQ     : N3V_QHS<1, 0, 0b1000, 1, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2326 | IIC_VBINi4Q, "vceq", "i", NEONvceq, 1>; | 
|  | 2327 | def  VCEQfd   : N3VD<0,0,0b00,0b1110,0, IIC_VBIND, "vceq", "f32", v2i32, v2f32, | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2328 | NEONvceq, 1>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2329 | def  VCEQfq   : N3VQ<0,0,0b00,0b1110,0, IIC_VBINQ, "vceq", "f32", v4i32, v4f32, | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2330 | NEONvceq, 1>; | 
| Johnny Chen | 886915e | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 2331 | // For disassembly only. | 
| Johnny Chen | 21dbd6f | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 2332 | defm VCEQz    : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00010, 0, "vceq", "i", | 
|  | 2333 | "$dst, $src, #0">; | 
| Johnny Chen | 886915e | 2010-02-23 00:33:12 +0000 | [diff] [blame] | 2334 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2335 | //   VCGE     : Vector Compare Greater Than or Equal | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2336 | defm VCGEs    : N3V_QHS<0, 0, 0b0011, 1, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2337 | IIC_VBINi4Q, "vcge", "s", NEONvcge, 0>; | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2338 | defm VCGEu    : N3V_QHS<1, 0, 0b0011, 1, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2339 | IIC_VBINi4Q, "vcge", "u", NEONvcgeu, 0>; | 
| Johnny Chen | bff23ca | 2010-03-24 21:25:07 +0000 | [diff] [blame] | 2340 | def  VCGEfd   : N3VD<1,0,0b00,0b1110,0, IIC_VBIND, "vcge", "f32", v2i32, v2f32, | 
|  | 2341 | NEONvcge, 0>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2342 | def  VCGEfq   : N3VQ<1,0,0b00,0b1110,0, IIC_VBINQ, "vcge", "f32", v4i32, v4f32, | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2343 | NEONvcge, 0>; | 
| Johnny Chen | 21dbd6f | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 2344 | // For disassembly only. | 
|  | 2345 | defm VCGEz    : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00001, 0, "vcge", "s", | 
|  | 2346 | "$dst, $src, #0">; | 
|  | 2347 | // For disassembly only. | 
|  | 2348 | defm VCLEz    : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00011, 0, "vcle", "s", | 
|  | 2349 | "$dst, $src, #0">; | 
|  | 2350 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2351 | //   VCGT     : Vector Compare Greater Than | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2352 | defm VCGTs    : N3V_QHS<0, 0, 0b0011, 0, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2353 | IIC_VBINi4Q, "vcgt", "s", NEONvcgt, 0>; | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2354 | defm VCGTu    : N3V_QHS<1, 0, 0b0011, 0, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2355 | IIC_VBINi4Q, "vcgt", "u", NEONvcgtu, 0>; | 
|  | 2356 | def  VCGTfd   : N3VD<1,0,0b10,0b1110,0, IIC_VBIND, "vcgt", "f32", v2i32, v2f32, | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2357 | NEONvcgt, 0>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2358 | def  VCGTfq   : N3VQ<1,0,0b10,0b1110,0, IIC_VBINQ, "vcgt", "f32", v4i32, v4f32, | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2359 | NEONvcgt, 0>; | 
| Johnny Chen | 21dbd6f | 2010-02-23 01:42:58 +0000 | [diff] [blame] | 2360 | // For disassembly only. | 
|  | 2361 | defm VCGTz    : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00000, 0, "vcgt", "s", | 
|  | 2362 | "$dst, $src, #0">; | 
|  | 2363 | // For disassembly only. | 
|  | 2364 | defm VCLTz    : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00100, 0, "vclt", "s", | 
|  | 2365 | "$dst, $src, #0">; | 
|  | 2366 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2367 | //   VACGE    : Vector Absolute Compare Greater Than or Equal (aka VCAGE) | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2368 | def  VACGEd   : N3VDInt<1, 0, 0b00, 0b1110, 1, IIC_VBIND, "vacge", "f32", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2369 | v2i32, v2f32, int_arm_neon_vacged, 0>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2370 | def  VACGEq   : N3VQInt<1, 0, 0b00, 0b1110, 1, IIC_VBINQ, "vacge", "f32", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2371 | v4i32, v4f32, int_arm_neon_vacgeq, 0>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2372 | //   VACGT    : Vector Absolute Compare Greater Than (aka VCAGT) | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2373 | def  VACGTd   : N3VDInt<1, 0, 0b10, 0b1110, 1, IIC_VBIND, "vacgt", "f32", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2374 | v2i32, v2f32, int_arm_neon_vacgtd, 0>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2375 | def  VACGTq   : N3VQInt<1, 0, 0b10, 0b1110, 1, IIC_VBINQ, "vacgt", "f32", | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2376 | v4i32, v4f32, int_arm_neon_vacgtq, 0>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2377 | //   VTST     : Vector Test Bits | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2378 | defm VTST     : N3V_QHS<0, 0, 0b1000, 1, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, | 
| Bob Wilson | 9349437 | 2010-01-17 06:35:17 +0000 | [diff] [blame] | 2379 | IIC_VBINi4Q, "vtst", "", NEONvtst, 1>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2380 |  | 
|  | 2381 | // Vector Bitwise Operations. | 
|  | 2382 |  | 
|  | 2383 | //   VAND     : Vector Bitwise AND | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2384 | def  VANDd    : N3VDX<0, 0, 0b00, 0b0001, 1, IIC_VBINiD, "vand", | 
|  | 2385 | v2i32, v2i32, and, 1>; | 
|  | 2386 | def  VANDq    : N3VQX<0, 0, 0b00, 0b0001, 1, IIC_VBINiQ, "vand", | 
|  | 2387 | v4i32, v4i32, and, 1>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2388 |  | 
|  | 2389 | //   VEOR     : Vector Bitwise Exclusive OR | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2390 | def  VEORd    : N3VDX<1, 0, 0b00, 0b0001, 1, IIC_VBINiD, "veor", | 
|  | 2391 | v2i32, v2i32, xor, 1>; | 
|  | 2392 | def  VEORq    : N3VQX<1, 0, 0b00, 0b0001, 1, IIC_VBINiQ, "veor", | 
|  | 2393 | v4i32, v4i32, xor, 1>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2394 |  | 
|  | 2395 | //   VORR     : Vector Bitwise OR | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2396 | def  VORRd    : N3VDX<0, 0, 0b10, 0b0001, 1, IIC_VBINiD, "vorr", | 
|  | 2397 | v2i32, v2i32, or, 1>; | 
|  | 2398 | def  VORRq    : N3VQX<0, 0, 0b10, 0b0001, 1, IIC_VBINiQ, "vorr", | 
|  | 2399 | v4i32, v4i32, or, 1>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2400 |  | 
|  | 2401 | //   VBIC     : Vector Bitwise Bit Clear (AND NOT) | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2402 | def  VBICd    : N3VX<0, 0, 0b01, 0b0001, 0, 1, (outs DPR:$dst), | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2403 | (ins DPR:$src1, DPR:$src2), IIC_VBINiD, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2404 | "vbic", "$dst, $src1, $src2", "", | 
| Anton Korobeynikov | 7697d37 | 2009-09-08 22:51:43 +0000 | [diff] [blame] | 2405 | [(set DPR:$dst, (v2i32 (and DPR:$src1, | 
|  | 2406 | (vnot_conv DPR:$src2))))]>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2407 | def  VBICq    : N3VX<0, 0, 0b01, 0b0001, 1, 1, (outs QPR:$dst), | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2408 | (ins QPR:$src1, QPR:$src2), IIC_VBINiQ, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2409 | "vbic", "$dst, $src1, $src2", "", | 
| Anton Korobeynikov | 7697d37 | 2009-09-08 22:51:43 +0000 | [diff] [blame] | 2410 | [(set QPR:$dst, (v4i32 (and QPR:$src1, | 
|  | 2411 | (vnot_conv QPR:$src2))))]>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2412 |  | 
|  | 2413 | //   VORN     : Vector Bitwise OR NOT | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2414 | def  VORNd    : N3VX<0, 0, 0b11, 0b0001, 0, 1, (outs DPR:$dst), | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2415 | (ins DPR:$src1, DPR:$src2), IIC_VBINiD, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2416 | "vorn", "$dst, $src1, $src2", "", | 
| Anton Korobeynikov | 7697d37 | 2009-09-08 22:51:43 +0000 | [diff] [blame] | 2417 | [(set DPR:$dst, (v2i32 (or DPR:$src1, | 
|  | 2418 | (vnot_conv DPR:$src2))))]>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2419 | def  VORNq    : N3VX<0, 0, 0b11, 0b0001, 1, 1, (outs QPR:$dst), | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2420 | (ins QPR:$src1, QPR:$src2), IIC_VBINiQ, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2421 | "vorn", "$dst, $src1, $src2", "", | 
| Anton Korobeynikov | 7697d37 | 2009-09-08 22:51:43 +0000 | [diff] [blame] | 2422 | [(set QPR:$dst, (v4i32 (or QPR:$src1, | 
|  | 2423 | (vnot_conv QPR:$src2))))]>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2424 |  | 
|  | 2425 | //   VMVN     : Vector Bitwise NOT | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2426 | def  VMVNd    : N2VX<0b11, 0b11, 0b00, 0b00, 0b01011, 0, 0, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2427 | (outs DPR:$dst), (ins DPR:$src), IIC_VSHLiD, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2428 | "vmvn", "$dst, $src", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2429 | [(set DPR:$dst, (v2i32 (vnot DPR:$src)))]>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2430 | def  VMVNq    : N2VX<0b11, 0b11, 0b00, 0b00, 0b01011, 1, 0, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2431 | (outs QPR:$dst), (ins QPR:$src), IIC_VSHLiD, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2432 | "vmvn", "$dst, $src", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2433 | [(set QPR:$dst, (v4i32 (vnot QPR:$src)))]>; | 
|  | 2434 | def : Pat<(v2i32 (vnot_conv DPR:$src)), (VMVNd DPR:$src)>; | 
|  | 2435 | def : Pat<(v4i32 (vnot_conv QPR:$src)), (VMVNq QPR:$src)>; | 
|  | 2436 |  | 
|  | 2437 | //   VBSL     : Vector Bitwise Select | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2438 | def  VBSLd    : N3VX<1, 0, 0b01, 0b0001, 0, 1, (outs DPR:$dst), | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2439 | (ins DPR:$src1, DPR:$src2, DPR:$src3), IIC_VCNTiD, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2440 | "vbsl", "$dst, $src2, $src3", "$src1 = $dst", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2441 | [(set DPR:$dst, | 
|  | 2442 | (v2i32 (or (and DPR:$src2, DPR:$src1), | 
| Anton Korobeynikov | 7697d37 | 2009-09-08 22:51:43 +0000 | [diff] [blame] | 2443 | (and DPR:$src3, (vnot_conv DPR:$src1)))))]>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2444 | def  VBSLq    : N3VX<1, 0, 0b01, 0b0001, 1, 1, (outs QPR:$dst), | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2445 | (ins QPR:$src1, QPR:$src2, QPR:$src3), IIC_VCNTiQ, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2446 | "vbsl", "$dst, $src2, $src3", "$src1 = $dst", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2447 | [(set QPR:$dst, | 
|  | 2448 | (v4i32 (or (and QPR:$src2, QPR:$src1), | 
| Anton Korobeynikov | 7697d37 | 2009-09-08 22:51:43 +0000 | [diff] [blame] | 2449 | (and QPR:$src3, (vnot_conv QPR:$src1)))))]>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2450 |  | 
|  | 2451 | //   VBIF     : Vector Bitwise Insert if False | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2452 | //              like VBSL but with: "vbif $dst, $src3, $src1", "$src2 = $dst", | 
| Johnny Chen | 1215c77 | 2010-02-09 23:05:23 +0000 | [diff] [blame] | 2453 | def  VBIFd    : N3VX<1, 0, 0b11, 0b0001, 0, 1, | 
|  | 2454 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2, DPR:$src3), | 
|  | 2455 | IIC_VBINiD, "vbif", "$dst, $src2, $src3", "$src1 = $dst", | 
|  | 2456 | [/* For disassembly only; pattern left blank */]>; | 
|  | 2457 | def  VBIFq    : N3VX<1, 0, 0b11, 0b0001, 1, 1, | 
|  | 2458 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2, QPR:$src3), | 
|  | 2459 | IIC_VBINiQ, "vbif", "$dst, $src2, $src3", "$src1 = $dst", | 
|  | 2460 | [/* For disassembly only; pattern left blank */]>; | 
|  | 2461 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2462 | //   VBIT     : Vector Bitwise Insert if True | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2463 | //              like VBSL but with: "vbit $dst, $src2, $src1", "$src3 = $dst", | 
| Johnny Chen | 1215c77 | 2010-02-09 23:05:23 +0000 | [diff] [blame] | 2464 | def  VBITd    : N3VX<1, 0, 0b10, 0b0001, 0, 1, | 
|  | 2465 | (outs DPR:$dst), (ins DPR:$src1, DPR:$src2, DPR:$src3), | 
|  | 2466 | IIC_VBINiD, "vbit", "$dst, $src2, $src3", "$src1 = $dst", | 
|  | 2467 | [/* For disassembly only; pattern left blank */]>; | 
|  | 2468 | def  VBITq    : N3VX<1, 0, 0b10, 0b0001, 1, 1, | 
|  | 2469 | (outs QPR:$dst), (ins QPR:$src1, QPR:$src2, QPR:$src3), | 
|  | 2470 | IIC_VBINiQ, "vbit", "$dst, $src2, $src3", "$src1 = $dst", | 
|  | 2471 | [/* For disassembly only; pattern left blank */]>; | 
|  | 2472 |  | 
|  | 2473 | // VBIT/VBIF are not yet implemented.  The TwoAddress pass will not go looking | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2474 | // for equivalent operations with different register constraints; it just | 
|  | 2475 | // inserts copies. | 
|  | 2476 |  | 
|  | 2477 | // Vector Absolute Differences. | 
|  | 2478 |  | 
|  | 2479 | //   VABD     : Vector Absolute Difference | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2480 | defm VABDs    : N3VInt_QHS<0, 0, 0b0111, 0, IIC_VBINi4D, IIC_VBINi4D, | 
|  | 2481 | IIC_VBINi4Q, IIC_VBINi4Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2482 | "vabd", "s", int_arm_neon_vabds, 0>; | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2483 | defm VABDu    : N3VInt_QHS<1, 0, 0b0111, 0, IIC_VBINi4D, IIC_VBINi4D, | 
|  | 2484 | IIC_VBINi4Q, IIC_VBINi4Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2485 | "vabd", "u", int_arm_neon_vabdu, 0>; | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2486 | def  VABDfd   : N3VDInt<1, 0, 0b10, 0b1101, 0, IIC_VBIND, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2487 | "vabd", "f32", v2f32, v2f32, int_arm_neon_vabds, 0>; | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2488 | def  VABDfq   : N3VQInt<1, 0, 0b10, 0b1101, 0, IIC_VBINQ, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2489 | "vabd", "f32", v4f32, v4f32, int_arm_neon_vabds, 0>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2490 |  | 
|  | 2491 | //   VABDL    : Vector Absolute Difference Long (Q = | D - D |) | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2492 | defm VABDLs   : N3VLInt_QHS<0,1,0b0111,0, IIC_VBINi4Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2493 | "vabdl", "s", int_arm_neon_vabdls, 0>; | 
| Evan Cheng | a33fc86 | 2009-11-21 06:21:52 +0000 | [diff] [blame] | 2494 | defm VABDLu   : N3VLInt_QHS<1,1,0b0111,0, IIC_VBINi4Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2495 | "vabdl", "u", int_arm_neon_vabdlu, 0>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2496 |  | 
|  | 2497 | //   VABA     : Vector Absolute Difference and Accumulate | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2498 | defm VABAs    : N3VInt3_QHS<0,0,0b0111,1, "vaba", "s", int_arm_neon_vabas>; | 
|  | 2499 | defm VABAu    : N3VInt3_QHS<1,0,0b0111,1, "vaba", "u", int_arm_neon_vabau>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2500 |  | 
|  | 2501 | //   VABAL    : Vector Absolute Difference and Accumulate Long (Q += | D - D |) | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2502 | defm VABALs   : N3VLInt3_QHS<0,1,0b0101,0, "vabal", "s", int_arm_neon_vabals>; | 
|  | 2503 | defm VABALu   : N3VLInt3_QHS<1,1,0b0101,0, "vabal", "u", int_arm_neon_vabalu>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2504 |  | 
|  | 2505 | // Vector Maximum and Minimum. | 
|  | 2506 |  | 
|  | 2507 | //   VMAX     : Vector Maximum | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2508 | defm VMAXs    : N3VInt_QHS<0,0,0b0110,0, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2509 | IIC_VBINi4Q, "vmax", "s", int_arm_neon_vmaxs, 1>; | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2510 | defm VMAXu    : N3VInt_QHS<1,0,0b0110,0, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2511 | IIC_VBINi4Q, "vmax", "u", int_arm_neon_vmaxu, 1>; | 
|  | 2512 | def  VMAXfd   : N3VDInt<0, 0, 0b00, 0b1111, 0, IIC_VBIND, "vmax", "f32", | 
|  | 2513 | v2f32, v2f32, int_arm_neon_vmaxs, 1>; | 
|  | 2514 | def  VMAXfq   : N3VQInt<0, 0, 0b00, 0b1111, 0, IIC_VBINQ, "vmax", "f32", | 
|  | 2515 | v4f32, v4f32, int_arm_neon_vmaxs, 1>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2516 |  | 
|  | 2517 | //   VMIN     : Vector Minimum | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2518 | defm VMINs    : N3VInt_QHS<0,0,0b0110,1, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2519 | IIC_VBINi4Q, "vmin", "s", int_arm_neon_vmins, 1>; | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2520 | defm VMINu    : N3VInt_QHS<1,0,0b0110,1, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2521 | IIC_VBINi4Q, "vmin", "u", int_arm_neon_vminu, 1>; | 
|  | 2522 | def  VMINfd   : N3VDInt<0, 0, 0b10, 0b1111, 0, IIC_VBIND, "vmin", "f32", | 
|  | 2523 | v2f32, v2f32, int_arm_neon_vmins, 1>; | 
|  | 2524 | def  VMINfq   : N3VQInt<0, 0, 0b10, 0b1111, 0, IIC_VBINQ, "vmin", "f32", | 
|  | 2525 | v4f32, v4f32, int_arm_neon_vmins, 1>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2526 |  | 
|  | 2527 | // Vector Pairwise Operations. | 
|  | 2528 |  | 
|  | 2529 | //   VPADD    : Vector Pairwise Add | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2530 | def  VPADDi8  : N3VDInt<0, 0, 0b00, 0b1011, 1, IIC_VBINiD, "vpadd", "i8", | 
|  | 2531 | v8i8, v8i8, int_arm_neon_vpadd, 0>; | 
|  | 2532 | def  VPADDi16 : N3VDInt<0, 0, 0b01, 0b1011, 1, IIC_VBINiD, "vpadd", "i16", | 
|  | 2533 | v4i16, v4i16, int_arm_neon_vpadd, 0>; | 
|  | 2534 | def  VPADDi32 : N3VDInt<0, 0, 0b10, 0b1011, 1, IIC_VBINiD, "vpadd", "i32", | 
|  | 2535 | v2i32, v2i32, int_arm_neon_vpadd, 0>; | 
|  | 2536 | def  VPADDf   : N3VDInt<1, 0, 0b00, 0b1101, 0, IIC_VBIND, "vpadd", "f32", | 
|  | 2537 | v2f32, v2f32, int_arm_neon_vpadd, 0>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2538 |  | 
|  | 2539 | //   VPADDL   : Vector Pairwise Add Long | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2540 | defm VPADDLs  : N2VPLInt_QHS<0b11, 0b11, 0b00, 0b00100, 0, "vpaddl", "s", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2541 | int_arm_neon_vpaddls>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2542 | defm VPADDLu  : N2VPLInt_QHS<0b11, 0b11, 0b00, 0b00101, 0, "vpaddl", "u", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2543 | int_arm_neon_vpaddlu>; | 
|  | 2544 |  | 
|  | 2545 | //   VPADAL   : Vector Pairwise Add and Accumulate Long | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2546 | defm VPADALs  : N2VPLInt2_QHS<0b11, 0b11, 0b00, 0b01100, 0, "vpadal", "s", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2547 | int_arm_neon_vpadals>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2548 | defm VPADALu  : N2VPLInt2_QHS<0b11, 0b11, 0b00, 0b01101, 0, "vpadal", "u", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2549 | int_arm_neon_vpadalu>; | 
|  | 2550 |  | 
|  | 2551 | //   VPMAX    : Vector Pairwise Maximum | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2552 | def  VPMAXs8  : N3VDInt<0, 0, 0b00, 0b1010, 0, IIC_VBINi4D, "vpmax", "s8", | 
|  | 2553 | v8i8, v8i8, int_arm_neon_vpmaxs, 0>; | 
|  | 2554 | def  VPMAXs16 : N3VDInt<0, 0, 0b01, 0b1010, 0, IIC_VBINi4D, "vpmax", "s16", | 
|  | 2555 | v4i16, v4i16, int_arm_neon_vpmaxs, 0>; | 
|  | 2556 | def  VPMAXs32 : N3VDInt<0, 0, 0b10, 0b1010, 0, IIC_VBINi4D, "vpmax", "s32", | 
|  | 2557 | v2i32, v2i32, int_arm_neon_vpmaxs, 0>; | 
|  | 2558 | def  VPMAXu8  : N3VDInt<1, 0, 0b00, 0b1010, 0, IIC_VBINi4D, "vpmax", "u8", | 
|  | 2559 | v8i8, v8i8, int_arm_neon_vpmaxu, 0>; | 
|  | 2560 | def  VPMAXu16 : N3VDInt<1, 0, 0b01, 0b1010, 0, IIC_VBINi4D, "vpmax", "u16", | 
|  | 2561 | v4i16, v4i16, int_arm_neon_vpmaxu, 0>; | 
|  | 2562 | def  VPMAXu32 : N3VDInt<1, 0, 0b10, 0b1010, 0, IIC_VBINi4D, "vpmax", "u32", | 
|  | 2563 | v2i32, v2i32, int_arm_neon_vpmaxu, 0>; | 
|  | 2564 | def  VPMAXf   : N3VDInt<1, 0, 0b00, 0b1111, 0, IIC_VBINi4D, "vpmax", "f32", | 
|  | 2565 | v2f32, v2f32, int_arm_neon_vpmaxs, 0>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2566 |  | 
|  | 2567 | //   VPMIN    : Vector Pairwise Minimum | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2568 | def  VPMINs8  : N3VDInt<0, 0, 0b00, 0b1010, 1, IIC_VBINi4D, "vpmin", "s8", | 
|  | 2569 | v8i8, v8i8, int_arm_neon_vpmins, 0>; | 
|  | 2570 | def  VPMINs16 : N3VDInt<0, 0, 0b01, 0b1010, 1, IIC_VBINi4D, "vpmin", "s16", | 
|  | 2571 | v4i16, v4i16, int_arm_neon_vpmins, 0>; | 
|  | 2572 | def  VPMINs32 : N3VDInt<0, 0, 0b10, 0b1010, 1, IIC_VBINi4D, "vpmin", "s32", | 
|  | 2573 | v2i32, v2i32, int_arm_neon_vpmins, 0>; | 
|  | 2574 | def  VPMINu8  : N3VDInt<1, 0, 0b00, 0b1010, 1, IIC_VBINi4D, "vpmin", "u8", | 
|  | 2575 | v8i8, v8i8, int_arm_neon_vpminu, 0>; | 
|  | 2576 | def  VPMINu16 : N3VDInt<1, 0, 0b01, 0b1010, 1, IIC_VBINi4D, "vpmin", "u16", | 
|  | 2577 | v4i16, v4i16, int_arm_neon_vpminu, 0>; | 
|  | 2578 | def  VPMINu32 : N3VDInt<1, 0, 0b10, 0b1010, 1, IIC_VBINi4D, "vpmin", "u32", | 
|  | 2579 | v2i32, v2i32, int_arm_neon_vpminu, 0>; | 
|  | 2580 | def  VPMINf   : N3VDInt<1, 0, 0b10, 0b1111, 0, IIC_VBINi4D, "vpmin", "f32", | 
|  | 2581 | v2f32, v2f32, int_arm_neon_vpmins, 0>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2582 |  | 
|  | 2583 | // Vector Reciprocal and Reciprocal Square Root Estimate and Step. | 
|  | 2584 |  | 
|  | 2585 | //   VRECPE   : Vector Reciprocal Estimate | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2586 | def  VRECPEd  : N2VDInt<0b11, 0b11, 0b10, 0b11, 0b01000, 0, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2587 | IIC_VUNAD, "vrecpe", "u32", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2588 | v2i32, v2i32, int_arm_neon_vrecpe>; | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2589 | def  VRECPEq  : N2VQInt<0b11, 0b11, 0b10, 0b11, 0b01000, 0, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2590 | IIC_VUNAQ, "vrecpe", "u32", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2591 | v4i32, v4i32, int_arm_neon_vrecpe>; | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2592 | def  VRECPEfd : N2VDInt<0b11, 0b11, 0b10, 0b11, 0b01010, 0, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2593 | IIC_VUNAD, "vrecpe", "f32", | 
| Bob Wilson | 12842f9 | 2009-08-11 05:39:44 +0000 | [diff] [blame] | 2594 | v2f32, v2f32, int_arm_neon_vrecpe>; | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2595 | def  VRECPEfq : N2VQInt<0b11, 0b11, 0b10, 0b11, 0b01010, 0, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2596 | IIC_VUNAQ, "vrecpe", "f32", | 
| Bob Wilson | 12842f9 | 2009-08-11 05:39:44 +0000 | [diff] [blame] | 2597 | v4f32, v4f32, int_arm_neon_vrecpe>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2598 |  | 
|  | 2599 | //   VRECPS   : Vector Reciprocal Step | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2600 | def  VRECPSfd : N3VDInt<0, 0, 0b00, 0b1111, 1, | 
|  | 2601 | IIC_VRECSD, "vrecps", "f32", | 
|  | 2602 | v2f32, v2f32, int_arm_neon_vrecps, 1>; | 
|  | 2603 | def  VRECPSfq : N3VQInt<0, 0, 0b00, 0b1111, 1, | 
|  | 2604 | IIC_VRECSQ, "vrecps", "f32", | 
|  | 2605 | v4f32, v4f32, int_arm_neon_vrecps, 1>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2606 |  | 
|  | 2607 | //   VRSQRTE  : Vector Reciprocal Square Root Estimate | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2608 | def  VRSQRTEd  : N2VDInt<0b11, 0b11, 0b10, 0b11, 0b01001, 0, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2609 | IIC_VUNAD, "vrsqrte", "u32", | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2610 | v2i32, v2i32, int_arm_neon_vrsqrte>; | 
|  | 2611 | def  VRSQRTEq  : N2VQInt<0b11, 0b11, 0b10, 0b11, 0b01001, 0, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2612 | IIC_VUNAQ, "vrsqrte", "u32", | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2613 | v4i32, v4i32, int_arm_neon_vrsqrte>; | 
|  | 2614 | def  VRSQRTEfd : N2VDInt<0b11, 0b11, 0b10, 0b11, 0b01011, 0, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2615 | IIC_VUNAD, "vrsqrte", "f32", | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2616 | v2f32, v2f32, int_arm_neon_vrsqrte>; | 
|  | 2617 | def  VRSQRTEfq : N2VQInt<0b11, 0b11, 0b10, 0b11, 0b01011, 0, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2618 | IIC_VUNAQ, "vrsqrte", "f32", | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2619 | v4f32, v4f32, int_arm_neon_vrsqrte>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2620 |  | 
|  | 2621 | //   VRSQRTS  : Vector Reciprocal Square Root Step | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2622 | def VRSQRTSfd : N3VDInt<0, 0, 0b10, 0b1111, 1, | 
|  | 2623 | IIC_VRECSD, "vrsqrts", "f32", | 
|  | 2624 | v2f32, v2f32, int_arm_neon_vrsqrts, 1>; | 
|  | 2625 | def VRSQRTSfq : N3VQInt<0, 0, 0b10, 0b1111, 1, | 
|  | 2626 | IIC_VRECSQ, "vrsqrts", "f32", | 
|  | 2627 | v4f32, v4f32, int_arm_neon_vrsqrts, 1>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2628 |  | 
|  | 2629 | // Vector Shifts. | 
|  | 2630 |  | 
|  | 2631 | //   VSHL     : Vector Shift | 
| Johnny Chen | 2cf0495 | 2010-03-26 21:26:28 +0000 | [diff] [blame^] | 2632 | defm VSHLs    : N3VSh_QHSD<0, 0, 0b0100, 0, IIC_VSHLiD, IIC_VSHLiD, IIC_VSHLiQ, | 
|  | 2633 | IIC_VSHLiQ, "vshl", "s", int_arm_neon_vshifts, 0>; | 
|  | 2634 | defm VSHLu    : N3VSh_QHSD<1, 0, 0b0100, 0, IIC_VSHLiD, IIC_VSHLiD, IIC_VSHLiQ, | 
|  | 2635 | IIC_VSHLiQ, "vshl", "u", int_arm_neon_vshiftu, 0>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2636 | //   VSHL     : Vector Shift Left (Immediate) | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2637 | defm VSHLi    : N2VSh_QHSD<0, 1, 0b0101, 1, IIC_VSHLiD, "vshl", "i", NEONvshl, | 
|  | 2638 | N2RegVShLFrm>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2639 | //   VSHR     : Vector Shift Right (Immediate) | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2640 | defm VSHRs    : N2VSh_QHSD<0, 1, 0b0000, 1, IIC_VSHLiD, "vshr", "s", NEONvshrs, | 
|  | 2641 | N2RegVShRFrm>; | 
|  | 2642 | defm VSHRu    : N2VSh_QHSD<1, 1, 0b0000, 1, IIC_VSHLiD, "vshr", "u", NEONvshru, | 
|  | 2643 | N2RegVShRFrm>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2644 |  | 
|  | 2645 | //   VSHLL    : Vector Shift Left Long | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2646 | defm VSHLLs   : N2VLSh_QHS<0, 1, 0b1010, 0, 0, 1, "vshll", "s", NEONvshlls>; | 
|  | 2647 | defm VSHLLu   : N2VLSh_QHS<1, 1, 0b1010, 0, 0, 1, "vshll", "u", NEONvshllu>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2648 |  | 
|  | 2649 | //   VSHLL    : Vector Shift Left Long (with maximum shift count) | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2650 | class N2VLShMax<bit op24, bit op23, bits<6> op21_16, bits<4> op11_8, bit op7, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2651 | bit op6, bit op4, string OpcodeStr, string Dt, ValueType ResTy, | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2652 | ValueType OpTy, SDNode OpNode> | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2653 | : N2VLSh<op24, op23, op11_8, op7, op6, op4, OpcodeStr, Dt, | 
|  | 2654 | ResTy, OpTy, OpNode> { | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2655 | let Inst{21-16} = op21_16; | 
|  | 2656 | } | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2657 | def  VSHLLi8  : N2VLShMax<1, 1, 0b110010, 0b0011, 0, 0, 0, "vshll", "i8", | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2658 | v8i16, v8i8, NEONvshlli>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2659 | def  VSHLLi16 : N2VLShMax<1, 1, 0b110110, 0b0011, 0, 0, 0, "vshll", "i16", | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2660 | v4i32, v4i16, NEONvshlli>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2661 | def  VSHLLi32 : N2VLShMax<1, 1, 0b111010, 0b0011, 0, 0, 0, "vshll", "i32", | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2662 | v2i64, v2i32, NEONvshlli>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2663 |  | 
|  | 2664 | //   VSHRN    : Vector Shift Right and Narrow | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2665 | defm VSHRN    : N2VNSh_HSD<0,1,0b1000,0,0,1, IIC_VSHLiD, "vshrn", "i", | 
|  | 2666 | NEONvshrn>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2667 |  | 
|  | 2668 | //   VRSHL    : Vector Rounding Shift | 
| Johnny Chen | 2cf0495 | 2010-03-26 21:26:28 +0000 | [diff] [blame^] | 2669 | defm VRSHLs   : N3VSh_QHSD<0,0,0b0101,0,IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, | 
|  | 2670 | IIC_VSHLi4Q,"vrshl", "s", int_arm_neon_vrshifts,0>; | 
|  | 2671 | defm VRSHLu   : N3VSh_QHSD<1,0,0b0101,0,IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, | 
|  | 2672 | IIC_VSHLi4Q,"vrshl", "u", int_arm_neon_vrshiftu,0>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2673 | //   VRSHR    : Vector Rounding Shift Right | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2674 | defm VRSHRs   : N2VSh_QHSD<0,1,0b0010,1, IIC_VSHLi4D, "vrshr", "s", NEONvrshrs, | 
|  | 2675 | N2RegVShRFrm>; | 
|  | 2676 | defm VRSHRu   : N2VSh_QHSD<1,1,0b0010,1, IIC_VSHLi4D, "vrshr", "u", NEONvrshru, | 
|  | 2677 | N2RegVShRFrm>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2678 |  | 
|  | 2679 | //   VRSHRN   : Vector Rounding Shift Right and Narrow | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2680 | defm VRSHRN   : N2VNSh_HSD<0, 1, 0b1000, 0, 1, 1, IIC_VSHLi4D, "vrshrn", "i", | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2681 | NEONvrshrn>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2682 |  | 
|  | 2683 | //   VQSHL    : Vector Saturating Shift | 
| Johnny Chen | 2cf0495 | 2010-03-26 21:26:28 +0000 | [diff] [blame^] | 2684 | defm VQSHLs   : N3VSh_QHSD<0,0,0b0100,1,IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, | 
|  | 2685 | IIC_VSHLi4Q, "vqshl", "s", int_arm_neon_vqshifts,0>; | 
|  | 2686 | defm VQSHLu   : N3VSh_QHSD<1,0,0b0100,1,IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, | 
|  | 2687 | IIC_VSHLi4Q, "vqshl", "u", int_arm_neon_vqshiftu,0>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2688 | //   VQSHL    : Vector Saturating Shift Left (Immediate) | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2689 | defm VQSHLsi  : N2VSh_QHSD<0,1,0b0111,1, IIC_VSHLi4D, "vqshl", "s",NEONvqshls, | 
|  | 2690 | N2RegVShLFrm>; | 
|  | 2691 | defm VQSHLui  : N2VSh_QHSD<1,1,0b0111,1, IIC_VSHLi4D, "vqshl", "u",NEONvqshlu, | 
|  | 2692 | N2RegVShLFrm>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2693 | //   VQSHLU   : Vector Saturating Shift Left (Immediate, Unsigned) | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2694 | defm VQSHLsu  : N2VSh_QHSD<1,1,0b0110,1, IIC_VSHLi4D,"vqshlu","s",NEONvqshlsu, | 
|  | 2695 | N2RegVShLFrm>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2696 |  | 
|  | 2697 | //   VQSHRN   : Vector Saturating Shift Right and Narrow | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2698 | defm VQSHRNs  : N2VNSh_HSD<0, 1, 0b1001, 0, 0, 1, IIC_VSHLi4D, "vqshrn", "s", | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2699 | NEONvqshrns>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2700 | defm VQSHRNu  : N2VNSh_HSD<1, 1, 0b1001, 0, 0, 1, IIC_VSHLi4D, "vqshrn", "u", | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2701 | NEONvqshrnu>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2702 |  | 
|  | 2703 | //   VQSHRUN  : Vector Saturating Shift Right and Narrow (Unsigned) | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2704 | defm VQSHRUN  : N2VNSh_HSD<1, 1, 0b1000, 0, 0, 1, IIC_VSHLi4D, "vqshrun", "s", | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2705 | NEONvqshrnsu>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2706 |  | 
|  | 2707 | //   VQRSHL   : Vector Saturating Rounding Shift | 
| Johnny Chen | 2cf0495 | 2010-03-26 21:26:28 +0000 | [diff] [blame^] | 2708 | defm VQRSHLs  : N3VSh_QHSD<0,0,0b0101,1, IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, | 
|  | 2709 | IIC_VSHLi4Q, "vqrshl", "s", | 
|  | 2710 | int_arm_neon_vqrshifts, 0>; | 
|  | 2711 | defm VQRSHLu  : N3VSh_QHSD<1,0,0b0101,1, IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, | 
|  | 2712 | IIC_VSHLi4Q, "vqrshl", "u", | 
|  | 2713 | int_arm_neon_vqrshiftu, 0>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2714 |  | 
|  | 2715 | //   VQRSHRN  : Vector Saturating Rounding Shift Right and Narrow | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2716 | defm VQRSHRNs : N2VNSh_HSD<0, 1, 0b1001, 0, 1, 1, IIC_VSHLi4D, "vqrshrn", "s", | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2717 | NEONvqrshrns>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2718 | defm VQRSHRNu : N2VNSh_HSD<1, 1, 0b1001, 0, 1, 1, IIC_VSHLi4D, "vqrshrn", "u", | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2719 | NEONvqrshrnu>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2720 |  | 
|  | 2721 | //   VQRSHRUN : Vector Saturating Rounding Shift Right and Narrow (Unsigned) | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2722 | defm VQRSHRUN : N2VNSh_HSD<1, 1, 0b1000, 0, 1, 1, IIC_VSHLi4D, "vqrshrun", "s", | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 2723 | NEONvqrshrnsu>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2724 |  | 
|  | 2725 | //   VSRA     : Vector Shift Right and Accumulate | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2726 | defm VSRAs    : N2VShAdd_QHSD<0, 1, 0b0001, 1, "vsra", "s", NEONvshrs>; | 
|  | 2727 | defm VSRAu    : N2VShAdd_QHSD<1, 1, 0b0001, 1, "vsra", "u", NEONvshru>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2728 | //   VRSRA    : Vector Rounding Shift Right and Accumulate | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2729 | defm VRSRAs   : N2VShAdd_QHSD<0, 1, 0b0011, 1, "vrsra", "s", NEONvrshrs>; | 
|  | 2730 | defm VRSRAu   : N2VShAdd_QHSD<1, 1, 0b0011, 1, "vrsra", "u", NEONvrshru>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2731 |  | 
|  | 2732 | //   VSLI     : Vector Shift Left and Insert | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2733 | defm VSLI     : N2VShIns_QHSD<1, 1, 0b0101, 1, "vsli", NEONvsli, N2RegVShLFrm>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2734 | //   VSRI     : Vector Shift Right and Insert | 
| Johnny Chen | 5d4e917 | 2010-03-26 01:07:59 +0000 | [diff] [blame] | 2735 | defm VSRI     : N2VShIns_QHSD<1, 1, 0b0100, 1, "vsri", NEONvsri, N2RegVShRFrm>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2736 |  | 
|  | 2737 | // Vector Absolute and Saturating Absolute. | 
|  | 2738 |  | 
|  | 2739 | //   VABS     : Vector Absolute Value | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2740 | defm VABS     : N2VInt_QHS<0b11, 0b11, 0b01, 0b00110, 0, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2741 | IIC_VUNAiD, IIC_VUNAiQ, "vabs", "s", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2742 | int_arm_neon_vabs>; | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2743 | def  VABSfd   : N2VDInt<0b11, 0b11, 0b10, 0b01, 0b01110, 0, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2744 | IIC_VUNAD, "vabs", "f32", | 
| Bob Wilson | 12842f9 | 2009-08-11 05:39:44 +0000 | [diff] [blame] | 2745 | v2f32, v2f32, int_arm_neon_vabs>; | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2746 | def  VABSfq   : N2VQInt<0b11, 0b11, 0b10, 0b01, 0b01110, 0, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2747 | IIC_VUNAQ, "vabs", "f32", | 
| Bob Wilson | 12842f9 | 2009-08-11 05:39:44 +0000 | [diff] [blame] | 2748 | v4f32, v4f32, int_arm_neon_vabs>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2749 |  | 
|  | 2750 | //   VQABS    : Vector Saturating Absolute Value | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2751 | defm VQABS    : N2VInt_QHS<0b11, 0b11, 0b00, 0b01110, 0, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2752 | IIC_VQUNAiD, IIC_VQUNAiQ, "vqabs", "s", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2753 | int_arm_neon_vqabs>; | 
|  | 2754 |  | 
|  | 2755 | // Vector Negate. | 
|  | 2756 |  | 
|  | 2757 | def vneg      : PatFrag<(ops node:$in), (sub immAllZerosV, node:$in)>; | 
|  | 2758 | def vneg_conv : PatFrag<(ops node:$in), (sub immAllZerosV_bc, node:$in)>; | 
|  | 2759 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2760 | class VNEGD<bits<2> size, string OpcodeStr, string Dt, ValueType Ty> | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2761 | : N2V<0b11, 0b11, size, 0b01, 0b00111, 0, 0, (outs DPR:$dst), (ins DPR:$src), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2762 | IIC_VSHLiD, OpcodeStr, Dt, "$dst, $src", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2763 | [(set DPR:$dst, (Ty (vneg DPR:$src)))]>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2764 | class VNEGQ<bits<2> size, string OpcodeStr, string Dt, ValueType Ty> | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2765 | : N2V<0b11, 0b11, size, 0b01, 0b00111, 1, 0, (outs QPR:$dst), (ins QPR:$src), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2766 | IIC_VSHLiD, OpcodeStr, Dt, "$dst, $src", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2767 | [(set QPR:$dst, (Ty (vneg QPR:$src)))]>; | 
|  | 2768 |  | 
|  | 2769 | //   VNEG     : Vector Negate | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2770 | def  VNEGs8d  : VNEGD<0b00, "vneg", "s8", v8i8>; | 
|  | 2771 | def  VNEGs16d : VNEGD<0b01, "vneg", "s16", v4i16>; | 
|  | 2772 | def  VNEGs32d : VNEGD<0b10, "vneg", "s32", v2i32>; | 
|  | 2773 | def  VNEGs8q  : VNEGQ<0b00, "vneg", "s8", v16i8>; | 
|  | 2774 | def  VNEGs16q : VNEGQ<0b01, "vneg", "s16", v8i16>; | 
|  | 2775 | def  VNEGs32q : VNEGQ<0b10, "vneg", "s32", v4i32>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2776 |  | 
|  | 2777 | //   VNEG     : Vector Negate (floating-point) | 
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 2778 | def  VNEGfd   : N2V<0b11, 0b11, 0b10, 0b01, 0b01111, 0, 0, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2779 | (outs DPR:$dst), (ins DPR:$src), IIC_VUNAD, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2780 | "vneg", "f32", "$dst, $src", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2781 | [(set DPR:$dst, (v2f32 (fneg DPR:$src)))]>; | 
|  | 2782 | def  VNEGf32q : N2V<0b11, 0b11, 0b10, 0b01, 0b01111, 1, 0, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 2783 | (outs QPR:$dst), (ins QPR:$src), IIC_VUNAQ, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2784 | "vneg", "f32", "$dst, $src", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2785 | [(set QPR:$dst, (v4f32 (fneg QPR:$src)))]>; | 
|  | 2786 |  | 
|  | 2787 | def : Pat<(v8i8 (vneg_conv DPR:$src)), (VNEGs8d DPR:$src)>; | 
|  | 2788 | def : Pat<(v4i16 (vneg_conv DPR:$src)), (VNEGs16d DPR:$src)>; | 
|  | 2789 | def : Pat<(v2i32 (vneg_conv DPR:$src)), (VNEGs32d DPR:$src)>; | 
|  | 2790 | def : Pat<(v16i8 (vneg_conv QPR:$src)), (VNEGs8q QPR:$src)>; | 
|  | 2791 | def : Pat<(v8i16 (vneg_conv QPR:$src)), (VNEGs16q QPR:$src)>; | 
|  | 2792 | def : Pat<(v4i32 (vneg_conv QPR:$src)), (VNEGs32q QPR:$src)>; | 
|  | 2793 |  | 
|  | 2794 | //   VQNEG    : Vector Saturating Negate | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2795 | defm VQNEG    : N2VInt_QHS<0b11, 0b11, 0b00, 0b01111, 0, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2796 | IIC_VQUNAiD, IIC_VQUNAiQ, "vqneg", "s", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2797 | int_arm_neon_vqneg>; | 
|  | 2798 |  | 
|  | 2799 | // Vector Bit Counting Operations. | 
|  | 2800 |  | 
|  | 2801 | //   VCLS     : Vector Count Leading Sign Bits | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2802 | defm VCLS     : N2VInt_QHS<0b11, 0b11, 0b00, 0b01000, 0, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2803 | IIC_VCNTiD, IIC_VCNTiQ, "vcls", "s", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2804 | int_arm_neon_vcls>; | 
|  | 2805 | //   VCLZ     : Vector Count Leading Zeros | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2806 | defm VCLZ     : N2VInt_QHS<0b11, 0b11, 0b00, 0b01001, 0, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2807 | IIC_VCNTiD, IIC_VCNTiQ, "vclz", "i", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2808 | int_arm_neon_vclz>; | 
|  | 2809 | //   VCNT     : Vector Count One Bits | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2810 | def  VCNTd    : N2VDInt<0b11, 0b11, 0b00, 0b00, 0b01010, 0, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2811 | IIC_VCNTiD, "vcnt", "8", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2812 | v8i8, v8i8, int_arm_neon_vcnt>; | 
| David Goodwin | afcaf79 | 2009-09-23 21:38:08 +0000 | [diff] [blame] | 2813 | def  VCNTq    : N2VQInt<0b11, 0b11, 0b00, 0b00, 0b01010, 0, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2814 | IIC_VCNTiQ, "vcnt", "8", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2815 | v16i8, v16i8, int_arm_neon_vcnt>; | 
|  | 2816 |  | 
| Johnny Chen | 86ba44a | 2010-02-24 20:06:07 +0000 | [diff] [blame] | 2817 | // Vector Swap -- for disassembly only. | 
|  | 2818 | def  VSWPd    : N2VX<0b11, 0b11, 0b00, 0b10, 0b00000, 0, 0, | 
|  | 2819 | (outs DPR:$dst), (ins DPR:$src), NoItinerary, | 
|  | 2820 | "vswp", "$dst, $src", "", []>; | 
|  | 2821 | def  VSWPq    : N2VX<0b11, 0b11, 0b00, 0b10, 0b00000, 1, 0, | 
|  | 2822 | (outs QPR:$dst), (ins QPR:$src), NoItinerary, | 
|  | 2823 | "vswp", "$dst, $src", "", []>; | 
|  | 2824 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2825 | // Vector Move Operations. | 
|  | 2826 |  | 
|  | 2827 | //   VMOV     : Vector Move (Register) | 
|  | 2828 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2829 | def  VMOVDneon: N3VX<0, 0, 0b10, 0b0001, 0, 1, (outs DPR:$dst), (ins DPR:$src), | 
| Johnny Chen | aa9b1c8 | 2010-03-24 01:29:25 +0000 | [diff] [blame] | 2830 | IIC_VMOVD, "vmov", "$dst, $src", "", []>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2831 | def  VMOVQ    : N3VX<0, 0, 0b10, 0b0001, 1, 1, (outs QPR:$dst), (ins QPR:$src), | 
| Johnny Chen | aa9b1c8 | 2010-03-24 01:29:25 +0000 | [diff] [blame] | 2832 | IIC_VMOVD, "vmov", "$dst, $src", "", []>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2833 |  | 
|  | 2834 | //   VMOV     : Vector Move (Immediate) | 
|  | 2835 |  | 
|  | 2836 | // VMOV_get_imm8 xform function: convert build_vector to VMOV.i8 imm. | 
|  | 2837 | def VMOV_get_imm8 : SDNodeXForm<build_vector, [{ | 
|  | 2838 | return ARM::getVMOVImm(N, 1, *CurDAG); | 
|  | 2839 | }]>; | 
|  | 2840 | def vmovImm8 : PatLeaf<(build_vector), [{ | 
|  | 2841 | return ARM::getVMOVImm(N, 1, *CurDAG).getNode() != 0; | 
|  | 2842 | }], VMOV_get_imm8>; | 
|  | 2843 |  | 
|  | 2844 | // VMOV_get_imm16 xform function: convert build_vector to VMOV.i16 imm. | 
|  | 2845 | def VMOV_get_imm16 : SDNodeXForm<build_vector, [{ | 
|  | 2846 | return ARM::getVMOVImm(N, 2, *CurDAG); | 
|  | 2847 | }]>; | 
|  | 2848 | def vmovImm16 : PatLeaf<(build_vector), [{ | 
|  | 2849 | return ARM::getVMOVImm(N, 2, *CurDAG).getNode() != 0; | 
|  | 2850 | }], VMOV_get_imm16>; | 
|  | 2851 |  | 
|  | 2852 | // VMOV_get_imm32 xform function: convert build_vector to VMOV.i32 imm. | 
|  | 2853 | def VMOV_get_imm32 : SDNodeXForm<build_vector, [{ | 
|  | 2854 | return ARM::getVMOVImm(N, 4, *CurDAG); | 
|  | 2855 | }]>; | 
|  | 2856 | def vmovImm32 : PatLeaf<(build_vector), [{ | 
|  | 2857 | return ARM::getVMOVImm(N, 4, *CurDAG).getNode() != 0; | 
|  | 2858 | }], VMOV_get_imm32>; | 
|  | 2859 |  | 
|  | 2860 | // VMOV_get_imm64 xform function: convert build_vector to VMOV.i64 imm. | 
|  | 2861 | def VMOV_get_imm64 : SDNodeXForm<build_vector, [{ | 
|  | 2862 | return ARM::getVMOVImm(N, 8, *CurDAG); | 
|  | 2863 | }]>; | 
|  | 2864 | def vmovImm64 : PatLeaf<(build_vector), [{ | 
|  | 2865 | return ARM::getVMOVImm(N, 8, *CurDAG).getNode() != 0; | 
|  | 2866 | }], VMOV_get_imm64>; | 
|  | 2867 |  | 
|  | 2868 | // Note: Some of the cmode bits in the following VMOV instructions need to | 
|  | 2869 | // be encoded based on the immed values. | 
|  | 2870 |  | 
|  | 2871 | def VMOVv8i8  : N1ModImm<1, 0b000, 0b1110, 0, 0, 0, 1, (outs DPR:$dst), | 
| Bob Wilson | d95ccd6 | 2009-11-06 23:33:28 +0000 | [diff] [blame] | 2872 | (ins h8imm:$SIMM), IIC_VMOVImm, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2873 | "vmov", "i8", "$dst, $SIMM", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2874 | [(set DPR:$dst, (v8i8 vmovImm8:$SIMM))]>; | 
|  | 2875 | def VMOVv16i8 : N1ModImm<1, 0b000, 0b1110, 0, 1, 0, 1, (outs QPR:$dst), | 
| Bob Wilson | d95ccd6 | 2009-11-06 23:33:28 +0000 | [diff] [blame] | 2876 | (ins h8imm:$SIMM), IIC_VMOVImm, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2877 | "vmov", "i8", "$dst, $SIMM", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2878 | [(set QPR:$dst, (v16i8 vmovImm8:$SIMM))]>; | 
|  | 2879 |  | 
| Johnny Chen | ee536b0 | 2009-12-01 00:02:02 +0000 | [diff] [blame] | 2880 | def VMOVv4i16 : N1ModImm<1, 0b000, {1,0,?,?}, 0, 0, {?}, 1, (outs DPR:$dst), | 
| Bob Wilson | d95ccd6 | 2009-11-06 23:33:28 +0000 | [diff] [blame] | 2881 | (ins h16imm:$SIMM), IIC_VMOVImm, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2882 | "vmov", "i16", "$dst, $SIMM", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2883 | [(set DPR:$dst, (v4i16 vmovImm16:$SIMM))]>; | 
| Johnny Chen | ee536b0 | 2009-12-01 00:02:02 +0000 | [diff] [blame] | 2884 | def VMOVv8i16 : N1ModImm<1, 0b000, {1,0,?,?}, 0, 1, {?}, 1, (outs QPR:$dst), | 
| Bob Wilson | d95ccd6 | 2009-11-06 23:33:28 +0000 | [diff] [blame] | 2885 | (ins h16imm:$SIMM), IIC_VMOVImm, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2886 | "vmov", "i16", "$dst, $SIMM", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2887 | [(set QPR:$dst, (v8i16 vmovImm16:$SIMM))]>; | 
|  | 2888 |  | 
| Johnny Chen | ee536b0 | 2009-12-01 00:02:02 +0000 | [diff] [blame] | 2889 | def VMOVv2i32 : N1ModImm<1, 0b000, {?,?,?,?}, 0, 0, {?}, 1, (outs DPR:$dst), | 
| Bob Wilson | d95ccd6 | 2009-11-06 23:33:28 +0000 | [diff] [blame] | 2890 | (ins h32imm:$SIMM), IIC_VMOVImm, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2891 | "vmov", "i32", "$dst, $SIMM", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2892 | [(set DPR:$dst, (v2i32 vmovImm32:$SIMM))]>; | 
| Johnny Chen | ee536b0 | 2009-12-01 00:02:02 +0000 | [diff] [blame] | 2893 | def VMOVv4i32 : N1ModImm<1, 0b000, {?,?,?,?}, 0, 1, {?}, 1, (outs QPR:$dst), | 
| Bob Wilson | d95ccd6 | 2009-11-06 23:33:28 +0000 | [diff] [blame] | 2894 | (ins h32imm:$SIMM), IIC_VMOVImm, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2895 | "vmov", "i32", "$dst, $SIMM", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2896 | [(set QPR:$dst, (v4i32 vmovImm32:$SIMM))]>; | 
|  | 2897 |  | 
|  | 2898 | def VMOVv1i64 : N1ModImm<1, 0b000, 0b1110, 0, 0, 1, 1, (outs DPR:$dst), | 
| Bob Wilson | d95ccd6 | 2009-11-06 23:33:28 +0000 | [diff] [blame] | 2899 | (ins h64imm:$SIMM), IIC_VMOVImm, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2900 | "vmov", "i64", "$dst, $SIMM", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2901 | [(set DPR:$dst, (v1i64 vmovImm64:$SIMM))]>; | 
|  | 2902 | def VMOVv2i64 : N1ModImm<1, 0b000, 0b1110, 0, 1, 1, 1, (outs QPR:$dst), | 
| Bob Wilson | d95ccd6 | 2009-11-06 23:33:28 +0000 | [diff] [blame] | 2903 | (ins h64imm:$SIMM), IIC_VMOVImm, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2904 | "vmov", "i64", "$dst, $SIMM", "", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2905 | [(set QPR:$dst, (v2i64 vmovImm64:$SIMM))]>; | 
|  | 2906 |  | 
|  | 2907 | //   VMOV     : Vector Get Lane (move scalar to ARM core register) | 
|  | 2908 |  | 
| Johnny Chen | ebc60ef | 2009-11-23 17:48:17 +0000 | [diff] [blame] | 2909 | def VGETLNs8  : NVGetLane<{1,1,1,0,0,1,?,1}, 0b1011, {?,?}, | 
| Bob Wilson | ceffeb6 | 2009-08-21 21:58:55 +0000 | [diff] [blame] | 2910 | (outs GPR:$dst), (ins DPR:$src, nohash_imm:$lane), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2911 | IIC_VMOVSI, "vmov", "s8", "$dst, $src[$lane]", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2912 | [(set GPR:$dst, (NEONvgetlanes (v8i8 DPR:$src), | 
|  | 2913 | imm:$lane))]>; | 
| Johnny Chen | ebc60ef | 2009-11-23 17:48:17 +0000 | [diff] [blame] | 2914 | def VGETLNs16 : NVGetLane<{1,1,1,0,0,0,?,1}, 0b1011, {?,1}, | 
| Bob Wilson | ceffeb6 | 2009-08-21 21:58:55 +0000 | [diff] [blame] | 2915 | (outs GPR:$dst), (ins DPR:$src, nohash_imm:$lane), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2916 | IIC_VMOVSI, "vmov", "s16", "$dst, $src[$lane]", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2917 | [(set GPR:$dst, (NEONvgetlanes (v4i16 DPR:$src), | 
|  | 2918 | imm:$lane))]>; | 
| Johnny Chen | ebc60ef | 2009-11-23 17:48:17 +0000 | [diff] [blame] | 2919 | def VGETLNu8  : NVGetLane<{1,1,1,0,1,1,?,1}, 0b1011, {?,?}, | 
| Bob Wilson | ceffeb6 | 2009-08-21 21:58:55 +0000 | [diff] [blame] | 2920 | (outs GPR:$dst), (ins DPR:$src, nohash_imm:$lane), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2921 | IIC_VMOVSI, "vmov", "u8", "$dst, $src[$lane]", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2922 | [(set GPR:$dst, (NEONvgetlaneu (v8i8 DPR:$src), | 
|  | 2923 | imm:$lane))]>; | 
| Johnny Chen | ebc60ef | 2009-11-23 17:48:17 +0000 | [diff] [blame] | 2924 | def VGETLNu16 : NVGetLane<{1,1,1,0,1,0,?,1}, 0b1011, {?,1}, | 
| Bob Wilson | ceffeb6 | 2009-08-21 21:58:55 +0000 | [diff] [blame] | 2925 | (outs GPR:$dst), (ins DPR:$src, nohash_imm:$lane), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2926 | IIC_VMOVSI, "vmov", "u16", "$dst, $src[$lane]", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2927 | [(set GPR:$dst, (NEONvgetlaneu (v4i16 DPR:$src), | 
|  | 2928 | imm:$lane))]>; | 
| Johnny Chen | ebc60ef | 2009-11-23 17:48:17 +0000 | [diff] [blame] | 2929 | def VGETLNi32 : NVGetLane<{1,1,1,0,0,0,?,1}, 0b1011, 0b00, | 
| Bob Wilson | ceffeb6 | 2009-08-21 21:58:55 +0000 | [diff] [blame] | 2930 | (outs GPR:$dst), (ins DPR:$src, nohash_imm:$lane), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2931 | IIC_VMOVSI, "vmov", "32", "$dst, $src[$lane]", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2932 | [(set GPR:$dst, (extractelt (v2i32 DPR:$src), | 
|  | 2933 | imm:$lane))]>; | 
|  | 2934 | // def VGETLNf32: see FMRDH and FMRDL in ARMInstrVFP.td | 
|  | 2935 | def : Pat<(NEONvgetlanes (v16i8 QPR:$src), imm:$lane), | 
|  | 2936 | (VGETLNs8 (v8i8 (EXTRACT_SUBREG QPR:$src, | 
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2937 | (DSubReg_i8_reg imm:$lane))), | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2938 | (SubReg_i8_lane imm:$lane))>; | 
|  | 2939 | def : Pat<(NEONvgetlanes (v8i16 QPR:$src), imm:$lane), | 
|  | 2940 | (VGETLNs16 (v4i16 (EXTRACT_SUBREG QPR:$src, | 
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2941 | (DSubReg_i16_reg imm:$lane))), | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2942 | (SubReg_i16_lane imm:$lane))>; | 
|  | 2943 | def : Pat<(NEONvgetlaneu (v16i8 QPR:$src), imm:$lane), | 
|  | 2944 | (VGETLNu8 (v8i8 (EXTRACT_SUBREG QPR:$src, | 
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2945 | (DSubReg_i8_reg imm:$lane))), | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2946 | (SubReg_i8_lane imm:$lane))>; | 
|  | 2947 | def : Pat<(NEONvgetlaneu (v8i16 QPR:$src), imm:$lane), | 
|  | 2948 | (VGETLNu16 (v4i16 (EXTRACT_SUBREG QPR:$src, | 
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2949 | (DSubReg_i16_reg imm:$lane))), | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2950 | (SubReg_i16_lane imm:$lane))>; | 
|  | 2951 | def : Pat<(extractelt (v4i32 QPR:$src), imm:$lane), | 
|  | 2952 | (VGETLNi32 (v2i32 (EXTRACT_SUBREG QPR:$src, | 
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2953 | (DSubReg_i32_reg imm:$lane))), | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2954 | (SubReg_i32_lane imm:$lane))>; | 
| Anton Korobeynikov | cd41d07 | 2009-08-28 23:41:26 +0000 | [diff] [blame] | 2955 | def : Pat<(extractelt (v2f32 DPR:$src1), imm:$src2), | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2956 | (EXTRACT_SUBREG (v2f32 (COPY_TO_REGCLASS (v2f32 DPR:$src1),DPR_VFP2)), | 
| Anton Korobeynikov | 8d0fbeb | 2009-09-12 22:21:08 +0000 | [diff] [blame] | 2957 | (SSubReg_f32_reg imm:$src2))>; | 
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2958 | def : Pat<(extractelt (v4f32 QPR:$src1), imm:$src2), | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 2959 | (EXTRACT_SUBREG (v4f32 (COPY_TO_REGCLASS (v4f32 QPR:$src1),QPR_VFP2)), | 
| Anton Korobeynikov | 8d0fbeb | 2009-09-12 22:21:08 +0000 | [diff] [blame] | 2960 | (SSubReg_f32_reg imm:$src2))>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2961 | //def : Pat<(extractelt (v2i64 QPR:$src1), imm:$src2), | 
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2962 | //          (EXTRACT_SUBREG QPR:$src1, (DSubReg_f64_reg imm:$src2))>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2963 | def : Pat<(extractelt (v2f64 QPR:$src1), imm:$src2), | 
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2964 | (EXTRACT_SUBREG QPR:$src1, (DSubReg_f64_reg imm:$src2))>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2965 |  | 
|  | 2966 |  | 
|  | 2967 | //   VMOV     : Vector Set Lane (move ARM core register to scalar) | 
|  | 2968 |  | 
|  | 2969 | let Constraints = "$src1 = $dst" in { | 
| Johnny Chen | ebc60ef | 2009-11-23 17:48:17 +0000 | [diff] [blame] | 2970 | def VSETLNi8  : NVSetLane<{1,1,1,0,0,1,?,0}, 0b1011, {?,?}, (outs DPR:$dst), | 
| Bob Wilson | ceffeb6 | 2009-08-21 21:58:55 +0000 | [diff] [blame] | 2971 | (ins DPR:$src1, GPR:$src2, nohash_imm:$lane), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2972 | IIC_VMOVISL, "vmov", "8", "$dst[$lane], $src2", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2973 | [(set DPR:$dst, (vector_insert (v8i8 DPR:$src1), | 
|  | 2974 | GPR:$src2, imm:$lane))]>; | 
| Johnny Chen | ebc60ef | 2009-11-23 17:48:17 +0000 | [diff] [blame] | 2975 | def VSETLNi16 : NVSetLane<{1,1,1,0,0,0,?,0}, 0b1011, {?,1}, (outs DPR:$dst), | 
| Bob Wilson | ceffeb6 | 2009-08-21 21:58:55 +0000 | [diff] [blame] | 2976 | (ins DPR:$src1, GPR:$src2, nohash_imm:$lane), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2977 | IIC_VMOVISL, "vmov", "16", "$dst[$lane], $src2", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2978 | [(set DPR:$dst, (vector_insert (v4i16 DPR:$src1), | 
|  | 2979 | GPR:$src2, imm:$lane))]>; | 
| Johnny Chen | ebc60ef | 2009-11-23 17:48:17 +0000 | [diff] [blame] | 2980 | def VSETLNi32 : NVSetLane<{1,1,1,0,0,0,?,0}, 0b1011, 0b00, (outs DPR:$dst), | 
| Bob Wilson | ceffeb6 | 2009-08-21 21:58:55 +0000 | [diff] [blame] | 2981 | (ins DPR:$src1, GPR:$src2, nohash_imm:$lane), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 2982 | IIC_VMOVISL, "vmov", "32", "$dst[$lane], $src2", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2983 | [(set DPR:$dst, (insertelt (v2i32 DPR:$src1), | 
|  | 2984 | GPR:$src2, imm:$lane))]>; | 
|  | 2985 | } | 
|  | 2986 | def : Pat<(vector_insert (v16i8 QPR:$src1), GPR:$src2, imm:$lane), | 
|  | 2987 | (v16i8 (INSERT_SUBREG QPR:$src1, | 
| Chris Lattner | b8a7427 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 2988 | (v8i8 (VSETLNi8 (v8i8 (EXTRACT_SUBREG QPR:$src1, | 
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2989 | (DSubReg_i8_reg imm:$lane))), | 
| Chris Lattner | b8a7427 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 2990 | GPR:$src2, (SubReg_i8_lane imm:$lane))), | 
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2991 | (DSubReg_i8_reg imm:$lane)))>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2992 | def : Pat<(vector_insert (v8i16 QPR:$src1), GPR:$src2, imm:$lane), | 
|  | 2993 | (v8i16 (INSERT_SUBREG QPR:$src1, | 
| Chris Lattner | b8a7427 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 2994 | (v4i16 (VSETLNi16 (v4i16 (EXTRACT_SUBREG QPR:$src1, | 
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2995 | (DSubReg_i16_reg imm:$lane))), | 
| Chris Lattner | b8a7427 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 2996 | GPR:$src2, (SubReg_i16_lane imm:$lane))), | 
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 2997 | (DSubReg_i16_reg imm:$lane)))>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2998 | def : Pat<(insertelt (v4i32 QPR:$src1), GPR:$src2, imm:$lane), | 
|  | 2999 | (v4i32 (INSERT_SUBREG QPR:$src1, | 
| Chris Lattner | b8a7427 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 3000 | (v2i32 (VSETLNi32 (v2i32 (EXTRACT_SUBREG QPR:$src1, | 
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 3001 | (DSubReg_i32_reg imm:$lane))), | 
| Chris Lattner | b8a7427 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 3002 | GPR:$src2, (SubReg_i32_lane imm:$lane))), | 
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 3003 | (DSubReg_i32_reg imm:$lane)))>; | 
|  | 3004 |  | 
| Anton Korobeynikov | 3681144 | 2009-08-30 19:06:39 +0000 | [diff] [blame] | 3005 | def : Pat<(v2f32 (insertelt DPR:$src1, SPR:$src2, imm:$src3)), | 
| Anton Korobeynikov | 0f38d98 | 2009-11-02 00:11:39 +0000 | [diff] [blame] | 3006 | (INSERT_SUBREG (v2f32 (COPY_TO_REGCLASS DPR:$src1, DPR_VFP2)), | 
|  | 3007 | SPR:$src2, (SSubReg_f32_reg imm:$src3))>; | 
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 3008 | def : Pat<(v4f32 (insertelt QPR:$src1, SPR:$src2, imm:$src3)), | 
| Anton Korobeynikov | 0f38d98 | 2009-11-02 00:11:39 +0000 | [diff] [blame] | 3009 | (INSERT_SUBREG (v4f32 (COPY_TO_REGCLASS QPR:$src1, QPR_VFP2)), | 
|  | 3010 | SPR:$src2, (SSubReg_f32_reg imm:$src3))>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3011 |  | 
|  | 3012 | //def : Pat<(v2i64 (insertelt QPR:$src1, DPR:$src2, imm:$src3)), | 
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 3013 | //          (INSERT_SUBREG QPR:$src1, DPR:$src2, (DSubReg_f64_reg imm:$src3))>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3014 | def : Pat<(v2f64 (insertelt QPR:$src1, DPR:$src2, imm:$src3)), | 
| Anton Korobeynikov | 7167f33 | 2009-08-08 14:06:07 +0000 | [diff] [blame] | 3015 | (INSERT_SUBREG QPR:$src1, DPR:$src2, (DSubReg_f64_reg imm:$src3))>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3016 |  | 
| Anton Korobeynikov | 58ebae4 | 2009-08-27 14:38:44 +0000 | [diff] [blame] | 3017 | def : Pat<(v2f32 (scalar_to_vector SPR:$src)), | 
|  | 3018 | (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), SPR:$src, arm_ssubreg_0)>; | 
| Chris Lattner | ce81b3c | 2010-03-15 00:52:43 +0000 | [diff] [blame] | 3019 | def : Pat<(v2f64 (scalar_to_vector (f64 DPR:$src))), | 
| Anton Korobeynikov | 58ebae4 | 2009-08-27 14:38:44 +0000 | [diff] [blame] | 3020 | (INSERT_SUBREG (v2f64 (IMPLICIT_DEF)), DPR:$src, arm_dsubreg_0)>; | 
|  | 3021 | def : Pat<(v4f32 (scalar_to_vector SPR:$src)), | 
|  | 3022 | (INSERT_SUBREG (v4f32 (IMPLICIT_DEF)), SPR:$src, arm_ssubreg_0)>; | 
|  | 3023 |  | 
| Anton Korobeynikov | 076f105 | 2009-08-27 16:10:17 +0000 | [diff] [blame] | 3024 | def : Pat<(v8i8 (scalar_to_vector GPR:$src)), | 
|  | 3025 | (VSETLNi8  (v8i8  (IMPLICIT_DEF)), GPR:$src, (i32 0))>; | 
|  | 3026 | def : Pat<(v4i16 (scalar_to_vector GPR:$src)), | 
|  | 3027 | (VSETLNi16 (v4i16 (IMPLICIT_DEF)), GPR:$src, (i32 0))>; | 
|  | 3028 | def : Pat<(v2i32 (scalar_to_vector GPR:$src)), | 
|  | 3029 | (VSETLNi32 (v2i32 (IMPLICIT_DEF)), GPR:$src, (i32 0))>; | 
|  | 3030 |  | 
|  | 3031 | def : Pat<(v16i8 (scalar_to_vector GPR:$src)), | 
|  | 3032 | (INSERT_SUBREG (v16i8 (IMPLICIT_DEF)), | 
|  | 3033 | (VSETLNi8 (v8i8 (IMPLICIT_DEF)), GPR:$src, (i32 0)), | 
|  | 3034 | arm_dsubreg_0)>; | 
|  | 3035 | def : Pat<(v8i16 (scalar_to_vector GPR:$src)), | 
|  | 3036 | (INSERT_SUBREG (v8i16 (IMPLICIT_DEF)), | 
|  | 3037 | (VSETLNi16 (v4i16 (IMPLICIT_DEF)), GPR:$src, (i32 0)), | 
|  | 3038 | arm_dsubreg_0)>; | 
|  | 3039 | def : Pat<(v4i32 (scalar_to_vector GPR:$src)), | 
|  | 3040 | (INSERT_SUBREG (v4i32 (IMPLICIT_DEF)), | 
|  | 3041 | (VSETLNi32 (v2i32 (IMPLICIT_DEF)), GPR:$src, (i32 0)), | 
|  | 3042 | arm_dsubreg_0)>; | 
|  | 3043 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3044 | //   VDUP     : Vector Duplicate (from ARM core register to all elements) | 
|  | 3045 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3046 | class VDUPD<bits<8> opcod1, bits<2> opcod3, string Dt, ValueType Ty> | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3047 | : NVDup<opcod1, 0b1011, opcod3, (outs DPR:$dst), (ins GPR:$src), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3048 | IIC_VMOVIS, "vdup", Dt, "$dst, $src", | 
| Bob Wilson | eb54d51 | 2009-08-14 05:13:08 +0000 | [diff] [blame] | 3049 | [(set DPR:$dst, (Ty (NEONvdup (i32 GPR:$src))))]>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3050 | class VDUPQ<bits<8> opcod1, bits<2> opcod3, string Dt, ValueType Ty> | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3051 | : NVDup<opcod1, 0b1011, opcod3, (outs QPR:$dst), (ins GPR:$src), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3052 | IIC_VMOVIS, "vdup", Dt, "$dst, $src", | 
| Bob Wilson | eb54d51 | 2009-08-14 05:13:08 +0000 | [diff] [blame] | 3053 | [(set QPR:$dst, (Ty (NEONvdup (i32 GPR:$src))))]>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3054 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3055 | def  VDUP8d   : VDUPD<0b11101100, 0b00, "8", v8i8>; | 
|  | 3056 | def  VDUP16d  : VDUPD<0b11101000, 0b01, "16", v4i16>; | 
|  | 3057 | def  VDUP32d  : VDUPD<0b11101000, 0b00, "32", v2i32>; | 
|  | 3058 | def  VDUP8q   : VDUPQ<0b11101110, 0b00, "8", v16i8>; | 
|  | 3059 | def  VDUP16q  : VDUPQ<0b11101010, 0b01, "16", v8i16>; | 
|  | 3060 | def  VDUP32q  : VDUPQ<0b11101010, 0b00, "32", v4i32>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3061 |  | 
|  | 3062 | def  VDUPfd   : NVDup<0b11101000, 0b1011, 0b00, (outs DPR:$dst), (ins GPR:$src), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3063 | IIC_VMOVIS, "vdup", "32", "$dst, $src", | 
| Bob Wilson | eb54d51 | 2009-08-14 05:13:08 +0000 | [diff] [blame] | 3064 | [(set DPR:$dst, (v2f32 (NEONvdup | 
|  | 3065 | (f32 (bitconvert GPR:$src)))))]>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3066 | def  VDUPfq   : NVDup<0b11101010, 0b1011, 0b00, (outs QPR:$dst), (ins GPR:$src), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3067 | IIC_VMOVIS, "vdup", "32", "$dst, $src", | 
| Bob Wilson | eb54d51 | 2009-08-14 05:13:08 +0000 | [diff] [blame] | 3068 | [(set QPR:$dst, (v4f32 (NEONvdup | 
|  | 3069 | (f32 (bitconvert GPR:$src)))))]>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3070 |  | 
|  | 3071 | //   VDUP     : Vector Duplicate Lane (from scalar to all elements) | 
|  | 3072 |  | 
| Johnny Chen | 45ab3f3 | 2010-03-25 17:01:27 +0000 | [diff] [blame] | 3073 | class VDUPLND<bits<4> op19_16, string OpcodeStr, string Dt, | 
|  | 3074 | ValueType Ty> | 
|  | 3075 | : NVDupLane<op19_16, 0, (outs DPR:$dst), (ins DPR:$src, nohash_imm:$lane), | 
|  | 3076 | IIC_VMOVD, OpcodeStr, Dt, "$dst, $src[$lane]", | 
|  | 3077 | [(set DPR:$dst, (Ty (NEONvduplane (Ty DPR:$src), imm:$lane)))]>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3078 |  | 
| Johnny Chen | 45ab3f3 | 2010-03-25 17:01:27 +0000 | [diff] [blame] | 3079 | class VDUPLNQ<bits<4> op19_16, string OpcodeStr, string Dt, | 
| Johnny Chen | b6528d3 | 2009-11-23 21:00:43 +0000 | [diff] [blame] | 3080 | ValueType ResTy, ValueType OpTy> | 
| Johnny Chen | 45ab3f3 | 2010-03-25 17:01:27 +0000 | [diff] [blame] | 3081 | : NVDupLane<op19_16, 1, (outs QPR:$dst), (ins DPR:$src, nohash_imm:$lane), | 
|  | 3082 | IIC_VMOVD, OpcodeStr, Dt, "$dst, $src[$lane]", | 
|  | 3083 | [(set QPR:$dst, (ResTy (NEONvduplane (OpTy DPR:$src), | 
|  | 3084 | imm:$lane)))]>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3085 |  | 
| Bob Wilson | bd3650c | 2009-10-21 02:15:46 +0000 | [diff] [blame] | 3086 | // Inst{19-16} is partially specified depending on the element size. | 
|  | 3087 |  | 
| Johnny Chen | 45ab3f3 | 2010-03-25 17:01:27 +0000 | [diff] [blame] | 3088 | def VDUPLN8d  : VDUPLND<{?,?,?,1}, "vdup", "8", v8i8>; | 
|  | 3089 | def VDUPLN16d : VDUPLND<{?,?,1,0}, "vdup", "16", v4i16>; | 
|  | 3090 | def VDUPLN32d : VDUPLND<{?,1,0,0}, "vdup", "32", v2i32>; | 
|  | 3091 | def VDUPLNfd  : VDUPLND<{?,1,0,0}, "vdup", "32", v2f32>; | 
|  | 3092 | def VDUPLN8q  : VDUPLNQ<{?,?,?,1}, "vdup", "8", v16i8, v8i8>; | 
|  | 3093 | def VDUPLN16q : VDUPLNQ<{?,?,1,0}, "vdup", "16", v8i16, v4i16>; | 
|  | 3094 | def VDUPLN32q : VDUPLNQ<{?,1,0,0}, "vdup", "32", v4i32, v2i32>; | 
|  | 3095 | def VDUPLNfq  : VDUPLNQ<{?,1,0,0}, "vdup", "32", v4f32, v2f32>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3096 |  | 
| Bob Wilson | cce31f6 | 2009-08-14 05:08:32 +0000 | [diff] [blame] | 3097 | def : Pat<(v16i8 (NEONvduplane (v16i8 QPR:$src), imm:$lane)), | 
|  | 3098 | (v16i8 (VDUPLN8q (v8i8 (EXTRACT_SUBREG QPR:$src, | 
|  | 3099 | (DSubReg_i8_reg imm:$lane))), | 
|  | 3100 | (SubReg_i8_lane imm:$lane)))>; | 
|  | 3101 | def : Pat<(v8i16 (NEONvduplane (v8i16 QPR:$src), imm:$lane)), | 
|  | 3102 | (v8i16 (VDUPLN16q (v4i16 (EXTRACT_SUBREG QPR:$src, | 
|  | 3103 | (DSubReg_i16_reg imm:$lane))), | 
|  | 3104 | (SubReg_i16_lane imm:$lane)))>; | 
|  | 3105 | def : Pat<(v4i32 (NEONvduplane (v4i32 QPR:$src), imm:$lane)), | 
|  | 3106 | (v4i32 (VDUPLN32q (v2i32 (EXTRACT_SUBREG QPR:$src, | 
|  | 3107 | (DSubReg_i32_reg imm:$lane))), | 
|  | 3108 | (SubReg_i32_lane imm:$lane)))>; | 
|  | 3109 | def : Pat<(v4f32 (NEONvduplane (v4f32 QPR:$src), imm:$lane)), | 
|  | 3110 | (v4f32 (VDUPLNfq (v2f32 (EXTRACT_SUBREG QPR:$src, | 
|  | 3111 | (DSubReg_i32_reg imm:$lane))), | 
|  | 3112 | (SubReg_i32_lane imm:$lane)))>; | 
|  | 3113 |  | 
| Johnny Chen | b6528d3 | 2009-11-23 21:00:43 +0000 | [diff] [blame] | 3114 | def  VDUPfdf  : N2V<0b11, 0b11, {?,1}, {0,0}, 0b11000, 0, 0, | 
|  | 3115 | (outs DPR:$dst), (ins SPR:$src), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3116 | IIC_VMOVD, "vdup", "32", "$dst, ${src:lane}", "", | 
| Johnny Chen | b6528d3 | 2009-11-23 21:00:43 +0000 | [diff] [blame] | 3117 | [(set DPR:$dst, (v2f32 (NEONvdup (f32 SPR:$src))))]>; | 
| Anton Korobeynikov | 23b28cb | 2009-08-07 22:36:50 +0000 | [diff] [blame] | 3118 |  | 
| Johnny Chen | b6528d3 | 2009-11-23 21:00:43 +0000 | [diff] [blame] | 3119 | def  VDUPfqf  : N2V<0b11, 0b11, {?,1}, {0,0}, 0b11000, 1, 0, | 
|  | 3120 | (outs QPR:$dst), (ins SPR:$src), | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3121 | IIC_VMOVD, "vdup", "32", "$dst, ${src:lane}", "", | 
| Johnny Chen | b6528d3 | 2009-11-23 21:00:43 +0000 | [diff] [blame] | 3122 | [(set QPR:$dst, (v4f32 (NEONvdup (f32 SPR:$src))))]>; | 
| Anton Korobeynikov | 23b28cb | 2009-08-07 22:36:50 +0000 | [diff] [blame] | 3123 |  | 
| Anton Korobeynikov | f0da41c | 2009-09-02 21:21:28 +0000 | [diff] [blame] | 3124 | def : Pat<(v2i64 (NEONvduplane (v2i64 QPR:$src), imm:$lane)), | 
|  | 3125 | (INSERT_SUBREG QPR:$src, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 3126 | (i64 (EXTRACT_SUBREG QPR:$src, | 
|  | 3127 | (DSubReg_f64_reg imm:$lane))), | 
| Anton Korobeynikov | f0da41c | 2009-09-02 21:21:28 +0000 | [diff] [blame] | 3128 | (DSubReg_f64_other_reg imm:$lane))>; | 
|  | 3129 | def : Pat<(v2f64 (NEONvduplane (v2f64 QPR:$src), imm:$lane)), | 
|  | 3130 | (INSERT_SUBREG QPR:$src, | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 3131 | (f64 (EXTRACT_SUBREG QPR:$src, | 
|  | 3132 | (DSubReg_f64_reg imm:$lane))), | 
| Anton Korobeynikov | f0da41c | 2009-09-02 21:21:28 +0000 | [diff] [blame] | 3133 | (DSubReg_f64_other_reg imm:$lane))>; | 
|  | 3134 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3135 | //   VMOVN    : Vector Narrowing Move | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3136 | defm VMOVN    : N2VNInt_HSD<0b11,0b11,0b10,0b00100,0,0, IIC_VMOVD, | 
|  | 3137 | "vmovn", "i", int_arm_neon_vmovn>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3138 | //   VQMOVN   : Vector Saturating Narrowing Move | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3139 | defm VQMOVNs  : N2VNInt_HSD<0b11,0b11,0b10,0b00101,0,0, IIC_VQUNAiD, | 
|  | 3140 | "vqmovn", "s", int_arm_neon_vqmovns>; | 
|  | 3141 | defm VQMOVNu  : N2VNInt_HSD<0b11,0b11,0b10,0b00101,1,0, IIC_VQUNAiD, | 
|  | 3142 | "vqmovn", "u", int_arm_neon_vqmovnu>; | 
|  | 3143 | defm VQMOVNsu : N2VNInt_HSD<0b11,0b11,0b10,0b00100,1,0, IIC_VQUNAiD, | 
|  | 3144 | "vqmovun", "s", int_arm_neon_vqmovnsu>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3145 | //   VMOVL    : Vector Lengthening Move | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3146 | defm VMOVLs   : N2VLInt_QHS<0b01,0b10100,0,1, "vmovl", "s", | 
|  | 3147 | int_arm_neon_vmovls>; | 
|  | 3148 | defm VMOVLu   : N2VLInt_QHS<0b11,0b10100,0,1, "vmovl", "u", | 
|  | 3149 | int_arm_neon_vmovlu>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3150 |  | 
|  | 3151 | // Vector Conversions. | 
|  | 3152 |  | 
| Johnny Chen | 8f3004c | 2010-03-17 17:52:21 +0000 | [diff] [blame] | 3153 | //   VCVT     : Vector Convert Between Floating-Point and Integers | 
| Johnny Chen | 274a0d3 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 3154 | def  VCVTf2sd : N2VD<0b11, 0b11, 0b10, 0b11, 0b01110, 0, "vcvt", "s32.f32", | 
|  | 3155 | v2i32, v2f32, fp_to_sint>; | 
|  | 3156 | def  VCVTf2ud : N2VD<0b11, 0b11, 0b10, 0b11, 0b01111, 0, "vcvt", "u32.f32", | 
|  | 3157 | v2i32, v2f32, fp_to_uint>; | 
|  | 3158 | def  VCVTs2fd : N2VD<0b11, 0b11, 0b10, 0b11, 0b01100, 0, "vcvt", "f32.s32", | 
|  | 3159 | v2f32, v2i32, sint_to_fp>; | 
|  | 3160 | def  VCVTu2fd : N2VD<0b11, 0b11, 0b10, 0b11, 0b01101, 0, "vcvt", "f32.u32", | 
|  | 3161 | v2f32, v2i32, uint_to_fp>; | 
| Johnny Chen | 8f3004c | 2010-03-17 17:52:21 +0000 | [diff] [blame] | 3162 |  | 
| Johnny Chen | 274a0d3 | 2010-03-17 23:26:50 +0000 | [diff] [blame] | 3163 | def  VCVTf2sq : N2VQ<0b11, 0b11, 0b10, 0b11, 0b01110, 0, "vcvt", "s32.f32", | 
|  | 3164 | v4i32, v4f32, fp_to_sint>; | 
|  | 3165 | def  VCVTf2uq : N2VQ<0b11, 0b11, 0b10, 0b11, 0b01111, 0, "vcvt", "u32.f32", | 
|  | 3166 | v4i32, v4f32, fp_to_uint>; | 
|  | 3167 | def  VCVTs2fq : N2VQ<0b11, 0b11, 0b10, 0b11, 0b01100, 0, "vcvt", "f32.s32", | 
|  | 3168 | v4f32, v4i32, sint_to_fp>; | 
|  | 3169 | def  VCVTu2fq : N2VQ<0b11, 0b11, 0b10, 0b11, 0b01101, 0, "vcvt", "f32.u32", | 
|  | 3170 | v4f32, v4i32, uint_to_fp>; | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3171 |  | 
|  | 3172 | //   VCVT     : Vector Convert Between Floating-Point and Fixed-Point. | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3173 | def VCVTf2xsd : N2VCvtD<0, 1, 0b1111, 0, 1, "vcvt", "s32.f32", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3174 | v2i32, v2f32, int_arm_neon_vcvtfp2fxs>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3175 | def VCVTf2xud : N2VCvtD<1, 1, 0b1111, 0, 1, "vcvt", "u32.f32", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3176 | v2i32, v2f32, int_arm_neon_vcvtfp2fxu>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3177 | def VCVTxs2fd : N2VCvtD<0, 1, 0b1110, 0, 1, "vcvt", "f32.s32", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3178 | v2f32, v2i32, int_arm_neon_vcvtfxs2fp>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3179 | def VCVTxu2fd : N2VCvtD<1, 1, 0b1110, 0, 1, "vcvt", "f32.u32", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3180 | v2f32, v2i32, int_arm_neon_vcvtfxu2fp>; | 
|  | 3181 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3182 | def VCVTf2xsq : N2VCvtQ<0, 1, 0b1111, 0, 1, "vcvt", "s32.f32", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3183 | v4i32, v4f32, int_arm_neon_vcvtfp2fxs>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3184 | def VCVTf2xuq : N2VCvtQ<1, 1, 0b1111, 0, 1, "vcvt", "u32.f32", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3185 | v4i32, v4f32, int_arm_neon_vcvtfp2fxu>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3186 | def VCVTxs2fq : N2VCvtQ<0, 1, 0b1110, 0, 1, "vcvt", "f32.s32", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3187 | v4f32, v4i32, int_arm_neon_vcvtfxs2fp>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3188 | def VCVTxu2fq : N2VCvtQ<1, 1, 0b1110, 0, 1, "vcvt", "f32.u32", | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3189 | v4f32, v4i32, int_arm_neon_vcvtfxu2fp>; | 
|  | 3190 |  | 
| Bob Wilson | ea3a402 | 2009-08-12 22:31:50 +0000 | [diff] [blame] | 3191 | // Vector Reverse. | 
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3192 |  | 
|  | 3193 | //   VREV64   : Vector Reverse elements within 64-bit doublewords | 
|  | 3194 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3195 | class VREV64D<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty> | 
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3196 | : N2V<0b11, 0b11, op19_18, 0b00, 0b00000, 0, 0, (outs DPR:$dst), | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3197 | (ins DPR:$src), IIC_VMOVD, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3198 | OpcodeStr, Dt, "$dst, $src", "", | 
| Bob Wilson | ea3a402 | 2009-08-12 22:31:50 +0000 | [diff] [blame] | 3199 | [(set DPR:$dst, (Ty (NEONvrev64 (Ty DPR:$src))))]>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3200 | class VREV64Q<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty> | 
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3201 | : N2V<0b11, 0b11, op19_18, 0b00, 0b00000, 1, 0, (outs QPR:$dst), | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3202 | (ins QPR:$src), IIC_VMOVD, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3203 | OpcodeStr, Dt, "$dst, $src", "", | 
| Bob Wilson | ea3a402 | 2009-08-12 22:31:50 +0000 | [diff] [blame] | 3204 | [(set QPR:$dst, (Ty (NEONvrev64 (Ty QPR:$src))))]>; | 
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3205 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3206 | def VREV64d8  : VREV64D<0b00, "vrev64", "8", v8i8>; | 
|  | 3207 | def VREV64d16 : VREV64D<0b01, "vrev64", "16", v4i16>; | 
|  | 3208 | def VREV64d32 : VREV64D<0b10, "vrev64", "32", v2i32>; | 
|  | 3209 | def VREV64df  : VREV64D<0b10, "vrev64", "32", v2f32>; | 
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3210 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3211 | def VREV64q8  : VREV64Q<0b00, "vrev64", "8", v16i8>; | 
|  | 3212 | def VREV64q16 : VREV64Q<0b01, "vrev64", "16", v8i16>; | 
|  | 3213 | def VREV64q32 : VREV64Q<0b10, "vrev64", "32", v4i32>; | 
|  | 3214 | def VREV64qf  : VREV64Q<0b10, "vrev64", "32", v4f32>; | 
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3215 |  | 
|  | 3216 | //   VREV32   : Vector Reverse elements within 32-bit words | 
|  | 3217 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3218 | class VREV32D<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty> | 
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3219 | : N2V<0b11, 0b11, op19_18, 0b00, 0b00001, 0, 0, (outs DPR:$dst), | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3220 | (ins DPR:$src), IIC_VMOVD, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3221 | OpcodeStr, Dt, "$dst, $src", "", | 
| Bob Wilson | ea3a402 | 2009-08-12 22:31:50 +0000 | [diff] [blame] | 3222 | [(set DPR:$dst, (Ty (NEONvrev32 (Ty DPR:$src))))]>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3223 | class VREV32Q<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty> | 
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3224 | : N2V<0b11, 0b11, op19_18, 0b00, 0b00001, 1, 0, (outs QPR:$dst), | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3225 | (ins QPR:$src), IIC_VMOVD, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3226 | OpcodeStr, Dt, "$dst, $src", "", | 
| Bob Wilson | ea3a402 | 2009-08-12 22:31:50 +0000 | [diff] [blame] | 3227 | [(set QPR:$dst, (Ty (NEONvrev32 (Ty QPR:$src))))]>; | 
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3228 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3229 | def VREV32d8  : VREV32D<0b00, "vrev32", "8", v8i8>; | 
|  | 3230 | def VREV32d16 : VREV32D<0b01, "vrev32", "16", v4i16>; | 
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3231 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3232 | def VREV32q8  : VREV32Q<0b00, "vrev32", "8", v16i8>; | 
|  | 3233 | def VREV32q16 : VREV32Q<0b01, "vrev32", "16", v8i16>; | 
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3234 |  | 
|  | 3235 | //   VREV16   : Vector Reverse elements within 16-bit halfwords | 
|  | 3236 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3237 | class VREV16D<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty> | 
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3238 | : N2V<0b11, 0b11, op19_18, 0b00, 0b00010, 0, 0, (outs DPR:$dst), | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3239 | (ins DPR:$src), IIC_VMOVD, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3240 | OpcodeStr, Dt, "$dst, $src", "", | 
| Bob Wilson | ea3a402 | 2009-08-12 22:31:50 +0000 | [diff] [blame] | 3241 | [(set DPR:$dst, (Ty (NEONvrev16 (Ty DPR:$src))))]>; | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3242 | class VREV16Q<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty> | 
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3243 | : N2V<0b11, 0b11, op19_18, 0b00, 0b00010, 1, 0, (outs QPR:$dst), | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3244 | (ins QPR:$src), IIC_VMOVD, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3245 | OpcodeStr, Dt, "$dst, $src", "", | 
| Bob Wilson | ea3a402 | 2009-08-12 22:31:50 +0000 | [diff] [blame] | 3246 | [(set QPR:$dst, (Ty (NEONvrev16 (Ty QPR:$src))))]>; | 
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3247 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3248 | def VREV16d8  : VREV16D<0b00, "vrev16", "8", v8i8>; | 
|  | 3249 | def VREV16q8  : VREV16Q<0b00, "vrev16", "8", v16i8>; | 
| Bob Wilson | 8a37bbe | 2009-07-26 00:39:34 +0000 | [diff] [blame] | 3250 |  | 
| Bob Wilson | 32cd855 | 2009-08-19 17:03:43 +0000 | [diff] [blame] | 3251 | // Other Vector Shuffles. | 
|  | 3252 |  | 
|  | 3253 | //   VEXT     : Vector Extract | 
|  | 3254 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3255 | class VEXTd<string OpcodeStr, string Dt, ValueType Ty> | 
| Johnny Chen | 5ad7416 | 2009-11-23 20:09:13 +0000 | [diff] [blame] | 3256 | : N3V<0,1,0b11,{?,?,?,?},0,0, (outs DPR:$dst), | 
|  | 3257 | (ins DPR:$lhs, DPR:$rhs, i32imm:$index), IIC_VEXTD, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3258 | OpcodeStr, Dt, "$dst, $lhs, $rhs, $index", "", | 
| Johnny Chen | 5ad7416 | 2009-11-23 20:09:13 +0000 | [diff] [blame] | 3259 | [(set DPR:$dst, (Ty (NEONvext (Ty DPR:$lhs), | 
|  | 3260 | (Ty DPR:$rhs), imm:$index)))]>; | 
| Anton Korobeynikov | 38f284f | 2009-08-21 12:40:21 +0000 | [diff] [blame] | 3261 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3262 | class VEXTq<string OpcodeStr, string Dt, ValueType Ty> | 
| Johnny Chen | 5ad7416 | 2009-11-23 20:09:13 +0000 | [diff] [blame] | 3263 | : N3V<0,1,0b11,{?,?,?,?},1,0, (outs QPR:$dst), | 
|  | 3264 | (ins QPR:$lhs, QPR:$rhs, i32imm:$index), IIC_VEXTQ, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3265 | OpcodeStr, Dt, "$dst, $lhs, $rhs, $index", "", | 
| Johnny Chen | 5ad7416 | 2009-11-23 20:09:13 +0000 | [diff] [blame] | 3266 | [(set QPR:$dst, (Ty (NEONvext (Ty QPR:$lhs), | 
|  | 3267 | (Ty QPR:$rhs), imm:$index)))]>; | 
| Anton Korobeynikov | 38f284f | 2009-08-21 12:40:21 +0000 | [diff] [blame] | 3268 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3269 | def VEXTd8  : VEXTd<"vext", "8",  v8i8>; | 
|  | 3270 | def VEXTd16 : VEXTd<"vext", "16", v4i16>; | 
|  | 3271 | def VEXTd32 : VEXTd<"vext", "32", v2i32>; | 
|  | 3272 | def VEXTdf  : VEXTd<"vext", "32", v2f32>; | 
| Anton Korobeynikov | 38f284f | 2009-08-21 12:40:21 +0000 | [diff] [blame] | 3273 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3274 | def VEXTq8  : VEXTq<"vext", "8",  v16i8>; | 
|  | 3275 | def VEXTq16 : VEXTq<"vext", "16", v8i16>; | 
|  | 3276 | def VEXTq32 : VEXTq<"vext", "32", v4i32>; | 
|  | 3277 | def VEXTqf  : VEXTq<"vext", "32", v4f32>; | 
| Bob Wilson | 32cd855 | 2009-08-19 17:03:43 +0000 | [diff] [blame] | 3278 |  | 
| Bob Wilson | db46af0 | 2009-08-08 05:53:00 +0000 | [diff] [blame] | 3279 | //   VTRN     : Vector Transpose | 
|  | 3280 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3281 | def  VTRNd8   : N2VDShuffle<0b00, 0b00001, "vtrn", "8">; | 
|  | 3282 | def  VTRNd16  : N2VDShuffle<0b01, 0b00001, "vtrn", "16">; | 
|  | 3283 | def  VTRNd32  : N2VDShuffle<0b10, 0b00001, "vtrn", "32">; | 
| Bob Wilson | db46af0 | 2009-08-08 05:53:00 +0000 | [diff] [blame] | 3284 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3285 | def  VTRNq8   : N2VQShuffle<0b00, 0b00001, IIC_VPERMQ, "vtrn", "8">; | 
|  | 3286 | def  VTRNq16  : N2VQShuffle<0b01, 0b00001, IIC_VPERMQ, "vtrn", "16">; | 
|  | 3287 | def  VTRNq32  : N2VQShuffle<0b10, 0b00001, IIC_VPERMQ, "vtrn", "32">; | 
| Bob Wilson | db46af0 | 2009-08-08 05:53:00 +0000 | [diff] [blame] | 3288 |  | 
| Bob Wilson | e223107 | 2009-08-08 06:13:25 +0000 | [diff] [blame] | 3289 | //   VUZP     : Vector Unzip (Deinterleave) | 
|  | 3290 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3291 | def  VUZPd8   : N2VDShuffle<0b00, 0b00010, "vuzp", "8">; | 
|  | 3292 | def  VUZPd16  : N2VDShuffle<0b01, 0b00010, "vuzp", "16">; | 
|  | 3293 | def  VUZPd32  : N2VDShuffle<0b10, 0b00010, "vuzp", "32">; | 
| Bob Wilson | e223107 | 2009-08-08 06:13:25 +0000 | [diff] [blame] | 3294 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3295 | def  VUZPq8   : N2VQShuffle<0b00, 0b00010, IIC_VPERMQ3, "vuzp", "8">; | 
|  | 3296 | def  VUZPq16  : N2VQShuffle<0b01, 0b00010, IIC_VPERMQ3, "vuzp", "16">; | 
|  | 3297 | def  VUZPq32  : N2VQShuffle<0b10, 0b00010, IIC_VPERMQ3, "vuzp", "32">; | 
| Bob Wilson | e223107 | 2009-08-08 06:13:25 +0000 | [diff] [blame] | 3298 |  | 
|  | 3299 | //   VZIP     : Vector Zip (Interleave) | 
|  | 3300 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3301 | def  VZIPd8   : N2VDShuffle<0b00, 0b00011, "vzip", "8">; | 
|  | 3302 | def  VZIPd16  : N2VDShuffle<0b01, 0b00011, "vzip", "16">; | 
|  | 3303 | def  VZIPd32  : N2VDShuffle<0b10, 0b00011, "vzip", "32">; | 
| Bob Wilson | e223107 | 2009-08-08 06:13:25 +0000 | [diff] [blame] | 3304 |  | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3305 | def  VZIPq8   : N2VQShuffle<0b00, 0b00011, IIC_VPERMQ3, "vzip", "8">; | 
|  | 3306 | def  VZIPq16  : N2VQShuffle<0b01, 0b00011, IIC_VPERMQ3, "vzip", "16">; | 
|  | 3307 | def  VZIPq32  : N2VQShuffle<0b10, 0b00011, IIC_VPERMQ3, "vzip", "32">; | 
| Bob Wilson | db46af0 | 2009-08-08 05:53:00 +0000 | [diff] [blame] | 3308 |  | 
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3309 | // Vector Table Lookup and Table Extension. | 
|  | 3310 |  | 
|  | 3311 | //   VTBL     : Vector Table Lookup | 
|  | 3312 | def  VTBL1 | 
|  | 3313 | : N3V<1,1,0b11,0b1000,0,0, (outs DPR:$dst), | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3314 | (ins DPR:$tbl1, DPR:$src), IIC_VTB1, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3315 | "vtbl", "8", "$dst, \\{$tbl1\\}, $src", "", | 
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3316 | [(set DPR:$dst, (v8i8 (int_arm_neon_vtbl1 DPR:$tbl1, DPR:$src)))]>; | 
| Evan Cheng | 1b2b64f | 2009-10-01 08:22:27 +0000 | [diff] [blame] | 3317 | let hasExtraSrcRegAllocReq = 1 in { | 
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3318 | def  VTBL2 | 
|  | 3319 | : N3V<1,1,0b11,0b1001,0,0, (outs DPR:$dst), | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3320 | (ins DPR:$tbl1, DPR:$tbl2, DPR:$src), IIC_VTB2, | 
| Bob Wilson | 7430a98 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 3321 | "vtbl", "8", "$dst, \\{$tbl1, $tbl2\\}, $src", "", | 
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3322 | [(set DPR:$dst, (v8i8 (int_arm_neon_vtbl2 | 
|  | 3323 | DPR:$tbl1, DPR:$tbl2, DPR:$src)))]>; | 
|  | 3324 | def  VTBL3 | 
|  | 3325 | : N3V<1,1,0b11,0b1010,0,0, (outs DPR:$dst), | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3326 | (ins DPR:$tbl1, DPR:$tbl2, DPR:$tbl3, DPR:$src), IIC_VTB3, | 
| Bob Wilson | 7430a98 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 3327 | "vtbl", "8", "$dst, \\{$tbl1, $tbl2, $tbl3\\}, $src", "", | 
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3328 | [(set DPR:$dst, (v8i8 (int_arm_neon_vtbl3 | 
|  | 3329 | DPR:$tbl1, DPR:$tbl2, DPR:$tbl3, DPR:$src)))]>; | 
|  | 3330 | def  VTBL4 | 
|  | 3331 | : N3V<1,1,0b11,0b1011,0,0, (outs DPR:$dst), | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3332 | (ins DPR:$tbl1, DPR:$tbl2, DPR:$tbl3, DPR:$tbl4, DPR:$src), IIC_VTB4, | 
| Bob Wilson | 7430a98 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 3333 | "vtbl", "8", "$dst, \\{$tbl1, $tbl2, $tbl3, $tbl4\\}, $src", "", | 
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3334 | [(set DPR:$dst, (v8i8 (int_arm_neon_vtbl4 DPR:$tbl1, DPR:$tbl2, | 
|  | 3335 | DPR:$tbl3, DPR:$tbl4, DPR:$src)))]>; | 
| Evan Cheng | 1b2b64f | 2009-10-01 08:22:27 +0000 | [diff] [blame] | 3336 | } // hasExtraSrcRegAllocReq = 1 | 
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3337 |  | 
|  | 3338 | //   VTBX     : Vector Table Extension | 
|  | 3339 | def  VTBX1 | 
|  | 3340 | : N3V<1,1,0b11,0b1000,1,0, (outs DPR:$dst), | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3341 | (ins DPR:$orig, DPR:$tbl1, DPR:$src), IIC_VTBX1, | 
| Evan Cheng | 738a97a | 2009-11-23 21:57:23 +0000 | [diff] [blame] | 3342 | "vtbx", "8", "$dst, \\{$tbl1\\}, $src", "$orig = $dst", | 
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3343 | [(set DPR:$dst, (v8i8 (int_arm_neon_vtbx1 | 
|  | 3344 | DPR:$orig, DPR:$tbl1, DPR:$src)))]>; | 
| Evan Cheng | 1b2b64f | 2009-10-01 08:22:27 +0000 | [diff] [blame] | 3345 | let hasExtraSrcRegAllocReq = 1 in { | 
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3346 | def  VTBX2 | 
|  | 3347 | : N3V<1,1,0b11,0b1001,1,0, (outs DPR:$dst), | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3348 | (ins DPR:$orig, DPR:$tbl1, DPR:$tbl2, DPR:$src), IIC_VTBX2, | 
| Bob Wilson | 7430a98 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 3349 | "vtbx", "8", "$dst, \\{$tbl1, $tbl2\\}, $src", "$orig = $dst", | 
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3350 | [(set DPR:$dst, (v8i8 (int_arm_neon_vtbx2 | 
|  | 3351 | DPR:$orig, DPR:$tbl1, DPR:$tbl2, DPR:$src)))]>; | 
|  | 3352 | def  VTBX3 | 
|  | 3353 | : N3V<1,1,0b11,0b1010,1,0, (outs DPR:$dst), | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3354 | (ins DPR:$orig, DPR:$tbl1, DPR:$tbl2, DPR:$tbl3, DPR:$src), IIC_VTBX3, | 
| Bob Wilson | 7430a98 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 3355 | "vtbx", "8", "$dst, \\{$tbl1, $tbl2, $tbl3\\}, $src", "$orig = $dst", | 
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3356 | [(set DPR:$dst, (v8i8 (int_arm_neon_vtbx3 DPR:$orig, DPR:$tbl1, | 
|  | 3357 | DPR:$tbl2, DPR:$tbl3, DPR:$src)))]>; | 
|  | 3358 | def  VTBX4 | 
|  | 3359 | : N3V<1,1,0b11,0b1011,1,0, (outs DPR:$dst), (ins DPR:$orig, DPR:$tbl1, | 
| David Goodwin | bea6848 | 2009-09-25 18:38:29 +0000 | [diff] [blame] | 3360 | DPR:$tbl2, DPR:$tbl3, DPR:$tbl4, DPR:$src), IIC_VTBX4, | 
| Bob Wilson | 7430a98 | 2010-01-18 01:24:43 +0000 | [diff] [blame] | 3361 | "vtbx", "8", "$dst, \\{$tbl1, $tbl2, $tbl3, $tbl4\\}, $src", | 
|  | 3362 | "$orig = $dst", | 
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3363 | [(set DPR:$dst, (v8i8 (int_arm_neon_vtbx4 DPR:$orig, DPR:$tbl1, | 
|  | 3364 | DPR:$tbl2, DPR:$tbl3, DPR:$tbl4, DPR:$src)))]>; | 
| Evan Cheng | 1b2b64f | 2009-10-01 08:22:27 +0000 | [diff] [blame] | 3365 | } // hasExtraSrcRegAllocReq = 1 | 
| Bob Wilson | 4b35448 | 2009-08-12 20:51:55 +0000 | [diff] [blame] | 3366 |  | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3367 | //===----------------------------------------------------------------------===// | 
| Evan Cheng | 4c3b1ca | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3368 | // NEON instructions for single-precision FP math | 
|  | 3369 | //===----------------------------------------------------------------------===// | 
|  | 3370 |  | 
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3371 | class N2VSPat<SDNode OpNode, ValueType ResTy, ValueType OpTy, NeonI Inst> | 
|  | 3372 | : NEONFPPat<(ResTy (OpNode SPR:$a)), | 
| Chris Lattner | b8a7427 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 3373 | (EXTRACT_SUBREG (OpTy (Inst (INSERT_SUBREG (OpTy (IMPLICIT_DEF)), | 
|  | 3374 | SPR:$a, arm_ssubreg_0))), | 
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3375 | arm_ssubreg_0)>; | 
|  | 3376 |  | 
|  | 3377 | class N3VSPat<SDNode OpNode, NeonI Inst> | 
|  | 3378 | : NEONFPPat<(f32 (OpNode SPR:$a, SPR:$b)), | 
| Chris Lattner | b8a7427 | 2010-03-08 18:51:21 +0000 | [diff] [blame] | 3379 | (EXTRACT_SUBREG (v2f32 | 
|  | 3380 | (Inst (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), | 
|  | 3381 | SPR:$a, arm_ssubreg_0), | 
|  | 3382 | (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), | 
|  | 3383 | SPR:$b, arm_ssubreg_0))), | 
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3384 | arm_ssubreg_0)>; | 
|  | 3385 |  | 
|  | 3386 | class N3VSMulOpPat<SDNode MulNode, SDNode OpNode, NeonI Inst> | 
|  | 3387 | : NEONFPPat<(f32 (OpNode SPR:$acc, (f32 (MulNode SPR:$a, SPR:$b)))), | 
|  | 3388 | (EXTRACT_SUBREG (Inst (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), | 
|  | 3389 | SPR:$acc, arm_ssubreg_0), | 
|  | 3390 | (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), | 
|  | 3391 | SPR:$a, arm_ssubreg_0), | 
|  | 3392 | (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), | 
|  | 3393 | SPR:$b, arm_ssubreg_0)), | 
|  | 3394 | arm_ssubreg_0)>; | 
|  | 3395 |  | 
| Evan Cheng | 4c3b1ca | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3396 | // These need separate instructions because they must use DPR_VFP2 register | 
|  | 3397 | // class which have SPR sub-registers. | 
|  | 3398 |  | 
|  | 3399 | // Vector Add Operations used for single-precision FP | 
|  | 3400 | let neverHasSideEffects = 1 in | 
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3401 | def VADDfd_sfp : N3VS<0,0,0b00,0b1101,0, "vadd", "f32", v2f32, v2f32, fadd, 1>; | 
|  | 3402 | def : N3VSPat<fadd, VADDfd_sfp>; | 
| Evan Cheng | 4c3b1ca | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3403 |  | 
| David Goodwin | 85b5b02 | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3404 | // Vector Sub Operations used for single-precision FP | 
|  | 3405 | let neverHasSideEffects = 1 in | 
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3406 | def VSUBfd_sfp : N3VS<0,0,0b10,0b1101,0, "vsub", "f32", v2f32, v2f32, fsub, 0>; | 
|  | 3407 | def : N3VSPat<fsub, VSUBfd_sfp>; | 
| David Goodwin | 85b5b02 | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3408 |  | 
| Evan Cheng | 4c3b1ca | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3409 | // Vector Multiply Operations used for single-precision FP | 
|  | 3410 | let neverHasSideEffects = 1 in | 
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3411 | def VMULfd_sfp : N3VS<1,0,0b00,0b1101,1, "vmul", "f32", v2f32, v2f32, fmul, 1>; | 
|  | 3412 | def : N3VSPat<fmul, VMULfd_sfp>; | 
| Evan Cheng | 4c3b1ca | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3413 |  | 
|  | 3414 | // Vector Multiply-Accumulate/Subtract used for single-precision FP | 
| Jim Grosbach | 5cba8de | 2009-10-31 22:57:36 +0000 | [diff] [blame] | 3415 | // vml[as].f32 can cause 4-8 cycle stalls in following ASIMD instructions, so | 
|  | 3416 | // we want to avoid them for now. e.g., alternating vmla/vadd instructions. | 
| Evan Cheng | 4c3b1ca | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3417 |  | 
| Jim Grosbach | 5cba8de | 2009-10-31 22:57:36 +0000 | [diff] [blame] | 3418 | //let neverHasSideEffects = 1 in | 
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3419 | //def VMLAfd_sfp : N3VSMulOp<0,0,0b00,0b1101,1, IIC_VMACD, "vmla", "f32", | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 3420 | //                            v2f32, fmul, fadd>; | 
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3421 | //def : N3VSMulOpPat<fmul, fadd, VMLAfd_sfp>; | 
| Jim Grosbach | 5cba8de | 2009-10-31 22:57:36 +0000 | [diff] [blame] | 3422 |  | 
|  | 3423 | //let neverHasSideEffects = 1 in | 
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3424 | //def VMLSfd_sfp : N3VSMulOp<0,0,0b10,0b1101,1, IIC_VMACD, "vmls", "f32", | 
| Bob Wilson | 9e89907 | 2010-02-17 00:31:29 +0000 | [diff] [blame] | 3425 | //                            v2f32, fmul, fsub>; | 
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3426 | //def : N3VSMulOpPat<fmul, fsub, VMLSfd_sfp>; | 
| Evan Cheng | 4c3b1ca | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3427 |  | 
| David Goodwin | 85b5b02 | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3428 | // Vector Absolute used for single-precision FP | 
| Evan Cheng | 4c3b1ca | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3429 | let neverHasSideEffects = 1 in | 
| Bob Wilson | cb2deb2 | 2010-02-17 22:42:54 +0000 | [diff] [blame] | 3430 | def  VABSfd_sfp : N2V<0b11, 0b11, 0b10, 0b01, 0b01110, 0, 0, | 
|  | 3431 | (outs DPR_VFP2:$dst), (ins DPR_VFP2:$src), IIC_VUNAD, | 
|  | 3432 | "vabs", "f32", "$dst, $src", "", []>; | 
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3433 | def : N2VSPat<fabs, f32, v2f32, VABSfd_sfp>; | 
| Evan Cheng | 4c3b1ca | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3434 |  | 
| David Goodwin | 85b5b02 | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3435 | // Vector Negate used for single-precision FP | 
| Evan Cheng | 4c3b1ca | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3436 | let neverHasSideEffects = 1 in | 
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3437 | def  VNEGfd_sfp : N2V<0b11, 0b11, 0b10, 0b01, 0b01111, 0, 0, | 
|  | 3438 | (outs DPR_VFP2:$dst), (ins DPR_VFP2:$src), IIC_VUNAD, | 
|  | 3439 | "vneg", "f32", "$dst, $src", "", []>; | 
|  | 3440 | def : N2VSPat<fneg, f32, v2f32, VNEGfd_sfp>; | 
| Evan Cheng | 4c3b1ca | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3441 |  | 
| Bob Wilson | c6c13a3 | 2010-02-18 06:05:53 +0000 | [diff] [blame] | 3442 | // Vector Maximum used for single-precision FP | 
|  | 3443 | let neverHasSideEffects = 1 in | 
|  | 3444 | def VMAXfd_sfp : N3V<0, 0, 0b00, 0b1111, 0, 0, (outs DPR_VFP2:$dst), | 
|  | 3445 | (ins DPR_VFP2:$src1, DPR_VFP2:$src2), IIC_VBIND, | 
|  | 3446 | "vmax", "f32", "$dst, $src1, $src2", "", []>; | 
|  | 3447 | def : N3VSPat<NEONfmax, VMAXfd_sfp>; | 
|  | 3448 |  | 
|  | 3449 | // Vector Minimum used for single-precision FP | 
|  | 3450 | let neverHasSideEffects = 1 in | 
|  | 3451 | def VMINfd_sfp : N3V<0, 0, 0b00, 0b1111, 0, 0, (outs DPR_VFP2:$dst), | 
|  | 3452 | (ins DPR_VFP2:$src1, DPR_VFP2:$src2), IIC_VBIND, | 
|  | 3453 | "vmin", "f32", "$dst, $src1, $src2", "", []>; | 
|  | 3454 | def : N3VSPat<NEONfmin, VMINfd_sfp>; | 
|  | 3455 |  | 
| David Goodwin | 85b5b02 | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3456 | // Vector Convert between single-precision FP and integer | 
|  | 3457 | let neverHasSideEffects = 1 in | 
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3458 | def  VCVTf2sd_sfp : N2VS<0b11, 0b11, 0b10, 0b11, 0b01110, 0, "vcvt", "s32.f32", | 
|  | 3459 | v2i32, v2f32, fp_to_sint>; | 
| Bob Wilson | e4191e7 | 2010-03-19 22:51:32 +0000 | [diff] [blame] | 3460 | def : N2VSPat<arm_ftosi, f32, v2f32, VCVTf2sd_sfp>; | 
| David Goodwin | 85b5b02 | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3461 |  | 
|  | 3462 | let neverHasSideEffects = 1 in | 
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3463 | def  VCVTf2ud_sfp : N2VS<0b11, 0b11, 0b10, 0b11, 0b01111, 0, "vcvt", "u32.f32", | 
|  | 3464 | v2i32, v2f32, fp_to_uint>; | 
| Bob Wilson | e4191e7 | 2010-03-19 22:51:32 +0000 | [diff] [blame] | 3465 | def : N2VSPat<arm_ftoui, f32, v2f32, VCVTf2ud_sfp>; | 
| David Goodwin | 85b5b02 | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3466 |  | 
|  | 3467 | let neverHasSideEffects = 1 in | 
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3468 | def  VCVTs2fd_sfp : N2VS<0b11, 0b11, 0b10, 0b11, 0b01100, 0, "vcvt", "f32.s32", | 
|  | 3469 | v2f32, v2i32, sint_to_fp>; | 
| Bob Wilson | e4191e7 | 2010-03-19 22:51:32 +0000 | [diff] [blame] | 3470 | def : N2VSPat<arm_sitof, f32, v2i32, VCVTs2fd_sfp>; | 
| David Goodwin | 85b5b02 | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3471 |  | 
|  | 3472 | let neverHasSideEffects = 1 in | 
| Bob Wilson | 004d280 | 2010-02-17 22:23:11 +0000 | [diff] [blame] | 3473 | def  VCVTu2fd_sfp : N2VS<0b11, 0b11, 0b10, 0b11, 0b01101, 0, "vcvt", "f32.u32", | 
|  | 3474 | v2f32, v2i32, uint_to_fp>; | 
| Bob Wilson | e4191e7 | 2010-03-19 22:51:32 +0000 | [diff] [blame] | 3475 | def : N2VSPat<arm_uitof, f32, v2i32, VCVTu2fd_sfp>; | 
| David Goodwin | 85b5b02 | 2009-08-10 22:17:39 +0000 | [diff] [blame] | 3476 |  | 
| Evan Cheng | 4c3b1ca | 2009-08-07 19:30:41 +0000 | [diff] [blame] | 3477 | //===----------------------------------------------------------------------===// | 
| Bob Wilson | 2e076c4 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 3478 | // Non-Instruction Patterns | 
|  | 3479 | //===----------------------------------------------------------------------===// | 
|  | 3480 |  | 
|  | 3481 | // bit_convert | 
|  | 3482 | def : Pat<(v1i64 (bitconvert (v2i32 DPR:$src))), (v1i64 DPR:$src)>; | 
|  | 3483 | def : Pat<(v1i64 (bitconvert (v4i16 DPR:$src))), (v1i64 DPR:$src)>; | 
|  | 3484 | def : Pat<(v1i64 (bitconvert (v8i8  DPR:$src))), (v1i64 DPR:$src)>; | 
|  | 3485 | def : Pat<(v1i64 (bitconvert (f64   DPR:$src))), (v1i64 DPR:$src)>; | 
|  | 3486 | def : Pat<(v1i64 (bitconvert (v2f32 DPR:$src))), (v1i64 DPR:$src)>; | 
|  | 3487 | def : Pat<(v2i32 (bitconvert (v1i64 DPR:$src))), (v2i32 DPR:$src)>; | 
|  | 3488 | def : Pat<(v2i32 (bitconvert (v4i16 DPR:$src))), (v2i32 DPR:$src)>; | 
|  | 3489 | def : Pat<(v2i32 (bitconvert (v8i8  DPR:$src))), (v2i32 DPR:$src)>; | 
|  | 3490 | def : Pat<(v2i32 (bitconvert (f64   DPR:$src))), (v2i32 DPR:$src)>; | 
|  | 3491 | def : Pat<(v2i32 (bitconvert (v2f32 DPR:$src))), (v2i32 DPR:$src)>; | 
|  | 3492 | def : Pat<(v4i16 (bitconvert (v1i64 DPR:$src))), (v4i16 DPR:$src)>; | 
|  | 3493 | def : Pat<(v4i16 (bitconvert (v2i32 DPR:$src))), (v4i16 DPR:$src)>; | 
|  | 3494 | def : Pat<(v4i16 (bitconvert (v8i8  DPR:$src))), (v4i16 DPR:$src)>; | 
|  | 3495 | def : Pat<(v4i16 (bitconvert (f64   DPR:$src))), (v4i16 DPR:$src)>; | 
|  | 3496 | def : Pat<(v4i16 (bitconvert (v2f32 DPR:$src))), (v4i16 DPR:$src)>; | 
|  | 3497 | def : Pat<(v8i8  (bitconvert (v1i64 DPR:$src))), (v8i8  DPR:$src)>; | 
|  | 3498 | def : Pat<(v8i8  (bitconvert (v2i32 DPR:$src))), (v8i8  DPR:$src)>; | 
|  | 3499 | def : Pat<(v8i8  (bitconvert (v4i16 DPR:$src))), (v8i8  DPR:$src)>; | 
|  | 3500 | def : Pat<(v8i8  (bitconvert (f64   DPR:$src))), (v8i8  DPR:$src)>; | 
|  | 3501 | def : Pat<(v8i8  (bitconvert (v2f32 DPR:$src))), (v8i8  DPR:$src)>; | 
|  | 3502 | def : Pat<(f64   (bitconvert (v1i64 DPR:$src))), (f64   DPR:$src)>; | 
|  | 3503 | def : Pat<(f64   (bitconvert (v2i32 DPR:$src))), (f64   DPR:$src)>; | 
|  | 3504 | def : Pat<(f64   (bitconvert (v4i16 DPR:$src))), (f64   DPR:$src)>; | 
|  | 3505 | def : Pat<(f64   (bitconvert (v8i8  DPR:$src))), (f64   DPR:$src)>; | 
|  | 3506 | def : Pat<(f64   (bitconvert (v2f32 DPR:$src))), (f64   DPR:$src)>; | 
|  | 3507 | def : Pat<(v2f32 (bitconvert (f64   DPR:$src))), (v2f32 DPR:$src)>; | 
|  | 3508 | def : Pat<(v2f32 (bitconvert (v1i64 DPR:$src))), (v2f32 DPR:$src)>; | 
|  | 3509 | def : Pat<(v2f32 (bitconvert (v2i32 DPR:$src))), (v2f32 DPR:$src)>; | 
|  | 3510 | def : Pat<(v2f32 (bitconvert (v4i16 DPR:$src))), (v2f32 DPR:$src)>; | 
|  | 3511 | def : Pat<(v2f32 (bitconvert (v8i8  DPR:$src))), (v2f32 DPR:$src)>; | 
|  | 3512 |  | 
|  | 3513 | def : Pat<(v2i64 (bitconvert (v4i32 QPR:$src))), (v2i64 QPR:$src)>; | 
|  | 3514 | def : Pat<(v2i64 (bitconvert (v8i16 QPR:$src))), (v2i64 QPR:$src)>; | 
|  | 3515 | def : Pat<(v2i64 (bitconvert (v16i8 QPR:$src))), (v2i64 QPR:$src)>; | 
|  | 3516 | def : Pat<(v2i64 (bitconvert (v2f64 QPR:$src))), (v2i64 QPR:$src)>; | 
|  | 3517 | def : Pat<(v2i64 (bitconvert (v4f32 QPR:$src))), (v2i64 QPR:$src)>; | 
|  | 3518 | def : Pat<(v4i32 (bitconvert (v2i64 QPR:$src))), (v4i32 QPR:$src)>; | 
|  | 3519 | def : Pat<(v4i32 (bitconvert (v8i16 QPR:$src))), (v4i32 QPR:$src)>; | 
|  | 3520 | def : Pat<(v4i32 (bitconvert (v16i8 QPR:$src))), (v4i32 QPR:$src)>; | 
|  | 3521 | def : Pat<(v4i32 (bitconvert (v2f64 QPR:$src))), (v4i32 QPR:$src)>; | 
|  | 3522 | def : Pat<(v4i32 (bitconvert (v4f32 QPR:$src))), (v4i32 QPR:$src)>; | 
|  | 3523 | def : Pat<(v8i16 (bitconvert (v2i64 QPR:$src))), (v8i16 QPR:$src)>; | 
|  | 3524 | def : Pat<(v8i16 (bitconvert (v4i32 QPR:$src))), (v8i16 QPR:$src)>; | 
|  | 3525 | def : Pat<(v8i16 (bitconvert (v16i8 QPR:$src))), (v8i16 QPR:$src)>; | 
|  | 3526 | def : Pat<(v8i16 (bitconvert (v2f64 QPR:$src))), (v8i16 QPR:$src)>; | 
|  | 3527 | def : Pat<(v8i16 (bitconvert (v4f32 QPR:$src))), (v8i16 QPR:$src)>; | 
|  | 3528 | def : Pat<(v16i8 (bitconvert (v2i64 QPR:$src))), (v16i8 QPR:$src)>; | 
|  | 3529 | def : Pat<(v16i8 (bitconvert (v4i32 QPR:$src))), (v16i8 QPR:$src)>; | 
|  | 3530 | def : Pat<(v16i8 (bitconvert (v8i16 QPR:$src))), (v16i8 QPR:$src)>; | 
|  | 3531 | def : Pat<(v16i8 (bitconvert (v2f64 QPR:$src))), (v16i8 QPR:$src)>; | 
|  | 3532 | def : Pat<(v16i8 (bitconvert (v4f32 QPR:$src))), (v16i8 QPR:$src)>; | 
|  | 3533 | def : Pat<(v4f32 (bitconvert (v2i64 QPR:$src))), (v4f32 QPR:$src)>; | 
|  | 3534 | def : Pat<(v4f32 (bitconvert (v4i32 QPR:$src))), (v4f32 QPR:$src)>; | 
|  | 3535 | def : Pat<(v4f32 (bitconvert (v8i16 QPR:$src))), (v4f32 QPR:$src)>; | 
|  | 3536 | def : Pat<(v4f32 (bitconvert (v16i8 QPR:$src))), (v4f32 QPR:$src)>; | 
|  | 3537 | def : Pat<(v4f32 (bitconvert (v2f64 QPR:$src))), (v4f32 QPR:$src)>; | 
|  | 3538 | def : Pat<(v2f64 (bitconvert (v2i64 QPR:$src))), (v2f64 QPR:$src)>; | 
|  | 3539 | def : Pat<(v2f64 (bitconvert (v4i32 QPR:$src))), (v2f64 QPR:$src)>; | 
|  | 3540 | def : Pat<(v2f64 (bitconvert (v8i16 QPR:$src))), (v2f64 QPR:$src)>; | 
|  | 3541 | def : Pat<(v2f64 (bitconvert (v16i8 QPR:$src))), (v2f64 QPR:$src)>; | 
|  | 3542 | def : Pat<(v2f64 (bitconvert (v4f32 QPR:$src))), (v2f64 QPR:$src)>; |