1//===-- MipsSchedule.td - Mips Scheduling Definitions ------*- tablegen -*-===// 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//===----------------------------------------------------------------------===// 11// Functional units across Mips chips sets. Based on GCC/Mips backend files. 12//===----------------------------------------------------------------------===// 13def ALU : FuncUnit; 14def IMULDIV : FuncUnit; 15 16//===----------------------------------------------------------------------===// 17// Instruction Itinerary classes used for Mips 18//===----------------------------------------------------------------------===// 19def IIAlu : InstrItinClass; 20def IIBranch : InstrItinClass; 21def IIPseudo : InstrItinClass; 22 23def II_ABS : InstrItinClass; 24def II_ADDI : InstrItinClass; 25def II_ADDIU : InstrItinClass; 26def II_ADDU : InstrItinClass; 27def II_ADD_D : InstrItinClass; 28def II_ADD_S : InstrItinClass; 29def II_AND : InstrItinClass; 30def II_ANDI : InstrItinClass; 31def II_BADDU : InstrItinClass; 32def II_CEIL : InstrItinClass; 33def II_CFC1 : InstrItinClass; 34def II_CLO : InstrItinClass; 35def II_CLZ : InstrItinClass; 36def II_CTC1 : InstrItinClass; 37def II_CVT : InstrItinClass; 38def II_C_CC_D : InstrItinClass; // Any c.<cc>.d instruction 39def II_C_CC_S : InstrItinClass; // Any c.<cc>.s instruction 40def II_DADDIU : InstrItinClass; 41def II_DADDU : InstrItinClass; 42def II_DADD : InstrItinClass; 43def II_DDIV : InstrItinClass; 44def II_DDIVU : InstrItinClass; 45def II_DIV : InstrItinClass; 46def II_DIVU : InstrItinClass; 47def II_DIV_D : InstrItinClass; 48def II_DIV_S : InstrItinClass; 49def II_DMFC1 : InstrItinClass; 50def II_DMTC1 : InstrItinClass; 51def II_DMUL : InstrItinClass; 52def II_DMULT : InstrItinClass; 53def II_DMULTU : InstrItinClass; 54def II_DROTR : InstrItinClass; 55def II_DROTR32 : InstrItinClass; 56def II_DROTRV : InstrItinClass; 57def II_DSLL : InstrItinClass; 58def II_DSLL32 : InstrItinClass; 59def II_DSLLV : InstrItinClass; 60def II_DSRA : InstrItinClass; 61def II_DSRA32 : InstrItinClass; 62def II_DSRAV : InstrItinClass; 63def II_DSRL : InstrItinClass; 64def II_DSRL32 : InstrItinClass; 65def II_DSRLV : InstrItinClass; 66def II_DSUBU : InstrItinClass; 67def II_DSUB : InstrItinClass; 68def II_EXT : InstrItinClass; // Any EXT instruction 69def II_FLOOR : InstrItinClass; 70def II_INS : InstrItinClass; // Any INS instruction 71def II_LB : InstrItinClass; 72def II_LBU : InstrItinClass; 73def II_LD : InstrItinClass; 74def II_LDC1 : InstrItinClass; 75def II_LDL : InstrItinClass; 76def II_LDR : InstrItinClass; 77def II_LDXC1 : InstrItinClass; 78def II_LH : InstrItinClass; 79def II_LHU : InstrItinClass; 80def II_LUI : InstrItinClass; 81def II_LUXC1 : InstrItinClass; 82def II_LW : InstrItinClass; 83def II_LWC1 : InstrItinClass; 84def II_LWL : InstrItinClass; 85def II_LWR : InstrItinClass; 86def II_LWU : InstrItinClass; 87def II_LWXC1 : InstrItinClass; 88def II_MADD : InstrItinClass; 89def II_MADDU : InstrItinClass; 90def II_MADD_D : InstrItinClass; 91def II_MADD_S : InstrItinClass; 92def II_MFC1 : InstrItinClass; 93def II_MFHC1 : InstrItinClass; 94def II_MFHI_MFLO : InstrItinClass; // mfhi and mflo 95def II_MOVF : InstrItinClass; 96def II_MOVF_D : InstrItinClass; 97def II_MOVF_S : InstrItinClass; 98def II_MOVN : InstrItinClass; 99def II_MOVN_D : InstrItinClass; 100def II_MOVN_S : InstrItinClass; 101def II_MOVT : InstrItinClass; 102def II_MOVT_D : InstrItinClass; 103def II_MOVT_S : InstrItinClass; 104def II_MOVZ : InstrItinClass; 105def II_MOVZ_D : InstrItinClass; 106def II_MOVZ_S : InstrItinClass; 107def II_MOV_D : InstrItinClass; 108def II_MOV_S : InstrItinClass; 109def II_MSUB : InstrItinClass; 110def II_MSUBU : InstrItinClass; 111def II_MSUB_D : InstrItinClass; 112def II_MSUB_S : InstrItinClass; 113def II_MTC1 : InstrItinClass; 114def II_MTHC1 : InstrItinClass; 115def II_MTHI_MTLO : InstrItinClass; // mthi and mtlo 116def II_MUL : InstrItinClass; 117def II_MULT : InstrItinClass; 118def II_MULTU : InstrItinClass; 119def II_MUL_D : InstrItinClass; 120def II_MUL_S : InstrItinClass; 121def II_NEG : InstrItinClass; 122def II_NMADD_D : InstrItinClass; 123def II_NMADD_S : InstrItinClass; 124def II_NMSUB_D : InstrItinClass; 125def II_NMSUB_S : InstrItinClass; 126def II_NOR : InstrItinClass; 127def II_OR : InstrItinClass; 128def II_ORI : InstrItinClass; 129def II_POP : InstrItinClass; 130def II_RDHWR : InstrItinClass; 131def II_RESTORE : InstrItinClass; 132def II_ROTR : InstrItinClass; 133def II_ROTRV : InstrItinClass; 134def II_ROUND : InstrItinClass; 135def II_SAVE : InstrItinClass; 136def II_SB : InstrItinClass; 137def II_SD : InstrItinClass; 138def II_SDC1 : InstrItinClass; 139def II_SDL : InstrItinClass; 140def II_SDR : InstrItinClass; 141def II_SDXC1 : InstrItinClass; 142def II_SEB : InstrItinClass; 143def II_SEH : InstrItinClass; 144def II_SEQ_SNE : InstrItinClass; // seq and sne 145def II_SEQI_SNEI : InstrItinClass; // seqi and snei 146def II_SH : InstrItinClass; 147def II_SLL : InstrItinClass; 148def II_SLLV : InstrItinClass; 149def II_SLTI_SLTIU : InstrItinClass; // slti and sltiu 150def II_SLT_SLTU : InstrItinClass; // slt and sltu 151def II_SQRT_D : InstrItinClass; 152def II_SQRT_S : InstrItinClass; 153def II_SRA : InstrItinClass; 154def II_SRAV : InstrItinClass; 155def II_SRL : InstrItinClass; 156def II_SRLV : InstrItinClass; 157def II_SUBU : InstrItinClass; 158def II_SUB_D : InstrItinClass; 159def II_SUB_S : InstrItinClass; 160def II_SUXC1 : InstrItinClass; 161def II_SW : InstrItinClass; 162def II_SWC1 : InstrItinClass; 163def II_SWL : InstrItinClass; 164def II_SWR : InstrItinClass; 165def II_SWXC1 : InstrItinClass; 166def II_TRUNC : InstrItinClass; 167def II_XOR : InstrItinClass; 168def II_XORI : InstrItinClass; 169 170//===----------------------------------------------------------------------===// 171// Mips Generic instruction itineraries. 172//===----------------------------------------------------------------------===// 173def MipsGenericItineraries : ProcessorItineraries<[ALU, IMULDIV], [], [ 174 InstrItinData<IIAlu , [InstrStage<1, [ALU]>]>, 175 InstrItinData<II_ADDI , [InstrStage<1, [ALU]>]>, 176 InstrItinData<II_ADDIU , [InstrStage<1, [ALU]>]>, 177 InstrItinData<II_ADDU , [InstrStage<1, [ALU]>]>, 178 InstrItinData<II_AND , [InstrStage<1, [ALU]>]>, 179 InstrItinData<II_BADDU , [InstrStage<1, [ALU]>]>, 180 InstrItinData<II_SLL , [InstrStage<1, [ALU]>]>, 181 InstrItinData<II_SRA , [InstrStage<1, [ALU]>]>, 182 InstrItinData<II_SRL , [InstrStage<1, [ALU]>]>, 183 InstrItinData<II_ROTR , [InstrStage<1, [ALU]>]>, 184 InstrItinData<II_SLLV , [InstrStage<1, [ALU]>]>, 185 InstrItinData<II_SRAV , [InstrStage<1, [ALU]>]>, 186 InstrItinData<II_SRLV , [InstrStage<1, [ALU]>]>, 187 InstrItinData<II_ROTRV , [InstrStage<1, [ALU]>]>, 188 InstrItinData<II_CLO , [InstrStage<1, [ALU]>]>, 189 InstrItinData<II_CLZ , [InstrStage<1, [ALU]>]>, 190 InstrItinData<II_DADDIU , [InstrStage<1, [ALU]>]>, 191 InstrItinData<II_DADDU , [InstrStage<1, [ALU]>]>, 192 InstrItinData<II_DADD , [InstrStage<1, [ALU]>]>, 193 InstrItinData<II_DSLL , [InstrStage<1, [ALU]>]>, 194 InstrItinData<II_DSRL , [InstrStage<1, [ALU]>]>, 195 InstrItinData<II_DSRA , [InstrStage<1, [ALU]>]>, 196 InstrItinData<II_DSLLV , [InstrStage<1, [ALU]>]>, 197 InstrItinData<II_DSRLV , [InstrStage<1, [ALU]>]>, 198 InstrItinData<II_DSRAV , [InstrStage<1, [ALU]>]>, 199 InstrItinData<II_DSUBU , [InstrStage<1, [ALU]>]>, 200 InstrItinData<II_DSUB , [InstrStage<1, [ALU]>]>, 201 InstrItinData<II_DROTR , [InstrStage<1, [ALU]>]>, 202 InstrItinData<II_DROTRV , [InstrStage<1, [ALU]>]>, 203 InstrItinData<II_EXT , [InstrStage<1, [ALU]>]>, 204 InstrItinData<II_INS , [InstrStage<1, [ALU]>]>, 205 InstrItinData<II_LUI , [InstrStage<1, [ALU]>]>, 206 InstrItinData<II_MOVF , [InstrStage<1, [ALU]>]>, 207 InstrItinData<II_MOVN , [InstrStage<1, [ALU]>]>, 208 InstrItinData<II_MOVN_S , [InstrStage<1, [ALU]>]>, 209 InstrItinData<II_MOVN_D , [InstrStage<1, [ALU]>]>, 210 InstrItinData<II_MOVT , [InstrStage<1, [ALU]>]>, 211 InstrItinData<II_MOVZ , [InstrStage<1, [ALU]>]>, 212 InstrItinData<II_NOR , [InstrStage<1, [ALU]>]>, 213 InstrItinData<II_OR , [InstrStage<1, [ALU]>]>, 214 InstrItinData<II_POP , [InstrStage<1, [ALU]>]>, 215 InstrItinData<II_RDHWR , [InstrStage<1, [ALU]>]>, 216 InstrItinData<II_SUBU , [InstrStage<1, [ALU]>]>, 217 InstrItinData<II_XOR , [InstrStage<1, [ALU]>]>, 218 InstrItinData<II_ANDI , [InstrStage<1, [ALU]>]>, 219 InstrItinData<II_ORI , [InstrStage<1, [ALU]>]>, 220 InstrItinData<II_XORI , [InstrStage<1, [ALU]>]>, 221 InstrItinData<II_LB , [InstrStage<3, [ALU]>]>, 222 InstrItinData<II_LBU , [InstrStage<3, [ALU]>]>, 223 InstrItinData<II_LH , [InstrStage<3, [ALU]>]>, 224 InstrItinData<II_LHU , [InstrStage<3, [ALU]>]>, 225 InstrItinData<II_LW , [InstrStage<3, [ALU]>]>, 226 InstrItinData<II_LWL , [InstrStage<3, [ALU]>]>, 227 InstrItinData<II_LWR , [InstrStage<3, [ALU]>]>, 228 InstrItinData<II_LD , [InstrStage<3, [ALU]>]>, 229 InstrItinData<II_LDL , [InstrStage<3, [ALU]>]>, 230 InstrItinData<II_LDR , [InstrStage<3, [ALU]>]>, 231 InstrItinData<II_RESTORE , [InstrStage<3, [ALU]>]>, 232 InstrItinData<II_SB , [InstrStage<1, [ALU]>]>, 233 InstrItinData<II_SH , [InstrStage<1, [ALU]>]>, 234 InstrItinData<II_SW , [InstrStage<1, [ALU]>]>, 235 InstrItinData<II_SWL , [InstrStage<1, [ALU]>]>, 236 InstrItinData<II_SWR , [InstrStage<1, [ALU]>]>, 237 InstrItinData<II_SDL , [InstrStage<1, [ALU]>]>, 238 InstrItinData<II_SDR , [InstrStage<1, [ALU]>]>, 239 InstrItinData<II_SD , [InstrStage<1, [ALU]>]>, 240 InstrItinData<II_SAVE , [InstrStage<1, [ALU]>]>, 241 InstrItinData<II_SEQ_SNE , [InstrStage<1, [ALU]>]>, 242 InstrItinData<II_SEQI_SNEI , [InstrStage<1, [ALU]>]>, 243 InstrItinData<IIBranch , [InstrStage<1, [ALU]>]>, 244 InstrItinData<II_DMUL , [InstrStage<17, [IMULDIV]>]>, 245 InstrItinData<II_DMULT , [InstrStage<17, [IMULDIV]>]>, 246 InstrItinData<II_DMULTU , [InstrStage<17, [IMULDIV]>]>, 247 InstrItinData<II_MADD , [InstrStage<17, [IMULDIV]>]>, 248 InstrItinData<II_MADDU , [InstrStage<17, [IMULDIV]>]>, 249 InstrItinData<II_MFHI_MFLO , [InstrStage<1, [IMULDIV]>]>, 250 InstrItinData<II_MSUB , [InstrStage<17, [IMULDIV]>]>, 251 InstrItinData<II_MSUBU , [InstrStage<17, [IMULDIV]>]>, 252 InstrItinData<II_MTHI_MTLO , [InstrStage<1, [IMULDIV]>]>, 253 InstrItinData<II_MUL , [InstrStage<17, [IMULDIV]>]>, 254 InstrItinData<II_MULT , [InstrStage<17, [IMULDIV]>]>, 255 InstrItinData<II_MULTU , [InstrStage<17, [IMULDIV]>]>, 256 InstrItinData<II_MSUB , [InstrStage<17, [IMULDIV]>]>, 257 InstrItinData<II_MSUBU , [InstrStage<17, [IMULDIV]>]>, 258 InstrItinData<II_DIV , [InstrStage<38, [IMULDIV]>]>, 259 InstrItinData<II_DIVU , [InstrStage<38, [IMULDIV]>]>, 260 InstrItinData<II_DDIV , [InstrStage<38, [IMULDIV]>]>, 261 InstrItinData<II_DDIVU , [InstrStage<38, [IMULDIV]>]>, 262 InstrItinData<II_CEIL , [InstrStage<1, [ALU]>]>, 263 InstrItinData<II_CVT , [InstrStage<1, [ALU]>]>, 264 InstrItinData<II_ABS , [InstrStage<1, [ALU]>]>, 265 InstrItinData<II_FLOOR , [InstrStage<1, [ALU]>]>, 266 InstrItinData<II_NEG , [InstrStage<1, [ALU]>]>, 267 InstrItinData<II_ROUND , [InstrStage<1, [ALU]>]>, 268 InstrItinData<II_TRUNC , [InstrStage<1, [ALU]>]>, 269 InstrItinData<II_MOV_D , [InstrStage<2, [ALU]>]>, 270 InstrItinData<II_MOV_S , [InstrStage<2, [ALU]>]>, 271 InstrItinData<II_CFC1 , [InstrStage<2, [ALU]>]>, 272 InstrItinData<II_CTC1 , [InstrStage<2, [ALU]>]>, 273 InstrItinData<II_MOVF_D , [InstrStage<2, [ALU]>]>, 274 InstrItinData<II_MOVF_S , [InstrStage<2, [ALU]>]>, 275 InstrItinData<II_MOVT_D , [InstrStage<2, [ALU]>]>, 276 InstrItinData<II_MOVT_S , [InstrStage<2, [ALU]>]>, 277 InstrItinData<II_MOVZ_D , [InstrStage<2, [ALU]>]>, 278 InstrItinData<II_MOVZ_S , [InstrStage<2, [ALU]>]>, 279 InstrItinData<II_C_CC_S , [InstrStage<3, [ALU]>]>, 280 InstrItinData<II_C_CC_D , [InstrStage<3, [ALU]>]>, 281 InstrItinData<II_ADD_D , [InstrStage<4, [ALU]>]>, 282 InstrItinData<II_ADD_S , [InstrStage<4, [ALU]>]>, 283 InstrItinData<II_SUB_D , [InstrStage<4, [ALU]>]>, 284 InstrItinData<II_SUB_S , [InstrStage<4, [ALU]>]>, 285 InstrItinData<II_MUL_S , [InstrStage<7, [ALU]>]>, 286 InstrItinData<II_MADD_S , [InstrStage<7, [ALU]>]>, 287 InstrItinData<II_MSUB_S , [InstrStage<7, [ALU]>]>, 288 InstrItinData<II_NMADD_S , [InstrStage<7, [ALU]>]>, 289 InstrItinData<II_NMSUB_S , [InstrStage<7, [ALU]>]>, 290 InstrItinData<II_MUL_D , [InstrStage<8, [ALU]>]>, 291 InstrItinData<II_MADD_D , [InstrStage<8, [ALU]>]>, 292 InstrItinData<II_MSUB_D , [InstrStage<8, [ALU]>]>, 293 InstrItinData<II_NMADD_D , [InstrStage<8, [ALU]>]>, 294 InstrItinData<II_NMSUB_D , [InstrStage<8, [ALU]>]>, 295 InstrItinData<II_DIV_S , [InstrStage<23, [ALU]>]>, 296 InstrItinData<II_DIV_D , [InstrStage<36, [ALU]>]>, 297 InstrItinData<II_SQRT_S , [InstrStage<54, [ALU]>]>, 298 InstrItinData<II_SQRT_D , [InstrStage<12, [ALU]>]>, 299 InstrItinData<II_LDC1 , [InstrStage<3, [ALU]>]>, 300 InstrItinData<II_LWC1 , [InstrStage<3, [ALU]>]>, 301 InstrItinData<II_LDXC1 , [InstrStage<3, [ALU]>]>, 302 InstrItinData<II_LWXC1 , [InstrStage<3, [ALU]>]>, 303 InstrItinData<II_LUXC1 , [InstrStage<3, [ALU]>]>, 304 InstrItinData<II_SDC1 , [InstrStage<1, [ALU]>]>, 305 InstrItinData<II_SWC1 , [InstrStage<1, [ALU]>]>, 306 InstrItinData<II_SDXC1 , [InstrStage<1, [ALU]>]>, 307 InstrItinData<II_SWXC1 , [InstrStage<1, [ALU]>]>, 308 InstrItinData<II_SUXC1 , [InstrStage<1, [ALU]>]>, 309 InstrItinData<II_DMFC1 , [InstrStage<2, [ALU]>]>, 310 InstrItinData<II_DMTC1 , [InstrStage<2, [ALU]>]>, 311 InstrItinData<II_MFC1 , [InstrStage<2, [ALU]>]>, 312 InstrItinData<II_MTC1 , [InstrStage<2, [ALU]>]>, 313 InstrItinData<II_MFHC1 , [InstrStage<2, [ALU]>]>, 314 InstrItinData<II_MTHC1 , [InstrStage<2, [ALU]>]> 315]>; 316