1//=- AArch64SchedThunderX3T110.td - Marvell ThunderX3 T110 ---*- tablegen -*-=// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8// 9// This file defines the scheduling model for Marvell ThunderX3T110 10// family of processors. 11// 12//===----------------------------------------------------------------------===// 13 14//===----------------------------------------------------------------------===// 15// Pipeline Description. 16 17def ThunderX3T110Model : SchedMachineModel { 18 let IssueWidth = 4; // 4 micro-ops dispatched at a time. 19 let MicroOpBufferSize = 70; // 70 entries in micro-op re-order buffer. 20 let LoadLatency = 4; // Optimistic load latency. 21 let MispredictPenalty = 12; // Extra cycles for mispredicted branch. 22 // Determined via a mix of micro-arch details and experimentation. 23 let LoopMicroOpBufferSize = 128; // FIXME: might be much bigger in TX3. 24 let PostRAScheduler = 1; // Using PostRA sched. 25 let CompleteModel = 1; 26 27 list<Predicate> UnsupportedFeatures = !listconcat(SVEUnsupported.F, 28 PAUnsupported.F); 29 // FIXME: Remove when all errors have been fixed. 30 let FullInstRWOverlapCheck = 0; 31} 32 33let SchedModel = ThunderX3T110Model in { 34 35// Issue ports. 36 37// Port 0: ALU. 38def THX3T110P0 : ProcResource<1>; 39 40// Port 1: ALU. 41def THX3T110P1 : ProcResource<1>; 42 43// Port 2: ALU/Branch. 44def THX3T110P2 : ProcResource<1>; 45 46// Port 3: ALU/Branch. 47def THX3T110P3 : ProcResource<1>; 48 49// Port 4: Load/Store. 50def THX3T110P4 : ProcResource<1>; 51 52// Port 5: Load/store. 53def THX3T110P5 : ProcResource<1>; 54 55// Port 6: FP/Neon/SIMD/Crypto. 56def THX3T110P6FP0 : ProcResource<1>; 57 58// Port 7: FP/Neon/SIMD/Crypto. 59def THX3T110P7FP1 : ProcResource<1>; 60 61// Port 8: FP/Neon/SIMD/Crypto. 62def THX3T110P8FP2 : ProcResource<1>; 63 64// Port 9: FP/Neon/SIMD/Crypto. 65def THX3T110P9FP3 : ProcResource<1>; 66 67// Port 10: Store Data Unit. 68def THX3T110SD0 : ProcResource<1>; 69 70// Define groups for the functional units on each issue port. Each group 71// created will be used by a WriteRes. 72 73// Integer divide/mulhi micro-ops only on port I1. 74def THX3T110I1 : ProcResGroup<[THX3T110P1]>; 75 76// Branch micro-ops on ports I2/I3. 77def THX3T110I23 : ProcResGroup<[THX3T110P2, THX3T110P3]>; 78 79// Branch micro-ops on ports I1/I2/I3. 80def THX3T110I123 : ProcResGroup<[THX3T110P1, THX3T110P2, THX3T110P3]>; 81 82// Integer micro-ops on ports I0/I1/I2. 83def THX3T110I012 : ProcResGroup<[THX3T110P0, THX3T110P1, THX3T110P2]>; 84 85// Integer micro-ops on ports I0/I1/I2/I3. 86def THX3T110I0123 : ProcResGroup<[THX3T110P0, THX3T110P1, 87 THX3T110P2, THX3T110P3]>; 88 89// FP micro-ops on ports FP0/FP1/FP2/FP3. 90def THX3T110FP0123 : ProcResGroup<[THX3T110P6FP0, THX3T110P7FP1, 91 THX3T110P8FP2, THX3T110P9FP3]>; 92 93// FP micro-ops on ports FP2/FP3. 94def THX3T110FP23 : ProcResGroup<[THX3T110P8FP2, THX3T110P9FP3]>; 95 96// ASIMD micro-ops on ports FP0/FP1/FP2/FP3. 97def THX3T110SIMD : ProcResGroup<[THX3T110P6FP0, THX3T110P7FP1, 98 THX3T110P8FP2, THX3T110P9FP3]>; 99 100// Store data micro-ops only on port 10. 101def THX3T110SD : ProcResGroup<[THX3T110SD0]>; 102 103// Load/store micro-ops on ports P4/P5. 104def THX3T110LS : ProcResGroup<[THX3T110P4, THX3T110P5]>; 105 106// 70 entry unified scheduler. 107def THX3T110ANY: ProcResGroup<[THX3T110P0, THX3T110P1, THX3T110P2, 108 THX3T110P3, THX3T110P4, THX3T110P5, 109 THX3T110P6FP0, THX3T110P7FP1, 110 THX3T110P8FP2, THX3T110P9FP3]> { 111 let BufferSize = 70; 112} 113 114// Define commonly used write types for InstRW specializations. 115// All definitions follow the format: THX3T110Write_<NumCycles>Cyc_<Resources>. 116 117// 3 cycles on I1. 118def THX3T110Write_3Cyc_I1 : SchedWriteRes<[THX3T110I1]> { 119 let Latency = 3; 120 let NumMicroOps = 2; 121} 122 123// 4 cycles on I1. 124def THX3T110Write_4Cyc_I1 : SchedWriteRes<[THX3T110I1]> { 125 let Latency = 4; 126 let NumMicroOps = 2; 127} 128 129// 5 cycles on I1. 130def THX3T110Write_5Cyc_I1 : SchedWriteRes<[THX3T110I1]> { 131 let Latency = 5; 132 let NumMicroOps = 2; 133} 134 135// 7 cycles on I1. 136def THX3T110Write_7Cyc_I1 : SchedWriteRes<[THX3T110I1]> { 137 let Latency = 7; 138 let NumMicroOps = 3; 139} 140 141// 23 cycles on I1. 142def THX3T110Write_23Cyc_I1 : SchedWriteRes<[THX3T110I1]> { 143 let Latency = 23; 144 let ResourceCycles = [13, 23]; 145 let NumMicroOps = 4; 146} 147 148// 39 cycles on I1. 149def THX3T110Write_39Cyc_I1 : SchedWriteRes<[THX3T110I1]> { 150 let Latency = 39; 151 let ResourceCycles = [13, 39]; 152 let NumMicroOps = 4; 153} 154 155// 1 cycle on I2/I3 156def THX3T110Write_1Cyc_I23 : SchedWriteRes<[THX3T110I23]> { 157 let Latency = 1; 158 let NumMicroOps = 2; 159} 160 161// 8 cycles on I2/I3 162def THX3T110Write_8Cyc_I23 : SchedWriteRes<[THX3T110I23]> { 163 let Latency = 8; 164 let NumMicroOps = 3; 165} 166 167// 1 cycle on I1/I2/I3 168def THX3T110Write_1Cyc_I123 : SchedWriteRes<[THX3T110I123]> { 169 let Latency = 1; 170 let NumMicroOps = 2; 171} 172 173// 8 cycles on I1/I2/I3 174def THX3T110Write_8Cyc_I123 : SchedWriteRes<[THX3T110I123]> { 175 let Latency = 8; 176 let NumMicroOps = 3; 177} 178 179// 1 cycle on I0/I1/I2/I3. 180def THX3T110Write_1Cyc_I0123 : SchedWriteRes<[THX3T110I0123]> { 181 let Latency = 1; 182 let NumMicroOps = 2; 183} 184 185// 2 cycles on I0/I1/I2/I3. 186def THX3T110Write_2Cyc_I0123 : SchedWriteRes<[THX3T110I0123]> { 187 let Latency = 2; 188 let NumMicroOps = 2; 189} 190 191// 3 cycles on I0/I1/I2/I3. 192def THX3T110Write_3Cyc_I0123 : SchedWriteRes<[THX3T110I0123]> { 193 let Latency = 3; 194 let NumMicroOps = 2; 195} 196 197// 4 cycles on I0/I1/I2/I3. 198def THX3T110Write_4Cyc_I0123 : SchedWriteRes<[THX3T110I0123]> { 199 let Latency = 4; 200 let NumMicroOps = 3; 201} 202 203// 5 cycles on I0/I1/I2/I3. 204def THX3T110Write_5Cyc_I0123 : SchedWriteRes<[THX3T110I0123]> { 205 let Latency = 5; 206 let NumMicroOps = 3; 207} 208 209// 6 cycles on I0/I1/I2/I3. 210def THX3T110Write_6Cyc_I0123 : SchedWriteRes<[THX3T110I0123]> { 211 let Latency = 6; 212 let NumMicroOps = 3; 213} 214 215// 8 cycles on I0/I1/I2/I3. 216def THX3T110Write_8Cyc_I0123 : SchedWriteRes<[THX3T110I0123]> { 217 let Latency = 8; 218 let NumMicroOps = 4; 219} 220 221// 13 cycles on I0/I1/I2/I3. 222def THX3T110Write_13Cyc_I0123 : SchedWriteRes<[THX3T110I0123]> { 223 let Latency = 13; 224 let NumMicroOps = 3; 225} 226 227// 23 cycles on I0/I1/I2/I3. 228def THX3T110Write_23Cyc_I0123 : SchedWriteRes<[THX3T110I0123]> { 229 let Latency = 23; 230 let NumMicroOps = 3; 231} 232 233// 39 cycles on I0/I1/I2/I3. 234def THX3T110Write_39Cyc_I0123 : SchedWriteRes<[THX3T110I0123]> { 235 let Latency = 39; 236 let NumMicroOps = 3; 237} 238 239// 4 cycles on F2/F3. 240def THX3T110Write_4Cyc_F23 : SchedWriteRes<[THX3T110FP23]> { 241 let Latency = 4; 242 let NumMicroOps = 2; 243} 244 245// 5 cycles on F0/F1/F2/F3. 246def THX3T110Write_5Cyc_F01 : SchedWriteRes<[THX3T110FP0123]> { 247 let Latency = 5; 248 let NumMicroOps = 2; 249} 250 251// 6 cycles on F0/F1/F2/F3. 252def THX3T110Write_6Cyc_F01 : SchedWriteRes<[THX3T110FP0123]> { 253 let Latency = 6; 254 let NumMicroOps = 3; 255} 256 257// 7 cycles on F0/F1/F2/F3. 258def THX3T110Write_7Cyc_F01 : SchedWriteRes<[THX3T110FP0123]> { 259 let Latency = 7; 260 let NumMicroOps = 3; 261} 262 263// 8 cycles on F0/F1/F2/F3. 264def THX3T110Write_8Cyc_F01 : SchedWriteRes<[THX3T110FP0123]> { 265 let Latency = 8; 266 let NumMicroOps = 3; 267} 268 269// 10 cycles on F0/F1/F2/F3. 270def THX3T110Write_10Cyc_F01 : SchedWriteRes<[THX3T110FP0123]> { 271 let Latency = 10; 272 let NumMicroOps = 3; 273} 274 275// 16 cycles on F0/F1/F2/F3. 276def THX3T110Write_16Cyc_F01 : SchedWriteRes<[THX3T110FP0123]> { 277 let Latency = 16; 278 let NumMicroOps = 3; 279 let ResourceCycles = [8]; 280} 281 282// 23 cycles on F0/F1/F2/F3. 283def THX3T110Write_23Cyc_F01 : SchedWriteRes<[THX3T110FP0123]> { 284 let Latency = 23; 285 let NumMicroOps = 3; 286 let ResourceCycles = [11]; 287} 288 289// 1 cycle on LS0/LS1. 290def THX3T110Write_1Cyc_LS01 : SchedWriteRes<[THX3T110LS]> { 291 let Latency = 1; 292 let NumMicroOps = 1; 293} 294 295// 2 cycles on LS0/LS1. 296def THX3T110Write_2Cyc_LS01 : SchedWriteRes<[THX3T110LS]> { 297 let Latency = 2; 298 let NumMicroOps = 2; 299} 300 301// 4 cycles on LS0/LS1. 302def THX3T110Write_4Cyc_LS01 : SchedWriteRes<[THX3T110LS]> { 303 let Latency = 4; 304 let NumMicroOps = 2; 305 let ResourceCycles = [2]; 306} 307 308// 5 cycles on LS0/LS1. 309def THX3T110Write_5Cyc_LS01 : SchedWriteRes<[THX3T110LS]> { 310 let Latency = 5; 311 let NumMicroOps = 3; 312} 313 314// 6 cycles on LS0/LS1. 315def THX3T110Write_6Cyc_LS01 : SchedWriteRes<[THX3T110LS]> { 316 let Latency = 6; 317 let NumMicroOps = 3; 318} 319 320// 4 + 5 cycles on LS0/LS1. 321// First resource is available after 4 cycles. 322// Second resource is available after 5 cycles. 323// Load vector pair, immed offset, Q-form [LDP/LDNP]. 324def THX3T110Write_4_5Cyc_LS01 : SchedWriteRes<[THX3T110LS]> { 325 let Latency = 4; 326 let NumMicroOps = 2; 327 let ResourceCycles = [4, 5]; 328} 329 330// 4 + 8 cycles on LS0/LS1. 331// First resource is available after 4 cycles. 332// Second resource is available after 8 cycles. 333// Load vector pair, immed offset, S/D-form [LDP/LDNP]. 334def THX3T110Write_4_8Cyc_LS01 : SchedWriteRes<[THX3T110LS]> { 335 let Latency = 4; 336 let NumMicroOps = 2; 337 let ResourceCycles = [4, 8]; 338} 339 340// 11 cycles on LS0/LS1 and I1. 341def THX3T110Write_11Cyc_LS01_I1 : 342 SchedWriteRes<[THX3T110LS, THX3T110I1]> { 343 let Latency = 11; 344 let NumMicroOps = 4; 345} 346 347// 1 cycles on LS0/LS1 and I0/I1/I2/I3. 348def THX3T110Write_1Cyc_LS01_I0123 : 349 SchedWriteRes<[THX3T110LS, THX3T110I0123]> { 350 let Latency = 1; 351 let NumMicroOps = 2; 352} 353 354// 1 cycles on LS0/LS1 and 2 of I0/I1/I2/I3. 355def THX3T110Write_1Cyc_LS01_I0123_I0123 : 356 SchedWriteRes<[THX3T110LS, THX3T110I0123, THX3T110I0123]> { 357 let Latency = 1; 358 let NumMicroOps = 3; 359} 360 361// 4 cycles on LS0/LS1 and I0/I1/I2/I3. 362def THX3T110Write_4Cyc_LS01_I0123 : 363 SchedWriteRes<[THX3T110LS, THX3T110I0123]> { 364 let Latency = 4; 365 let NumMicroOps = 3; 366} 367 368// 4 cycles on LS0/LS1 and 2 of I0/I1/I2/I3. 369def THX3T110Write_4Cyc_LS01_I0123_I0123 : 370 SchedWriteRes<[THX3T110LS, THX3T110I0123, THX3T110I0123]> { 371 let Latency = 4; 372 let NumMicroOps = 3; 373} 374 375// 5 cycles on LS0/LS1 and I0/I1/I2/I3. 376def THX3T110Write_5Cyc_LS01_I0123 : 377 SchedWriteRes<[THX3T110LS, THX3T110I0123]> { 378 let Latency = 5; 379 let NumMicroOps = 3; 380} 381 382// 5 cycles on LS0/LS1 and 2 of I0/I1/I2/I3. 383def THX3T110Write_5Cyc_LS01_I0123_I0123 : 384 SchedWriteRes<[THX3T110LS, THX3T110I0123, THX3T110I0123]> { 385 let Latency = 5; 386 let NumMicroOps = 3; 387} 388 389// 6 cycles on LS0/LS1 and I0/I1/I2/I3. 390def THX3T110Write_6Cyc_LS01_I012 : 391 SchedWriteRes<[THX3T110LS, THX3T110I0123]> { 392 let Latency = 6; 393 let NumMicroOps = 4; 394} 395 396// 6 cycles on LS0/LS1 and 2 of I0/I1/I2/I3. 397def THX3T110Write_6Cyc_LS01_I0123_I0123 : 398 SchedWriteRes<[THX3T110LS, THX3T110I0123, THX3T110I0123]> { 399 let Latency = 6; 400 let NumMicroOps = 3; 401} 402 403// 1 cycle on LS0/LS1 and SD. 404def THX3T110Write_1Cyc_LS01_SD : 405 SchedWriteRes<[THX3T110LS, THX3T110SD]> { 406 let Latency = 1; 407 let NumMicroOps = 2; 408} 409 410// 2 cycles on LS0/LS1 and SD. 411def THX3T110Write_2Cyc_LS01_SD : 412 SchedWriteRes<[THX3T110LS, THX3T110SD]> { 413 let Latency = 2; 414 let NumMicroOps = 2; 415} 416 417// 4 cycles on LS0/LS1 and SD. 418def THX3T110Write_4Cyc_LS01_SD : 419 SchedWriteRes<[THX3T110LS, THX3T110SD]> { 420 let Latency = 4; 421 let NumMicroOps = 3; 422} 423 424// 5 cycles on LS0/LS1 and SD. 425def THX3T110Write_5Cyc_LS01_SD : 426 SchedWriteRes<[THX3T110LS, THX3T110SD]> { 427 let Latency = 5; 428 let NumMicroOps = 4; 429} 430 431// 6 cycles on LS0/LS1 and SD. 432def THX3T110Write_6Cyc_LS01_SD : 433 SchedWriteRes<[THX3T110LS, THX3T110SD]> { 434 let Latency = 6; 435 let NumMicroOps = 5; 436} 437 438// 1 cycle on LS0/LS1, SD and I0/I1/I2/I3. 439def THX3T110Write_1Cyc_LS01_SD_I0123 : 440 SchedWriteRes<[THX3T110LS, THX3T110SD, THX3T110I0123]> { 441 let Latency = 1; 442 let NumMicroOps = 2; 443} 444 445// 2 cycles on LS0/LS1, SD and I0/I1/I2/I3. 446def THX3T110Write_2Cyc_LS01_SD_I0123 : 447 SchedWriteRes<[THX3T110LS, THX3T110SD, THX3T110I0123]> { 448 let Latency = 2; 449 let NumMicroOps = 2; 450} 451 452// 4 cycles on LS0/LS1, SD and I0/I1/I2/I3. 453def THX3T110Write_4Cyc_LS01_SD_I0123 : 454 SchedWriteRes<[THX3T110LS, THX3T110SD, THX3T110I0123]> { 455 let Latency = 4; 456 let NumMicroOps = 3; 457} 458 459// 5 cycles on LS0/LS1, SD and I0/I1/I2/I3. 460def THX3T110Write_5Cyc_LS01_SD_I0123 : 461 SchedWriteRes<[THX3T110LS, THX3T110SD, THX3T110I0123]> { 462 let Latency = 5; 463 let NumMicroOps = 4; 464} 465 466// 6 cycles on LS0/LS1, SD and I0/I1/I2/I3. 467def THX3T110Write_6Cyc_LS01_SD_I0123 : 468 SchedWriteRes<[THX3T110LS, THX3T110SD, THX3T110I0123]> { 469 let Latency = 6; 470 let NumMicroOps = 5; 471} 472 473// 1 cycles on LS0/LS1 and F0/F1/F2/F3. 474def THX3T110Write_1Cyc_LS01_F0123 : 475 SchedWriteRes<[THX3T110LS, THX3T110FP0123]> { 476 let Latency = 1; 477 let NumMicroOps = 2; 478} 479 480// 5 cycles on LS0/LS1 and F0/F1/F2/F3. 481def THX3T110Write_5Cyc_LS01_F0123 : 482 SchedWriteRes<[THX3T110LS, THX3T110FP0123]> { 483 let Latency = 5; 484 let NumMicroOps = 3; 485} 486 487// 6 cycles on LS0/LS1 and F0/F1/F2/F3. 488def THX3T110Write_6Cyc_LS01_F0123 : 489 SchedWriteRes<[THX3T110LS, THX3T110FP0123]> { 490 let Latency = 6; 491 let NumMicroOps = 3; 492} 493 494// 7 cycles on LS0/LS1 and F0/F1/F2/F3. 495def THX3T110Write_7Cyc_LS01_F0123 : 496 SchedWriteRes<[THX3T110LS, THX3T110FP0123]> { 497 let Latency = 7; 498 let NumMicroOps = 3; 499} 500 501// 8 cycles on LS0/LS1 and F0/F1/F2/F3. 502def THX3T110Write_8Cyc_LS01_F0123 : 503 SchedWriteRes<[THX3T110LS, THX3T110FP0123]> { 504 let Latency = 8; 505 let NumMicroOps = 3; 506} 507 508// 8 cycles on LS0/LS1 and I0/I1/I2/I3. 509def THX3T110Write_8Cyc_LS01_I0123 : 510 SchedWriteRes<[THX3T110LS, THX3T110I0123]> { 511 let Latency = 8; 512 let NumMicroOps = 3; 513} 514 515// 12 cycles on LS0/LS1 and I0/I1/I2/I3. 516def THX3T110Write_12Cyc_LS01_I0123 : 517 SchedWriteRes<[THX3T110LS, THX3T110I0123]> { 518 let Latency = 12; 519 let NumMicroOps = 4; 520} 521 522// 16 cycles on LS0/LS1 and I0/I1/I2/I3. 523def THX3T110Write_16Cyc_LS01_I0123 : 524 SchedWriteRes<[THX3T110LS, THX3T110I0123]> { 525 let Latency = 16; 526 let NumMicroOps = 5; 527} 528 529// 24 cycles on LS0/LS1 and I0/I1/I2/I3. 530def THX3T110Write_24Cyc_LS01_I0123 : 531 SchedWriteRes<[THX3T110LS, THX3T110I0123]> { 532 let Latency = 24; 533 let NumMicroOps = 10; 534} 535 536// 32 cycles on LS0/LS1 and I0/I1/I2/I3. 537def THX3T110Write_32Cyc_LS01_I0123 : 538 SchedWriteRes<[THX3T110LS, THX3T110I0123]> { 539 let Latency = 32; 540 let NumMicroOps = 14; 541} 542 543// 3 cycles on F0/F1/F2/F3. 544def THX3T110Write_3Cyc_F0123 : SchedWriteRes<[THX3T110FP0123]> { 545 let Latency = 3; 546 let NumMicroOps = 2; 547} 548 549// 4 cycles on F0/F1/F2/F3. 550def THX3T110Write_4Cyc_F0123 : SchedWriteRes<[THX3T110FP0123]> { 551 let Latency = 4; 552 let NumMicroOps = 2; 553} 554 555// 5 cycles on F0/F1/F2/F3. 556def THX3T110Write_5Cyc_F0123 : SchedWriteRes<[THX3T110FP0123]> { 557 let Latency = 5; 558 let NumMicroOps = 2; 559} 560 561// 10 cycles on F0/F1/F2/F3. 562def THX3T110Write_10Cyc_F0123 : SchedWriteRes<[THX3T110FP0123]> { 563 let Latency = 10; 564 let NumMicroOps = 4; 565} 566 567// 15 cycles on F0/F1/F2/F3. 568def THX3T110Write_15Cyc_F0123 : SchedWriteRes<[THX3T110FP0123]> { 569 let Latency = 15; 570 let NumMicroOps = 7; 571} 572 573// 16 cycles on F0/F1/F2/F3. 574def THX3T110Write_16Cyc_F0123 : SchedWriteRes<[THX3T110FP0123]> { 575 let Latency = 16; 576 let NumMicroOps = 3; 577} 578 579// 18 cycles on F0/F1/F2/F3. 580def THX3T110Write_18Cyc_F0123 : SchedWriteRes<[THX3T110FP0123]> { 581 let Latency = 18; 582 let NumMicroOps = 3; 583} 584 585// 19 cycles on F0/F1/F2/F3. 586def THX3T110Write_19Cyc_F0123 : SchedWriteRes<[THX3T110FP0123]> { 587 let Latency = 19; 588 let NumMicroOps = 4; 589} 590 591// 20 cycles on F0/F1/F2/F3. 592def THX3T110Write_20Cyc_F0123 : SchedWriteRes<[THX3T110FP0123]> { 593 let Latency = 20; 594 let NumMicroOps = 4; 595} 596 597// 23 cycles on F0/F1/F2/F3. 598def THX3T110Write_23Cyc_F0123 : SchedWriteRes<[THX3T110FP0123]> { 599 let Latency = 23; 600 let NumMicroOps = 4; 601} 602 603// 3 cycles on F2/F3 and 4 cycles on F0/F1/F2/F3. 604def THX3T110Write_3_4Cyc_F23_F0123 : 605 SchedWriteRes<[THX3T110FP23, THX3T110FP0123]> { 606 let Latency = 3; 607 let NumMicroOps = 2; 608 let ResourceCycles = [3, 4]; 609} 610 611 612// Define commonly used read types. 613 614// No forwarding is provided for these types. 615def : ReadAdvance<ReadI, 0>; 616def : ReadAdvance<ReadISReg, 0>; 617def : ReadAdvance<ReadIEReg, 0>; 618def : ReadAdvance<ReadIM, 0>; 619def : ReadAdvance<ReadIMA, 0>; 620def : ReadAdvance<ReadID, 0>; 621def : ReadAdvance<ReadExtrHi, 0>; 622def : ReadAdvance<ReadAdrBase, 0>; 623def : ReadAdvance<ReadVLD, 0>; 624 625//===----------------------------------------------------------------------===// 626// 3. Instruction Tables. 627 628//--- 629// 3.1 Branch Instructions 630//--- 631 632// Branch, immed 633// Branch and link, immed 634// Compare and branch 635def : WriteRes<WriteBr, [THX3T110I23]> { 636 let Latency = 1; 637 let NumMicroOps = 2; 638} 639 640// Branch, register 641// Branch and link, register != LR 642// Branch and link, register = LR 643def : WriteRes<WriteBrReg, [THX3T110I23]> { 644 let Latency = 1; 645 let NumMicroOps = 2; 646} 647 648def : WriteRes<WriteSys, []> { let Latency = 1; } 649def : WriteRes<WriteBarrier, []> { let Latency = 1; } 650def : WriteRes<WriteHint, []> { let Latency = 1; } 651 652def : WriteRes<WriteAtomic, []> { 653 let Latency = 4; 654 let NumMicroOps = 2; 655} 656 657//--- 658// Branch 659//--- 660def : InstRW<[THX3T110Write_1Cyc_I23], (instrs B, BL, BR, BLR)>; 661def : InstRW<[THX3T110Write_1Cyc_I23], (instrs Bcc)>; 662def : InstRW<[THX3T110Write_1Cyc_I23], (instrs RET)>; 663def : InstRW<[THX3T110Write_1Cyc_I23], 664 (instrs CBZW, CBZX, CBNZW, CBNZX, TBZW, TBZX, TBNZW, TBNZX)>; 665 666//--- 667// 3.2 Arithmetic and Logical Instructions 668// 3.3 Move and Shift Instructions 669//--- 670 671 672// ALU, basic 673// Conditional compare 674// Conditional select 675// Address generation 676def : WriteRes<WriteI, [THX3T110I0123]> { 677 let Latency = 1; 678 let ResourceCycles = [1]; 679 let NumMicroOps = 2; 680} 681 682def : InstRW<[WriteI], 683 (instregex "ADD?(W|X)r(i|r|s|x)", "ADDS?(W|X)r(i|r|s|x)(64)?", 684 "AND?(W|X)r(i|r|s|x)", "ANDS?(W|X)r(i|r|s|x)", 685 "ADC(W|X)r", 686 "BIC?(W|X)r(i|r|s|x)", "BICS?(W|X)r(i|r|s|x)", 687 "EON?(W|X)r(i|r|s|x)", "ORN?(W|X)r(i|r|s|x)", 688 "ORR?(W|X)r(i|r|s|x)", "SUB?(W|X)r(i|r|s|x)", 689 "SUBS?(W|X)r(i|r|s|x)", "SBC(W|X)r", 690 "SBCS(W|X)r", "CCMN(W|X)(i|r)", 691 "CCMP(W|X)(i|r)", "CSEL(W|X)r", 692 "CSINC(W|X)r", "CSINV(W|X)r", 693 "CSNEG(W|X)r")>; 694 695def : InstRW<[WriteI], (instrs COPY)>; 696 697// ALU, extend and/or shift 698def : WriteRes<WriteISReg, [THX3T110I0123]> { 699 let Latency = 2; 700 let ResourceCycles = [2]; 701 let NumMicroOps = 2; 702} 703 704def : InstRW<[WriteISReg], 705 (instregex "ADD?(W|X)r(i|r|s|x)", "ADDS?(W|X)r(i|r|s|x)(64)?", 706 "AND?(W|X)r(i|r|s|x)", "ANDS?(W|X)r(i|r|s|x)", 707 "ADC(W|X)r", 708 "BIC?(W|X)r(i|r|s|x)", "BICS?(W|X)r(i|r|s|x)", 709 "EON?(W|X)r(i|r|s|x)", "ORN?(W|X)r(i|r|s|x)", 710 "ORR?(W|X)r(i|r|s|x)", "SUB?(W|X)r(i|r|s|x)", 711 "SUBS?(W|X)r(i|r|s|x)", "SBC(W|X)r", 712 "SBCS(W|X)r", "CCMN(W|X)(i|r)", 713 "CCMP(W|X)(i|r)", "CSEL(W|X)r", 714 "CSINC(W|X)r", "CSINV(W|X)r", 715 "CSNEG(W|X)r")>; 716 717def : WriteRes<WriteIEReg, [THX3T110I0123]> { 718 let Latency = 1; 719 let ResourceCycles = [1]; 720 let NumMicroOps = 2; 721} 722 723def : InstRW<[WriteIEReg], 724 (instregex "ADD?(W|X)r(i|r|s|x)", "ADDS?(W|X)r(i|r|s|x)(64)?", 725 "AND?(W|X)r(i|r|s|x)", "ANDS?(W|X)r(i|r|s|x)", 726 "ADC(W|X)r", 727 "BIC?(W|X)r(i|r|s|x)", "BICS?(W|X)r(i|r|s|x)", 728 "EON?(W|X)r(i|r|s|x)", "ORN?(W|X)r(i|r|s|x)", 729 "ORR?(W|X)r(i|r|s|x)", "SUB?(W|X)r(i|r|s|x)", 730 "SUBS?(W|X)r(i|r|s|x)", "SBC(W|X)r", 731 "SBCS(W|X)r", "CCMN(W|X)(i|r)", 732 "CCMP(W|X)(i|r)", "CSEL(W|X)r", 733 "CSINC(W|X)r", "CSINV(W|X)r", 734 "CSNEG(W|X)r")>; 735 736// Move immed 737def : WriteRes<WriteImm, [THX3T110I0123]> { 738 let Latency = 1; 739 let NumMicroOps = 2; 740} 741 742def : InstRW<[THX3T110Write_1Cyc_I0123], 743 (instrs MOVKWi, MOVKXi, MOVNWi, MOVNXi, MOVZWi, MOVZXi)>; 744 745def : InstRW<[THX3T110Write_1Cyc_I0123], 746 (instrs ASRVWr, ASRVXr, LSLVWr, LSLVXr, RORVWr, RORVXr)>; 747 748// Variable shift 749def : WriteRes<WriteIS, [THX3T110I0123]> { 750 let Latency = 1; 751 let NumMicroOps = 2; 752} 753 754//--- 755// 3.4 Divide and Multiply Instructions 756//--- 757 758// Divide, W-form 759// Latency range of 13-23/13-39. 760def : WriteRes<WriteID32, [THX3T110I1]> { 761 let Latency = 39; 762 let ResourceCycles = [39]; 763 let NumMicroOps = 4; 764} 765 766// Divide, X-form 767def : WriteRes<WriteID64, [THX3T110I1]> { 768 let Latency = 23; 769 let ResourceCycles = [23]; 770 let NumMicroOps = 4; 771} 772 773// Multiply accumulate, W-form 774def : WriteRes<WriteIM32, [THX3T110I0123]> { 775 let Latency = 5; 776 let NumMicroOps = 3; 777} 778 779// Multiply accumulate, X-form 780def : WriteRes<WriteIM64, [THX3T110I0123]> { 781 let Latency = 5; 782 let NumMicroOps = 3; 783} 784 785//def : InstRW<[WriteIM32, ReadIM, ReadIM, ReadIMA, THX3T110Write_5Cyc_I012], 786// (instrs MADDWrrr, MSUBWrrr)>; 787def : InstRW<[WriteIM32], (instrs MADDWrrr, MSUBWrrr)>; 788def : InstRW<[WriteIM32], (instrs MADDXrrr, MSUBXrrr)>; 789def : InstRW<[THX3T110Write_5Cyc_I0123], 790 (instregex "(S|U)(MADDL|MSUBL)rrr")>; 791 792def : InstRW<[WriteID32], (instrs SDIVWr, UDIVWr)>; 793def : InstRW<[WriteID64], (instrs SDIVXr, UDIVXr)>; 794 795// Bitfield extract, two reg 796def : WriteRes<WriteExtr, [THX3T110I0123]> { 797 let Latency = 1; 798 let NumMicroOps = 2; 799} 800 801// Multiply high 802def : InstRW<[THX3T110Write_4Cyc_I1], (instrs SMULHrr, UMULHrr)>; 803 804// Miscellaneous Data-Processing Instructions 805// Bitfield extract 806def : InstRW<[THX3T110Write_1Cyc_I0123], (instrs EXTRWrri, EXTRXrri)>; 807 808// Bitifield move - basic 809def : InstRW<[THX3T110Write_1Cyc_I0123], 810 (instrs SBFMWri, SBFMXri, UBFMWri, UBFMXri)>; 811 812// Bitfield move, insert 813def : InstRW<[THX3T110Write_1Cyc_I0123], (instregex "^BFM")>; 814def : InstRW<[THX3T110Write_1Cyc_I0123], (instregex "(S|U)?BFM.*")>; 815 816// Count leading 817def : InstRW<[THX3T110Write_3_4Cyc_F23_F0123], 818 (instregex "^CLS(W|X)r$", "^CLZ(W|X)r$")>; 819 820// Reverse bits 821def : InstRW<[THX3T110Write_3_4Cyc_F23_F0123], (instrs RBITWr, RBITXr)>; 822 823// Cryptography Extensions 824def : InstRW<[THX3T110Write_4Cyc_F0123], (instregex "^AES[DE]")>; 825def : InstRW<[THX3T110Write_4Cyc_F0123], (instregex "^AESI?MC")>; 826def : InstRW<[THX3T110Write_4Cyc_F0123], (instregex "^PMULL")>; 827def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^SHA1SU0")>; 828def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^SHA1(H|SU1)")>; 829def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^SHA1[CMP]")>; 830def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^SHA256SU0")>; 831def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^SHA256(H|H2|SU1)")>; 832 833// CRC Instructions 834// def : InstRW<[THX3T110Write_4Cyc_I1], (instregex "^CRC32", "^CRC32C")>; 835def : InstRW<[THX3T110Write_4Cyc_I1], 836 (instrs CRC32Brr, CRC32Hrr, CRC32Wrr, CRC32Xrr)>; 837 838def : InstRW<[THX3T110Write_4Cyc_I1], 839 (instrs CRC32CBrr, CRC32CHrr, CRC32CWrr, CRC32CXrr)>; 840 841// Reverse bits/bytes 842// NOTE: Handled by WriteI. 843 844//--- 845// 3.6 Load Instructions 846// 3.10 FP Load Instructions 847//--- 848 849// Load register, literal 850// Load register, unscaled immed 851// Load register, immed unprivileged 852// Load register, unsigned immed 853def : WriteRes<WriteLD, [THX3T110LS]> { 854 let Latency = 4; 855 let NumMicroOps = 4; 856} 857 858// Load register, immed post-index 859// NOTE: Handled by WriteLD, WriteI. 860// Load register, immed pre-index 861// NOTE: Handled by WriteLD, WriteAdr. 862def : WriteRes<WriteAdr, [THX3T110I0123]> { 863 let Latency = 1; 864 let NumMicroOps = 2; 865} 866 867// Load pair, immed offset, normal 868// Load pair, immed offset, signed words, base != SP 869// Load pair, immed offset signed words, base = SP 870// LDP only breaks into *one* LS micro-op. Thus 871// the resources are handled by WriteLD. 872def : WriteRes<WriteLDHi, []> { 873 let Latency = 4; 874 let NumMicroOps = 4; 875} 876 877// Load register offset, basic 878// Load register, register offset, scale by 4/8 879// Load register, register offset, scale by 2 880// Load register offset, extend 881// Load register, register offset, extend, scale by 4/8 882// Load register, register offset, extend, scale by 2 883def THX3T110WriteLDIdx : SchedWriteVariant<[ 884 SchedVar<ScaledIdxPred, [THX3T110Write_4Cyc_LS01_I0123_I0123]>, 885 SchedVar<NoSchedPred, [THX3T110Write_4Cyc_LS01_I0123]>]>; 886def : SchedAlias<WriteLDIdx, THX3T110WriteLDIdx>; 887 888def THX3T110ReadAdrBase : SchedReadVariant<[ 889 SchedVar<ScaledIdxPred, [ReadDefault]>, 890 SchedVar<NoSchedPred, [ReadDefault]>]>; 891def : SchedAlias<ReadAdrBase, THX3T110ReadAdrBase>; 892 893// Load pair, immed pre-index, normal 894// Load pair, immed pre-index, signed words 895// Load pair, immed post-index, normal 896// Load pair, immed post-index, signed words 897def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, WriteLDHi], (instrs LDNPDi)>; 898def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, WriteLDHi], (instrs LDNPQi)>; 899def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, WriteLDHi], (instrs LDNPSi)>; 900def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, WriteLDHi], (instrs LDNPWi)>; 901def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, WriteLDHi], (instrs LDNPXi)>; 902 903def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, WriteLDHi], (instrs LDPDi)>; 904def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, WriteLDHi], (instrs LDPQi)>; 905def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, WriteLDHi], (instrs LDPSi)>; 906def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, WriteLDHi], (instrs LDPSWi)>; 907def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, WriteLDHi], (instrs LDPWi)>; 908def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, WriteLDHi], (instrs LDPXi)>; 909 910def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDRBui)>; 911def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDRDui)>; 912def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDRHui)>; 913def : InstRW<[THX3T110Write_5Cyc_LS01], (instrs LDRQui)>; 914def : InstRW<[THX3T110Write_5Cyc_LS01], (instrs LDRSui)>; 915 916def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDRDl)>; 917def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDRQl)>; 918def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDRWl)>; 919def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDRXl)>; 920 921def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDTRBi)>; 922def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDTRHi)>; 923def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDTRWi)>; 924def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDTRXi)>; 925 926def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDTRSBWi)>; 927def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDTRSBXi)>; 928def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDTRSHWi)>; 929def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDTRSHXi)>; 930def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDTRSWi)>; 931 932def : InstRW<[THX3T110Write_5Cyc_LS01_I0123, WriteLDHi, WriteAdr], 933 (instrs LDPDpre)>; 934def : InstRW<[THX3T110Write_5Cyc_LS01_I0123, WriteLDHi, WriteAdr], 935 (instrs LDPQpre)>; 936def : InstRW<[THX3T110Write_5Cyc_LS01_I0123, WriteLDHi, WriteAdr], 937 (instrs LDPSpre)>; 938def : InstRW<[THX3T110Write_5Cyc_LS01_I0123, WriteLDHi, WriteAdr], 939 (instrs LDPWpre)>; 940def : InstRW<[THX3T110Write_5Cyc_LS01_I0123, WriteLDHi, WriteAdr], 941 (instrs LDPWpre)>; 942 943def : InstRW<[THX3T110Write_4Cyc_LS01, WriteAdr], 944 (instrs LDRBpre, LDRDpre, LDRHpre, LDRQpre, 945 LDRSpre, LDRWpre, LDRXpre, 946 LDRSBWpre, LDRSBXpre, LDRSBWpost, LDRSBXpost, 947 LDRSHWpre, LDRSHXpre, LDRSHWpost, LDRSHXpost, 948 LDRBBpre, LDRBBpost, LDRHHpre, LDRHHpost)>; 949 950def : InstRW<[THX3T110Write_5Cyc_LS01_I0123, WriteLDHi, WriteAdr], 951 (instrs LDPDpost, LDPQpost, LDPSpost, LDPWpost, LDPXpost)>; 952 953def : InstRW<[THX3T110Write_5Cyc_LS01_I0123, WriteI], 954 (instrs LDRBpost, LDRDpost, LDRHpost, 955 LDRQpost, LDRSpost, LDRWpost, LDRXpost)>; 956 957def : InstRW<[THX3T110Write_4Cyc_LS01_I0123_I0123, WriteLDHi, WriteAdr], 958 (instrs LDPDpre, LDPQpre, LDPSpre, LDPWpre, LDPXpre)>; 959 960def : InstRW<[THX3T110Write_4Cyc_LS01_I0123_I0123, WriteAdr], 961 (instrs LDRBpre, LDRDpre, LDRHpre, LDRQpre, 962 LDRSpre, LDRWpre, LDRXpre)>; 963 964def : InstRW<[THX3T110Write_4Cyc_LS01_I0123_I0123, WriteLDHi, WriteAdr], 965 (instrs LDPDpost, LDPQpost, LDPSpost, LDPWpost, LDPXpost)>; 966 967def : InstRW<[THX3T110Write_4Cyc_LS01_I0123_I0123, WriteI], 968 (instrs LDRBpost, LDRDpost, LDRHpost, LDRQpost, 969 LDRSpost, LDRWpost, LDRXpost)>; 970 971def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, ReadAdrBase], (instrs LDRBroW)>; 972def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, ReadAdrBase], (instrs LDRDroW)>; 973def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, ReadAdrBase], (instrs LDRHroW)>; 974def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, ReadAdrBase], (instrs LDRHHroW)>; 975def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, ReadAdrBase], (instrs LDRQroW)>; 976def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, ReadAdrBase], (instrs LDRSroW)>; 977def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, ReadAdrBase], (instrs LDRSHWroW)>; 978def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, ReadAdrBase], (instrs LDRSHXroW)>; 979def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, ReadAdrBase], (instrs LDRWroW)>; 980def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, ReadAdrBase], (instrs LDRXroW)>; 981 982def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, ReadAdrBase], (instrs LDRBroX)>; 983def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, ReadAdrBase], (instrs LDRDroX)>; 984def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, ReadAdrBase], (instrs LDRHHroX)>; 985def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, ReadAdrBase], (instrs LDRHroX)>; 986def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, ReadAdrBase], (instrs LDRQroX)>; 987def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, ReadAdrBase], (instrs LDRSroX)>; 988def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, ReadAdrBase], (instrs LDRSHWroX)>; 989def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, ReadAdrBase], (instrs LDRSHXroX)>; 990def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, ReadAdrBase], (instrs LDRWroX)>; 991def : InstRW<[THX3T110Write_4Cyc_LS01_I0123, ReadAdrBase], (instrs LDRXroX)>; 992 993def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDURBi)>; 994def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDURBBi)>; 995def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDURDi)>; 996def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDURHi)>; 997def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDURHHi)>; 998def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDURQi)>; 999def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDURSi)>; 1000def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDURXi)>; 1001def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDURSBWi)>; 1002def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDURSBXi)>; 1003def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDURSHWi)>; 1004def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDURSHXi)>; 1005def : InstRW<[THX3T110Write_4Cyc_LS01], (instrs LDURSWi)>; 1006 1007// Load exclusive 1008def : InstRW<[THX3T110Write_4Cyc_LS01], (instregex "^LDAR(B|H|W|X)$")>; 1009def : InstRW<[THX3T110Write_4Cyc_LS01], (instregex "^LDAXR(B|H|W|X)$")>; 1010def : InstRW<[THX3T110Write_4Cyc_LS01], (instregex "^LDXR(B|H|W|X)$")>; 1011def : InstRW<[THX3T110Write_4Cyc_LS01], (instregex "^LDAXP(W|X)$")>; 1012def : InstRW<[THX3T110Write_4Cyc_LS01], (instregex "^LDXP(W|X)$")>; 1013 1014//--- 1015// Prefetch 1016//--- 1017def : InstRW<[THX3T110Write_6Cyc_LS01_I012], (instrs PRFMl)>; 1018def : InstRW<[THX3T110Write_6Cyc_LS01_I012], (instrs PRFUMi)>; 1019def : InstRW<[THX3T110Write_6Cyc_LS01_I012], (instrs PRFMui)>; 1020def : InstRW<[THX3T110Write_6Cyc_LS01_I012], (instrs PRFMroW)>; 1021def : InstRW<[THX3T110Write_6Cyc_LS01_I012], (instrs PRFMroX)>; 1022 1023//-- 1024// 3.7 Store Instructions 1025// 3.11 FP Store Instructions 1026//-- 1027 1028// Store register, unscaled immed 1029// Store register, immed unprivileged 1030// Store register, unsigned immed 1031def : WriteRes<WriteST, [THX3T110LS, THX3T110SD]> { 1032 let Latency = 1; 1033 let NumMicroOps = 2; 1034} 1035 1036// Store register, immed post-index 1037// NOTE: Handled by WriteAdr, WriteST, ReadAdrBase 1038 1039// Store register, immed pre-index 1040// NOTE: Handled by WriteAdr, WriteST 1041 1042// Store register, register offset, basic 1043// Store register, register offset, scaled by 4/8 1044// Store register, register offset, scaled by 2 1045// Store register, register offset, extend 1046// Store register, register offset, extend, scale by 4/8 1047// Store register, register offset, extend, scale by 1 1048def : WriteRes<WriteSTIdx, [THX3T110LS, THX3T110SD, THX3T110I0123]> { 1049 let Latency = 1; 1050 let NumMicroOps = 2; 1051} 1052 1053// Store pair, immed offset, W-form 1054// Store pair, immed offset, X-form 1055def : WriteRes<WriteSTP, [THX3T110LS, THX3T110SD]> { 1056 let Latency = 1; 1057 let NumMicroOps = 2; 1058} 1059 1060// Store pair, immed post-index, W-form 1061// Store pair, immed post-index, X-form 1062// Store pair, immed pre-index, W-form 1063// Store pair, immed pre-index, X-form 1064// NOTE: Handled by WriteAdr, WriteSTP. 1065def : InstRW<[THX3T110Write_1Cyc_LS01_SD], (instrs STURBi)>; 1066def : InstRW<[THX3T110Write_1Cyc_LS01_SD], (instrs STURBBi)>; 1067def : InstRW<[THX3T110Write_1Cyc_LS01_SD], (instrs STURDi)>; 1068def : InstRW<[THX3T110Write_1Cyc_LS01_SD], (instrs STURHi)>; 1069def : InstRW<[THX3T110Write_1Cyc_LS01_SD], (instrs STURHHi)>; 1070def : InstRW<[THX3T110Write_1Cyc_LS01_SD], (instrs STURQi)>; 1071def : InstRW<[THX3T110Write_1Cyc_LS01_SD], (instrs STURSi)>; 1072def : InstRW<[THX3T110Write_1Cyc_LS01_SD], (instrs STURWi)>; 1073def : InstRW<[THX3T110Write_1Cyc_LS01_SD], (instrs STURXi)>; 1074 1075def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_SD], (instrs STTRBi)>; 1076def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_SD], (instrs STTRHi)>; 1077def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_SD], (instrs STTRWi)>; 1078def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_SD], (instrs STTRXi)>; 1079 1080def : InstRW<[THX3T110Write_1Cyc_LS01_SD], (instrs STNPDi)>; 1081def : InstRW<[THX3T110Write_1Cyc_LS01_SD], (instrs STNPQi)>; 1082def : InstRW<[THX3T110Write_1Cyc_LS01_SD], (instrs STNPXi)>; 1083def : InstRW<[THX3T110Write_1Cyc_LS01_SD], (instrs STNPWi)>; 1084 1085def : InstRW<[THX3T110Write_1Cyc_LS01_SD], (instrs STPDi)>; 1086def : InstRW<[THX3T110Write_1Cyc_LS01_SD], (instrs STPQi)>; 1087def : InstRW<[THX3T110Write_1Cyc_LS01_SD], (instrs STPXi)>; 1088def : InstRW<[THX3T110Write_1Cyc_LS01_SD], (instrs STPWi)>; 1089 1090def : InstRW<[THX3T110Write_1Cyc_LS01_I0123], (instrs STRBui)>; 1091def : InstRW<[THX3T110Write_1Cyc_LS01_I0123], (instrs STRDui)>; 1092def : InstRW<[THX3T110Write_1Cyc_LS01_I0123], (instrs STRHui)>; 1093def : InstRW<[THX3T110Write_1Cyc_LS01_I0123], (instrs STRQui)>; 1094def : InstRW<[THX3T110Write_1Cyc_LS01_I0123], (instrs STRXui)>; 1095def : InstRW<[THX3T110Write_1Cyc_LS01_I0123], (instrs STRWui)>; 1096 1097def : InstRW<[WriteSTP, THX3T110Write_1Cyc_LS01_SD], (instrs STRBui)>; 1098def : InstRW<[WriteSTP, THX3T110Write_1Cyc_LS01_SD], (instrs STRDui)>; 1099def : InstRW<[WriteSTP, THX3T110Write_1Cyc_LS01_SD], (instrs STRHui)>; 1100def : InstRW<[WriteSTP, THX3T110Write_1Cyc_LS01_SD], (instrs STRQui)>; 1101def : InstRW<[WriteSTP, THX3T110Write_1Cyc_LS01_SD], (instrs STRXui)>; 1102def : InstRW<[WriteSTP, THX3T110Write_1Cyc_LS01_SD], (instrs STRWui)>; 1103 1104def : InstRW<[WriteSTIdx, THX3T110Write_1Cyc_LS01_SD_I0123], (instrs STRBui)>; 1105def : InstRW<[WriteSTIdx, THX3T110Write_1Cyc_LS01_SD_I0123], (instrs STRDui)>; 1106def : InstRW<[WriteSTIdx, THX3T110Write_1Cyc_LS01_SD_I0123], (instrs STRHui)>; 1107def : InstRW<[WriteSTIdx, THX3T110Write_1Cyc_LS01_SD_I0123], (instrs STRQui)>; 1108def : InstRW<[WriteSTIdx, THX3T110Write_1Cyc_LS01_SD_I0123], (instrs STRXui)>; 1109def : InstRW<[WriteSTIdx, THX3T110Write_1Cyc_LS01_SD_I0123], (instrs STRWui)>; 1110 1111def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123], 1112 (instrs STPDpre, STPDpost)>; 1113def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123, ReadAdrBase], 1114 (instrs STPDpre, STPDpost)>; 1115def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123], 1116 (instrs STPQpre, STPQpost)>; 1117def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123, ReadAdrBase], 1118 (instrs STPQpre, STPQpost)>; 1119def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123], 1120 (instrs STPSpre, STPSpost)>; 1121def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123, ReadAdrBase], 1122 (instrs STPSpre, STPSpost)>; 1123def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123], 1124 (instrs STPWpre, STPWpost)>; 1125def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123, ReadAdrBase], 1126 (instrs STPWpre, STPWpost)>; 1127def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123], 1128 (instrs STPXpre, STPXpost)>; 1129def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123, ReadAdrBase], 1130 (instrs STPXpre, STPXpost)>; 1131def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123], 1132 (instrs STRBpre, STRBpost)>; 1133def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123, ReadAdrBase], 1134 (instrs STRBpre, STRBpost)>; 1135def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123], 1136 (instrs STRBBpre, STRBBpost)>; 1137def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123, ReadAdrBase], 1138 (instrs STRBBpre, STRBBpost)>; 1139def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123], 1140 (instrs STRDpre, STRDpost)>; 1141def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123, ReadAdrBase], 1142 (instrs STRDpre, STRDpost)>; 1143def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123], 1144 (instrs STRHpre, STRHpost)>; 1145def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123, ReadAdrBase], 1146 (instrs STRHpre, STRHpost)>; 1147def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123], 1148 (instrs STRHHpre, STRHHpost)>; 1149def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123, ReadAdrBase], 1150 (instrs STRHHpre, STRHHpost)>; 1151def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123], 1152 (instrs STRQpre, STRQpost)>; 1153def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123, ReadAdrBase], 1154 (instrs STRQpre, STRQpost)>; 1155def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123], 1156 (instrs STRSpre, STRSpost)>; 1157def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123, ReadAdrBase], 1158 (instrs STRSpre, STRSpost)>; 1159def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123], 1160 (instrs STRWpre, STRWpost)>; 1161def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123, ReadAdrBase], 1162 (instrs STRWpre, STRWpost)>; 1163def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123], 1164 (instrs STRXpre, STRXpost)>; 1165def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123, ReadAdrBase], 1166 (instrs STRXpre, STRXpost)>; 1167def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123, ReadAdrBase], 1168 (instrs STRBroW, STRBroX)>; 1169def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123, ReadAdrBase], 1170 (instrs STRBBroW, STRBBroX)>; 1171def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123, ReadAdrBase], 1172 (instrs STRDroW, STRDroX)>; 1173def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123, ReadAdrBase], 1174 (instrs STRHroW, STRHroX)>; 1175def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123, ReadAdrBase], 1176 (instrs STRHHroW, STRHHroX)>; 1177def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123, ReadAdrBase], 1178 (instrs STRQroW, STRQroX)>; 1179def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123, ReadAdrBase], 1180 (instrs STRSroW, STRSroX)>; 1181def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123, ReadAdrBase], 1182 (instrs STRWroW, STRWroX)>; 1183def : InstRW<[WriteAdr, THX3T110Write_1Cyc_LS01_I0123, ReadAdrBase], 1184 (instrs STRXroW, STRXroX)>; 1185 1186// Store exclusive 1187def : InstRW<[THX3T110Write_4Cyc_LS01_SD], (instrs STNPWi, STNPXi)>; 1188def : InstRW<[THX3T110Write_4Cyc_LS01_SD], (instregex "^STLR(B|H|W|X)$")>; 1189def : InstRW<[THX3T110Write_4Cyc_LS01_SD], (instregex "^STXP(W|X)$")>; 1190def : InstRW<[THX3T110Write_4Cyc_LS01_SD], (instregex "^STXR(B|H|W|X)$")>; 1191def : InstRW<[THX3T110Write_4Cyc_LS01_SD], (instregex "^STLXP(W|X)$")>; 1192def : InstRW<[THX3T110Write_4Cyc_LS01_SD], (instregex "^STLXR(B|H|W|X)$")>; 1193 1194//--- 1195// 3.8 FP Data Processing Instructions 1196//--- 1197 1198// FP absolute value 1199// FP min/max 1200// FP negate 1201def : WriteRes<WriteF, [THX3T110FP0123]> { 1202 let Latency = 5; 1203 let NumMicroOps = 2; 1204} 1205 1206// FP arithmetic 1207def : InstRW<[THX3T110Write_6Cyc_F01], (instregex "^FADD", "^FSUB")>; 1208 1209// FP compare 1210def : WriteRes<WriteFCmp, [THX3T110FP0123]> { 1211 let Latency = 5; 1212 let NumMicroOps = 2; 1213} 1214 1215// FP Mul, Div, Sqrt 1216def : WriteRes<WriteFDiv, [THX3T110FP0123]> { 1217 let Latency = 22; 1218 let ResourceCycles = [19]; 1219} 1220 1221def THX3T110XWriteFDiv : SchedWriteRes<[THX3T110FP0123]> { 1222 let Latency = 16; 1223 let ResourceCycles = [8]; 1224 let NumMicroOps = 4; 1225} 1226 1227def THX3T110XWriteFDivSP : SchedWriteRes<[THX3T110FP0123]> { 1228 let Latency = 16; 1229 let ResourceCycles = [8]; 1230 let NumMicroOps = 4; 1231} 1232 1233def THX3T110XWriteFDivDP : SchedWriteRes<[THX3T110FP0123]> { 1234 let Latency = 23; 1235 let ResourceCycles = [12]; 1236 let NumMicroOps = 4; 1237} 1238 1239def THX3T110XWriteFSqrtSP : SchedWriteRes<[THX3T110FP0123]> { 1240 let Latency = 16; 1241 let ResourceCycles = [8]; 1242 let NumMicroOps = 4; 1243} 1244 1245def THX3T110XWriteFSqrtDP : SchedWriteRes<[THX3T110FP0123]> { 1246 let Latency = 23; 1247 let ResourceCycles = [12]; 1248 let NumMicroOps = 4; 1249} 1250 1251// FP divide, S-form 1252// FP square root, S-form 1253def : InstRW<[THX3T110XWriteFDivSP], (instrs FDIVSrr)>; 1254def : InstRW<[THX3T110XWriteFSqrtSP], (instrs FSQRTSr)>; 1255def : InstRW<[THX3T110XWriteFDivSP], (instregex "^FDIVv.*32$")>; 1256def : InstRW<[THX3T110XWriteFSqrtSP], (instregex "^.*SQRT.*32$")>; 1257def : InstRW<[THX3T110Write_16Cyc_F01], (instregex "^FDIVSrr", "^FSQRTSr")>; 1258 1259// FP divide, D-form 1260// FP square root, D-form 1261def : InstRW<[THX3T110XWriteFDivDP], (instrs FDIVDrr)>; 1262def : InstRW<[THX3T110XWriteFSqrtDP], (instrs FSQRTDr)>; 1263def : InstRW<[THX3T110XWriteFDivDP], (instregex "^FDIVv.*64$")>; 1264def : InstRW<[THX3T110XWriteFSqrtDP], (instregex "^.*SQRT.*64$")>; 1265def : InstRW<[THX3T110Write_23Cyc_F01], (instregex "^FDIVDrr", "^FSQRTDr")>; 1266 1267// FP multiply 1268// FP multiply accumulate 1269def : WriteRes<WriteFMul, [THX3T110FP0123]> { 1270 let Latency = 6; 1271 let ResourceCycles = [2]; 1272 let NumMicroOps = 3; 1273} 1274 1275def THX3T110XWriteFMul : SchedWriteRes<[THX3T110FP0123]> { 1276 let Latency = 6; 1277 let ResourceCycles = [2]; 1278 let NumMicroOps = 3; 1279} 1280 1281def THX3T110XWriteFMulAcc : SchedWriteRes<[THX3T110FP0123]> { 1282 let Latency = 6; 1283 let ResourceCycles = [2]; 1284 let NumMicroOps = 3; 1285} 1286 1287def : InstRW<[THX3T110XWriteFMul], (instregex "^FMUL", "^FNMUL")>; 1288def : InstRW<[THX3T110XWriteFMulAcc], 1289 (instregex "^FMADD", "^FMSUB", "^FNMADD", "^FNMSUB")>; 1290 1291// FP round to integral 1292def : InstRW<[THX3T110Write_7Cyc_F01], 1293 (instregex "^FRINT(A|I|M|N|P|X|Z)(Sr|Dr)")>; 1294 1295// FP select 1296def : InstRW<[THX3T110Write_3_4Cyc_F23_F0123], (instregex "^FCSEL")>; 1297 1298//--- 1299// 3.9 FP Miscellaneous Instructions 1300//--- 1301 1302// FP convert, from vec to vec reg 1303// FP convert, from gen to vec reg 1304// FP convert, from vec to gen reg 1305def : WriteRes<WriteFCvt, [THX3T110FP0123]> { 1306 let Latency = 7; 1307 let NumMicroOps = 3; 1308} 1309 1310// FP move, immed 1311// FP move, register 1312def : WriteRes<WriteFImm, [THX3T110FP0123]> { 1313 let Latency = 4; 1314 let NumMicroOps = 2; 1315} 1316 1317// FP transfer, from gen to vec reg 1318// FP transfer, from vec to gen reg 1319def : WriteRes<WriteFCopy, [THX3T110FP0123]> { 1320 let Latency = 4; 1321 let NumMicroOps = 2; 1322} 1323 1324def : InstRW<[THX3T110Write_5Cyc_F01], (instrs FMOVXDHighr, FMOVDXHighr)>; 1325 1326//--- 1327// 3.12 ASIMD Integer Instructions 1328//--- 1329 1330// ASIMD absolute diff, D-form 1331// ASIMD absolute diff, Q-form 1332// ASIMD absolute diff accum, D-form 1333// ASIMD absolute diff accum, Q-form 1334// ASIMD absolute diff accum long 1335// ASIMD absolute diff long 1336// ASIMD arith, basic 1337// ASIMD arith, complex 1338// ASIMD compare 1339// ASIMD logical (AND, BIC, EOR) 1340// ASIMD max/min, basic 1341// ASIMD max/min, reduce, 4H/4S 1342// ASIMD max/min, reduce, 8B/8H 1343// ASIMD max/min, reduce, 16B 1344// ASIMD multiply, D-form 1345// ASIMD multiply, Q-form 1346// ASIMD multiply accumulate long 1347// ASIMD multiply accumulate saturating long 1348// ASIMD multiply long 1349// ASIMD pairwise add and accumulate 1350// ASIMD shift accumulate 1351// ASIMD shift by immed, basic 1352// ASIMD shift by immed and insert, basic, D-form 1353// ASIMD shift by immed and insert, basic, Q-form 1354// ASIMD shift by immed, complex 1355// ASIMD shift by register, basic, D-form 1356// ASIMD shift by register, basic, Q-form 1357// ASIMD shift by register, complex, D-form 1358// ASIMD shift by register, complex, Q-form 1359def : WriteRes<WriteV, [THX3T110FP0123]> { 1360 let Latency = 5; 1361 let NumMicroOps = 4; 1362 let ResourceCycles = [4]; 1363} 1364 1365// ASIMD arith, reduce, 4H/4S 1366// ASIMD arith, reduce, 8B/8H 1367// ASIMD arith, reduce, 16B 1368 1369// ASIMD logical (MVN (alias for NOT), ORN, ORR) 1370def : InstRW<[THX3T110Write_5Cyc_F0123], 1371 (instregex "^ANDv", "^BICv", "^EORv", "^ORRv", "^ORNv", "^NOTv")>; 1372 1373// ASIMD arith, reduce 1374def : InstRW<[THX3T110Write_5Cyc_F0123], 1375 (instregex "^ADDVv", "^SADDLVv", "^UADDLVv")>; 1376 1377// ASIMD polynomial (8x8) multiply long 1378def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^(S|U|SQD)MULL")>; 1379def : InstRW<[THX3T110Write_5Cyc_F0123], 1380 (instregex "(S|U|SQD)(MLAL|MLSL|MULL)v.*")>; 1381def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^PMULL(v8i8|v16i8)")>; 1382def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^PMULL(v1i64|v2i64)")>; 1383 1384// ASIMD absolute diff accum, D-form 1385def : InstRW<[THX3T110Write_5Cyc_F0123], 1386 (instregex "^[SU]ABA(v8i8|v4i16|v2i32)$")>; 1387// ASIMD absolute diff accum, Q-form 1388def : InstRW<[THX3T110Write_5Cyc_F0123], 1389 (instregex "^[SU]ABA(v16i8|v8i16|v4i32)$")>; 1390// ASIMD absolute diff accum long 1391def : InstRW<[THX3T110Write_5Cyc_F0123], 1392 (instregex "^[SU]ABAL")>; 1393// ASIMD arith, reduce, 4H/4S 1394def : InstRW<[THX3T110Write_5Cyc_F0123], 1395 (instregex "^[SU]?ADDL?V(v8i8|v4i16|v2i32)v$")>; 1396// ASIMD arith, reduce, 8B 1397def : InstRW<[THX3T110Write_5Cyc_F0123], 1398 (instregex "^[SU]?ADDL?V(v8i16|v4i32)v$")>; 1399// ASIMD arith, reduce, 16B/16H 1400def : InstRW<[THX3T110Write_10Cyc_F0123], 1401 (instregex "^[SU]?ADDL?Vv16i8v$")>; 1402// ASIMD max/min, reduce, 4H/4S 1403def : InstRW<[THX3T110Write_5Cyc_F0123], 1404 (instregex "^[SU](MIN|MAX)V(v4i16|v4i32)v$")>; 1405// ASIMD max/min, reduce, 8B/8H 1406def : InstRW<[THX3T110Write_5Cyc_F0123], 1407 (instregex "^[SU](MIN|MAX)V(v8i8|v8i16)v$")>; 1408// ASIMD max/min, reduce, 16B/16H 1409def : InstRW<[THX3T110Write_5Cyc_F0123], 1410 (instregex "^[SU](MIN|MAX)Vv16i8v$")>; 1411// ASIMD multiply, D-form 1412def : InstRW<[THX3T110Write_5Cyc_F0123], 1413 (instregex "^(P?MUL|SQR?DMULH)" # 1414 "(v8i8|v4i16|v2i32|v1i8|v1i16|v1i32|v1i64)" # 1415 "(_indexed)?$")>; 1416// ASIMD multiply, Q-form 1417def : InstRW<[THX3T110Write_5Cyc_F0123], 1418 (instregex "^(P?MUL|SQR?DMULH)(v16i8|v8i16|v4i32)(_indexed)?$")>; 1419// ASIMD multiply accumulate, D-form 1420def : InstRW<[THX3T110Write_5Cyc_F0123], 1421 (instregex "^ML[AS](v8i8|v4i16|v2i32)(_indexed)?$")>; 1422// ASIMD multiply accumulate, Q-form 1423def : InstRW<[THX3T110Write_5Cyc_F0123], 1424 (instregex "^ML[AS](v16i8|v8i16|v4i32)(_indexed)?$")>; 1425// ASIMD shift accumulate 1426def : InstRW<[THX3T110Write_5Cyc_F0123], 1427 (instregex "SRSRAv","SSRAv","URSRAv","USRAv")>; 1428 1429// ASIMD shift by immed, basic 1430def : InstRW<[THX3T110Write_5Cyc_F0123], 1431 (instregex "RSHRNv","SHRNv", "SQRSHRNv","SQRSHRUNv", 1432 "SQSHRNv","SQSHRUNv", "UQRSHRNv", 1433 "UQSHRNv","SQXTNv","SQXTUNv","UQXTNv")>; 1434// ASIMD shift by immed, complex 1435def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^[SU]?(Q|R){1,2}SHR")>; 1436def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^SQSHLU")>; 1437// ASIMD shift by register, basic, Q-form 1438def : InstRW<[THX3T110Write_5Cyc_F01], 1439 (instregex "^[SU]SHL(v16i8|v8i16|v4i32|v2i64)")>; 1440// ASIMD shift by register, complex, D-form 1441def : InstRW<[THX3T110Write_5Cyc_F0123], 1442 (instregex "^[SU][QR]{1,2}SHL" # 1443 "(v1i8|v1i16|v1i32|v1i64|v8i8|v4i16|v2i32|b|d|h|s)")>; 1444// ASIMD shift by register, complex, Q-form 1445def : InstRW<[THX3T110Write_5Cyc_F0123], 1446 (instregex "^[SU][QR]{1,2}SHL(v16i8|v8i16|v4i32|v2i64)")>; 1447 1448// ASIMD Arithmetic 1449def : InstRW<[THX3T110Write_5Cyc_F0123], 1450 (instregex "(ADD|SUB)(v8i8|v4i16|v2i32|v1i64)")>; 1451def : InstRW<[THX3T110Write_5Cyc_F0123], 1452 (instregex "(ADD|SUB)(v16i8|v8i16|v4i32|v2i64)")>; 1453def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "(ADD|SUB)HNv.*")>; 1454def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "(RADD|RSUB)HNv.*")>; 1455def : InstRW<[THX3T110Write_5Cyc_F0123], 1456 (instregex "^SQADD", "^SQNEG", "^SQSUB", "^SRHADD", 1457 "^SUQADD", "^UQADD", "^UQSUB", "^URHADD", "^USQADD")>; 1458def : InstRW<[THX3T110Write_5Cyc_F0123], 1459 (instregex "ADDP(v16i8|v8i16|v4i32|v2i64)")>; 1460def : InstRW<[THX3T110Write_5Cyc_F0123], 1461 (instregex "((AND|ORN|EOR|EON)S?(Xr[rsi]|v16i8|v8i16|v4i32)|" # 1462 "(ORR|BIC)S?(Xr[rs]|v16i8|v8i16|v4i32))")>; 1463def : InstRW<[THX3T110Write_5Cyc_F0123], 1464 (instregex "(CLS|CLZ|CNT)(v4i32|v8i16|v16i8)")>; 1465def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^SADALP","^UADALP")>; 1466def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^SADDLPv","^UADDLPv")>; 1467def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^SADDLV","^UADDLV")>; 1468def : InstRW<[THX3T110Write_5Cyc_F0123], 1469 (instregex "^ADDVv","^SMAXVv","^UMAXVv","^SMINVv","^UMINVv")>; 1470def : InstRW<[THX3T110Write_5Cyc_F0123], 1471 (instregex "^SABAv","^UABAv","^SABALv","^UABALv")>; 1472def : InstRW<[THX3T110Write_5Cyc_F0123], 1473 (instregex "^SQADDv","^SQSUBv","^UQADDv","^UQSUBv")>; 1474def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^SUQADDv","^USQADDv")>; 1475def : InstRW<[THX3T110Write_5Cyc_F0123], 1476 (instregex "^ADDHNv","^RADDHNv", "^RSUBHNv", 1477 "^SQABS", "^SQADD", "^SQNEG", "^SQSUB", 1478 "^SRHADD", "^SUBHNv", "^SUQADD", 1479 "^UQADD", "^UQSUB", "^URHADD", "^USQADD")>; 1480def : InstRW<[THX3T110Write_5Cyc_F0123], 1481 (instregex "^CMEQv","^CMGEv","^CMGTv", 1482 "^CMLEv","^CMLTv", "^CMHIv","^CMHSv")>; 1483def : InstRW<[THX3T110Write_5Cyc_F0123], 1484 (instregex "^SMAXv","^SMINv","^UMAXv","^UMINv", 1485 "^SMAXPv","^SMINPv","^UMAXPv","^UMINPv")>; 1486def : InstRW<[THX3T110Write_5Cyc_F0123], 1487 (instregex "^SABDv","^UABDv", "^SABDLv","^UABDLv")>; 1488 1489//--- 1490// 3.13 ASIMD Floating-point Instructions 1491//--- 1492 1493// ASIMD FP absolute value 1494def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^FABSv")>; 1495 1496// ASIMD FP arith, normal, D-form 1497// ASIMD FP arith, normal, Q-form 1498def : InstRW<[THX3T110Write_3_4Cyc_F23_F0123], 1499 (instregex "^FABDv", "^FADDv", "^FSUBv")>; 1500 1501// ASIMD FP arith,pairwise, D-form 1502// ASIMD FP arith, pairwise, Q-form 1503def : InstRW<[THX3T110Write_3_4Cyc_F23_F0123], (instregex "^FADDPv")>; 1504 1505// ASIMD FP compare, D-form 1506// ASIMD FP compare, Q-form 1507def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^FACGEv", "^FACGTv")>; 1508def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^FCMEQv", "^FCMGEv", 1509 "^FCMGTv", "^FCMLEv", 1510 "^FCMLTv")>; 1511 1512// ASIMD FP round, D-form 1513def : InstRW<[THX3T110Write_5Cyc_F0123], 1514 (instregex "^FRINT[AIMNPXZ](v2f32)")>; 1515// ASIMD FP round, Q-form 1516def : InstRW<[THX3T110Write_5Cyc_F0123], 1517 (instregex "^FRINT[AIMNPXZ](v4f32|v2f64)")>; 1518 1519// ASIMD FP convert, long 1520// ASIMD FP convert, narrow 1521// ASIMD FP convert, other, D-form 1522// ASIMD FP convert, other, Q-form 1523// NOTE: Handled by WriteV. 1524 1525// ASIMD FP convert, long and narrow 1526def : InstRW<[THX3T110Write_5Cyc_F01], (instregex "^FCVT(L|N|XN)v")>; 1527// ASIMD FP convert, other, D-form 1528def : InstRW<[THX3T110Write_5Cyc_F01], 1529 (instregex "^[FVSU]CVT([AMNPZ][SU])?(_Int)?(v2f32|v1i32|v2i32|v1i64)")>; 1530// ASIMD FP convert, other, Q-form 1531def : InstRW<[THX3T110Write_5Cyc_F01], 1532 (instregex "^[FVSU]CVT([AMNPZ][SU])?(_Int)?(v4f32|v2f64|v4i32|v2i64)")>; 1533 1534// ASIMD FP divide, D-form, F32 1535def : InstRW<[THX3T110Write_16Cyc_F0123], (instrs FDIVv2f32)>; 1536def : InstRW<[THX3T110Write_16Cyc_F0123], (instregex "FDIVv2f32")>; 1537 1538// ASIMD FP divide, Q-form, F32 1539def : InstRW<[THX3T110Write_16Cyc_F0123], (instrs FDIVv4f32)>; 1540def : InstRW<[THX3T110Write_16Cyc_F0123], (instregex "FDIVv4f32")>; 1541 1542// ASIMD FP divide, Q-form, F64 1543def : InstRW<[THX3T110Write_23Cyc_F0123], (instrs FDIVv2f64)>; 1544def : InstRW<[THX3T110Write_23Cyc_F0123], (instregex "FDIVv2f64")>; 1545 1546// ASIMD FP max/min, normal, D-form 1547// ASIMD FP max/min, normal, Q-form 1548def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^FMAXv", "^FMAXNMv", 1549 "^FMINv", "^FMINNMv")>; 1550 1551// ASIMD FP max/min, pairwise, D-form 1552// ASIMD FP max/min, pairwise, Q-form 1553def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^FMAXPv", "^FMAXNMPv", 1554 "^FMINPv", "^FMINNMPv")>; 1555 1556// ASIMD FP max/min, reduce 1557def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^FMAXVv", "^FMAXNMVv", 1558 "^FMINVv", "^FMINNMVv")>; 1559 1560// ASIMD FP multiply, D-form, FZ 1561// ASIMD FP multiply, D-form, no FZ 1562// ASIMD FP multiply, Q-form, FZ 1563// ASIMD FP multiply, Q-form, no FZ 1564def : InstRW<[THX3T110Write_5Cyc_F0123], 1565 (instregex "^FMULv", "^FMULXv")>; 1566def : InstRW<[THX3T110Write_5Cyc_F0123], 1567 (instregex "^FMULX?(v2f32|v1i32|v2i32|v1i64|32|64)")>; 1568def : InstRW<[THX3T110Write_5Cyc_F0123], 1569 (instregex "^FMULX?(v4f32|v2f64|v4i32|v2i64)")>; 1570 1571// ASIMD FP multiply accumulate, Dform, FZ 1572// ASIMD FP multiply accumulate, Dform, no FZ 1573// ASIMD FP multiply accumulate, Qform, FZ 1574// ASIMD FP multiply accumulate, Qform, no FZ 1575def : InstRW<[THX3T110Write_5Cyc_F0123], 1576 (instregex "^FMLAv", "^FMLSv")>; 1577def : InstRW<[THX3T110Write_5Cyc_F0123], 1578 (instregex "^FML[AS](v2f32|v1i32|v2i32|v1i64)")>; 1579def : InstRW<[THX3T110Write_5Cyc_F0123], 1580 (instregex "^FML[AS](v4f32|v2f64|v4i32|v2i64)")>; 1581 1582// ASIMD FP negate 1583def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^FNEGv")>; 1584 1585//-- 1586// 3.14 ASIMD Miscellaneous Instructions 1587//-- 1588 1589// ASIMD bit reverse 1590def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^RBITv")>; 1591 1592// ASIMD bitwise insert, D-form 1593// ASIMD bitwise insert, Q-form 1594def : InstRW<[THX3T110Write_3_4Cyc_F23_F0123], 1595 (instregex "^BIFv", "^BITv", "^BSLv")>; 1596 1597// ASIMD count, D-form 1598// ASIMD count, Q-form 1599def : InstRW<[THX3T110Write_3_4Cyc_F23_F0123], 1600 (instregex "^CLSv", "^CLZv", "^CNTv")>; 1601 1602// ASIMD duplicate, gen reg 1603// ASIMD duplicate, element 1604def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^DUPv")>; 1605def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^CPY")>; 1606def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^DUPv.+gpr")>; 1607 1608// ASIMD extract 1609def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^EXTv")>; 1610 1611// ASIMD extract narrow 1612def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^XTNv")>; 1613 1614// ASIMD extract narrow, saturating 1615def : InstRW<[THX3T110Write_5Cyc_F0123], 1616 (instregex "^SQXTNv", "^SQXTUNv", "^UQXTNv")>; 1617 1618// ASIMD insert, element to element 1619def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^INSv")>; 1620 1621// ASIMD transfer, element to gen reg 1622def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^[SU]MOVv")>; 1623 1624// ASIMD move, integer immed 1625def : InstRW<[THX3T110Write_3_4Cyc_F23_F0123], (instregex "^MOVIv")>; 1626 1627// ASIMD move, FP immed 1628def : InstRW<[THX3T110Write_3_4Cyc_F23_F0123], (instregex "^FMOVv")>; 1629 1630// ASIMD transpose 1631def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^TRN1", "^TRN2")>; 1632 1633// ASIMD unzip/zip 1634def : InstRW<[THX3T110Write_5Cyc_F0123], 1635 (instregex "^UZP1", "^UZP2", "^ZIP1", "^ZIP2")>; 1636 1637// ASIMD reciprocal estimate, D-form 1638// ASIMD reciprocal estimate, Q-form 1639def : InstRW<[THX3T110Write_5Cyc_F0123], 1640 (instregex "^FRECPEv", "^FRECPXv", "^URECPEv", 1641 "^FRSQRTEv", "^URSQRTEv")>; 1642 1643// ASIMD reciprocal step, D-form, FZ 1644// ASIMD reciprocal step, D-form, no FZ 1645// ASIMD reciprocal step, Q-form, FZ 1646// ASIMD reciprocal step, Q-form, no FZ 1647def : InstRW<[THX3T110Write_5Cyc_F0123], 1648 (instregex "^FRECPSv", "^FRSQRTSv")>; 1649 1650// ASIMD reverse 1651def : InstRW<[THX3T110Write_5Cyc_F0123], 1652 (instregex "^REV16v", "^REV32v", "^REV64v")>; 1653 1654// ASIMD table lookup, D-form 1655// ASIMD table lookup, Q-form 1656def : InstRW<[THX3T110Write_5Cyc_F0123], 1657 (instrs TBLv8i8One, TBLv16i8One, TBXv8i8One, TBXv16i8One)>; 1658def : InstRW<[THX3T110Write_10Cyc_F0123], 1659 (instrs TBLv8i8Two, TBLv16i8Two, TBXv8i8Two, TBXv16i8Two)>; 1660def : InstRW<[THX3T110Write_15Cyc_F0123], 1661 (instrs TBLv8i8Three, TBLv16i8Three, TBXv8i8Three, TBXv16i8Three)>; 1662def : InstRW<[THX3T110Write_20Cyc_F0123], 1663 (instrs TBLv8i8Four, TBLv16i8Four, TBXv8i8Four, TBXv16i8Four)>; 1664 1665// ASIMD transfer, element to word or word 1666def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^[SU]MOVv")>; 1667 1668// ASIMD transfer, element to gen reg 1669def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "(S|U)MOVv.*")>; 1670 1671// ASIMD transfer gen reg to element 1672def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^INSv")>; 1673 1674// ASIMD transpose 1675def : InstRW<[THX3T110Write_5Cyc_F0123], 1676 (instregex "^TRN1v", "^TRN2v", "^UZP1v", "^UZP2v")>; 1677 1678// ASIMD unzip/zip 1679def : InstRW<[THX3T110Write_5Cyc_F0123], (instregex "^ZIP1v", "^ZIP2v")>; 1680 1681//-- 1682// 3.15 ASIMD Load Instructions 1683//-- 1684 1685// ASIMD load, 1 element, multiple, 1 reg, D-form 1686// ASIMD load, 1 element, multiple, 1 reg, Q-form 1687def : InstRW<[THX3T110Write_4Cyc_LS01], 1688 (instregex "^LD1Onev(8b|4h|2s|1d|16b|8h|4s|2d)$")>; 1689def : InstRW<[THX3T110Write_4Cyc_LS01, WriteAdr], 1690 (instregex "^LD1Onev(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>; 1691 1692// ASIMD load, 1 element, multiple, 2 reg, D-form 1693// ASIMD load, 1 element, multiple, 2 reg, Q-form 1694def : InstRW<[THX3T110Write_4Cyc_LS01], 1695 (instregex "^LD1Twov(8b|4h|2s|1d|16b|8h|4s|2d)$")>; 1696def : InstRW<[THX3T110Write_4Cyc_LS01, WriteAdr], 1697 (instregex "^LD1Twov(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>; 1698 1699// ASIMD load, 1 element, multiple, 3 reg, D-form 1700// ASIMD load, 1 element, multiple, 3 reg, Q-form 1701def : InstRW<[THX3T110Write_5Cyc_LS01], 1702 (instregex "^LD1Threev(8b|4h|2s|1d|16b|8h|4s|2d)$")>; 1703def : InstRW<[THX3T110Write_5Cyc_LS01, WriteAdr], 1704 (instregex "^LD1Threev(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>; 1705 1706// ASIMD load, 1 element, multiple, 4 reg, D-form 1707// ASIMD load, 1 element, multiple, 4 reg, Q-form 1708def : InstRW<[THX3T110Write_6Cyc_LS01], 1709 (instregex "^LD1Fourv(8b|4h|2s|1d|16b|8h|4s|2d)$")>; 1710def : InstRW<[THX3T110Write_6Cyc_LS01, WriteAdr], 1711 (instregex "^LD1Fourv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>; 1712 1713// ASIMD load, 1 element, one lane, B/H/S 1714// ASIMD load, 1 element, one lane, D 1715def : InstRW<[THX3T110Write_5Cyc_LS01_F0123], 1716 (instregex "^LD1i(8|16|32|64)$")>; 1717def : InstRW<[THX3T110Write_5Cyc_LS01_F0123, WriteAdr], 1718 (instregex "^LD1i(8|16|32|64)_POST$")>; 1719 1720// ASIMD load, 1 element, all lanes, D-form, B/H/S 1721// ASIMD load, 1 element, all lanes, D-form, D 1722// ASIMD load, 1 element, all lanes, Q-form 1723def : InstRW<[THX3T110Write_5Cyc_LS01_F0123], 1724 (instregex "^LD1Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>; 1725def : InstRW<[THX3T110Write_5Cyc_LS01_F0123, WriteAdr], 1726 (instregex "^LD1Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>; 1727 1728// ASIMD load, 2 element, multiple, D-form, B/H/S 1729// ASIMD load, 2 element, multiple, Q-form, D 1730def : InstRW<[THX3T110Write_5Cyc_LS01_F0123], 1731 (instregex "^LD2Twov(8b|4h|2s|16b|8h|4s|2d)$")>; 1732def : InstRW<[THX3T110Write_5Cyc_LS01_F0123, WriteAdr], 1733 (instregex "^LD2Twov(8b|4h|2s|16b|8h|4s|2d)_POST$")>; 1734 1735// ASIMD load, 2 element, one lane, B/H 1736// ASIMD load, 2 element, one lane, S 1737// ASIMD load, 2 element, one lane, D 1738def : InstRW<[THX3T110Write_5Cyc_LS01_F0123], 1739 (instregex "^LD2i(8|16|32|64)$")>; 1740def : InstRW<[THX3T110Write_5Cyc_LS01_F0123, WriteAdr], 1741 (instregex "^LD2i(8|16|32|64)_POST$")>; 1742 1743// ASIMD load, 2 element, all lanes, D-form, B/H/S 1744// ASIMD load, 2 element, all lanes, D-form, D 1745// ASIMD load, 2 element, all lanes, Q-form 1746def : InstRW<[THX3T110Write_5Cyc_LS01_F0123], 1747 (instregex "^LD2Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>; 1748def : InstRW<[THX3T110Write_5Cyc_LS01_F0123, WriteAdr], 1749 (instregex "^LD2Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>; 1750 1751// ASIMD load, 3 element, multiple, D-form, B/H/S 1752// ASIMD load, 3 element, multiple, Q-form, B/H/S 1753// ASIMD load, 3 element, multiple, Q-form, D 1754def : InstRW<[THX3T110Write_8Cyc_LS01_F0123], 1755 (instregex "^LD3Threev(8b|4h|2s|16b|8h|4s|2d)$")>; 1756def : InstRW<[THX3T110Write_8Cyc_LS01_F0123, WriteAdr], 1757 (instregex "^LD3Threev(8b|4h|2s|16b|8h|4s|2d)_POST$")>; 1758 1759// ASIMD load, 3 element, one lone, B/H 1760// ASIMD load, 3 element, one lane, S 1761// ASIMD load, 3 element, one lane, D 1762def : InstRW<[THX3T110Write_7Cyc_LS01_F0123], 1763 (instregex "^LD3i(8|16|32|64)$")>; 1764def : InstRW<[THX3T110Write_7Cyc_LS01_F0123, WriteAdr], 1765 (instregex "^LD3i(8|16|32|64)_POST$")>; 1766 1767// ASIMD load, 3 element, all lanes, D-form, B/H/S 1768// ASIMD load, 3 element, all lanes, D-form, D 1769// ASIMD load, 3 element, all lanes, Q-form, B/H/S 1770// ASIMD load, 3 element, all lanes, Q-form, D 1771def : InstRW<[THX3T110Write_7Cyc_LS01_F0123], 1772 (instregex "^LD3Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>; 1773def : InstRW<[THX3T110Write_7Cyc_LS01_F0123, WriteAdr], 1774 (instregex "^LD3Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>; 1775 1776// ASIMD load, 4 element, multiple, D-form, B/H/S 1777// ASIMD load, 4 element, multiple, Q-form, B/H/S 1778// ASIMD load, 4 element, multiple, Q-form, D 1779def : InstRW<[THX3T110Write_8Cyc_LS01_F0123], 1780 (instregex "^LD4Fourv(8b|4h|2s|16b|8h|4s|2d)$")>; 1781def : InstRW<[THX3T110Write_8Cyc_LS01_F0123, WriteAdr], 1782 (instregex "^LD4Fourv(8b|4h|2s|16b|8h|4s|2d)_POST$")>; 1783 1784// ASIMD load, 4 element, one lane, B/H 1785// ASIMD load, 4 element, one lane, S 1786// ASIMD load, 4 element, one lane, D 1787def : InstRW<[THX3T110Write_6Cyc_LS01_F0123], 1788 (instregex "^LD4i(8|16|32|64)$")>; 1789def : InstRW<[THX3T110Write_6Cyc_LS01_F0123, WriteAdr], 1790 (instregex "^LD4i(8|16|32|64)_POST$")>; 1791 1792// ASIMD load, 4 element, all lanes, D-form, B/H/S 1793// ASIMD load, 4 element, all lanes, D-form, D 1794// ASIMD load, 4 element, all lanes, Q-form, B/H/S 1795// ASIMD load, 4 element, all lanes, Q-form, D 1796def : InstRW<[THX3T110Write_6Cyc_LS01_F0123], 1797 (instregex "^LD4Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>; 1798def : InstRW<[THX3T110Write_6Cyc_LS01_F0123, WriteAdr], 1799 (instregex "^LD4Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>; 1800 1801//-- 1802// 3.16 ASIMD Store Instructions 1803//-- 1804 1805// ASIMD store, 1 element, multiple, 1 reg, D-form 1806// ASIMD store, 1 element, multiple, 1 reg, Q-form 1807def : InstRW<[THX3T110Write_1Cyc_LS01], 1808 (instregex "^ST1Onev(8b|4h|2s|1d|16b|8h|4s|2d)$")>; 1809def : InstRW<[THX3T110Write_1Cyc_LS01, WriteAdr], 1810 (instregex "^ST1Onev(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>; 1811 1812// ASIMD store, 1 element, multiple, 2 reg, D-form 1813// ASIMD store, 1 element, multiple, 2 reg, Q-form 1814def : InstRW<[THX3T110Write_1Cyc_LS01], 1815 (instregex "^ST1Twov(8b|4h|2s|1d|16b|8h|4s|2d)$")>; 1816def : InstRW<[THX3T110Write_1Cyc_LS01, WriteAdr], 1817 (instregex "^ST1Twov(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>; 1818 1819// ASIMD store, 1 element, multiple, 3 reg, D-form 1820// ASIMD store, 1 element, multiple, 3 reg, Q-form 1821def : InstRW<[THX3T110Write_1Cyc_LS01], 1822 (instregex "^ST1Threev(8b|4h|2s|1d|16b|8h|4s|2d)$")>; 1823def : InstRW<[THX3T110Write_1Cyc_LS01, WriteAdr], 1824 (instregex "^ST1Threev(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>; 1825 1826// ASIMD store, 1 element, multiple, 4 reg, D-form 1827// ASIMD store, 1 element, multiple, 4 reg, Q-form 1828def : InstRW<[THX3T110Write_1Cyc_LS01], 1829 (instregex "^ST1Fourv(8b|4h|2s|1d|16b|8h|4s|2d)$")>; 1830def : InstRW<[THX3T110Write_1Cyc_LS01, WriteAdr], 1831 (instregex "^ST1Fourv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>; 1832 1833// ASIMD store, 1 element, one lane, B/H/S 1834// ASIMD store, 1 element, one lane, D 1835def : InstRW<[THX3T110Write_1Cyc_LS01_F0123], 1836 (instregex "^ST1i(8|16|32|64)$")>; 1837def : InstRW<[THX3T110Write_1Cyc_LS01_F0123, WriteAdr], 1838 (instregex "^ST1i(8|16|32|64)_POST$")>; 1839 1840// ASIMD store, 2 element, multiple, D-form, B/H/S 1841// ASIMD store, 2 element, multiple, Q-form, B/H/S 1842// ASIMD store, 2 element, multiple, Q-form, D 1843def : InstRW<[THX3T110Write_1Cyc_LS01_F0123], 1844 (instregex "^ST2Twov(8b|4h|2s|16b|8h|4s|2d)$")>; 1845def : InstRW<[THX3T110Write_1Cyc_LS01_F0123, WriteAdr], 1846 (instregex "^ST2Twov(8b|4h|2s|16b|8h|4s|2d)_POST$")>; 1847 1848// ASIMD store, 2 element, one lane, B/H/S 1849// ASIMD store, 2 element, one lane, D 1850def : InstRW<[THX3T110Write_1Cyc_LS01_F0123], 1851 (instregex "^ST2i(8|16|32|64)$")>; 1852def : InstRW<[THX3T110Write_1Cyc_LS01_F0123, WriteAdr], 1853 (instregex "^ST2i(8|16|32|64)_POST$")>; 1854 1855// ASIMD store, 3 element, multiple, D-form, B/H/S 1856// ASIMD store, 3 element, multiple, Q-form, B/H/S 1857// ASIMD store, 3 element, multiple, Q-form, D 1858def : InstRW<[THX3T110Write_1Cyc_LS01_F0123], 1859 (instregex "^ST3Threev(8b|4h|2s|16b|8h|4s|2d)$")>; 1860def : InstRW<[THX3T110Write_1Cyc_LS01_F0123, WriteAdr], 1861 (instregex "^ST3Threev(8b|4h|2s|16b|8h|4s|2d)_POST$")>; 1862 1863// ASIMD store, 3 element, one lane, B/H 1864// ASIMD store, 3 element, one lane, S 1865// ASIMD store, 3 element, one lane, D 1866def : InstRW<[THX3T110Write_1Cyc_LS01_F0123], 1867 (instregex "^ST3i(8|16|32|64)$")>; 1868def : InstRW<[THX3T110Write_1Cyc_LS01_F0123, WriteAdr], 1869 (instregex "^ST3i(8|16|32|64)_POST$")>; 1870 1871// ASIMD store, 4 element, multiple, D-form, B/H/S 1872// ASIMD store, 4 element, multiple, Q-form, B/H/S 1873// ASIMD store, 4 element, multiple, Q-form, D 1874def : InstRW<[THX3T110Write_1Cyc_LS01_F0123], 1875 (instregex "^ST4Fourv(8b|4h|2s|16b|8h|4s|2d)$")>; 1876def : InstRW<[THX3T110Write_1Cyc_LS01_F0123, WriteAdr], 1877 (instregex "^ST4Fourv(8b|4h|2s|16b|8h|4s|2d)_POST$")>; 1878 1879// ASIMD store, 4 element, one lane, B/H 1880// ASIMD store, 4 element, one lane, S 1881// ASIMD store, 4 element, one lane, D 1882def : InstRW<[THX3T110Write_1Cyc_LS01_F0123], 1883 (instregex "^ST4i(8|16|32|64)$")>; 1884def : InstRW<[THX3T110Write_1Cyc_LS01_F0123, WriteAdr], 1885 (instregex "^ST4i(8|16|32|64)_POST$")>; 1886 1887// V8.1a Atomics (LSE) 1888def : InstRW<[THX3T110Write_4Cyc_I0123, WriteAtomic], 1889 (instrs CASB, CASH, CASW, CASX)>; 1890 1891def : InstRW<[THX3T110Write_6Cyc_I0123, WriteAtomic], 1892 (instrs CASAB, CASAH, CASAW, CASAX)>; 1893 1894def : InstRW<[THX3T110Write_6Cyc_I0123, WriteAtomic], 1895 (instrs CASLB, CASLH, CASLW, CASLX)>; 1896 1897def : InstRW<[THX3T110Write_8Cyc_I0123, WriteAtomic], 1898 (instrs CASALB, CASALH, CASALW, CASALX)>; 1899 1900def : InstRW<[THX3T110Write_6Cyc_I0123, WriteAtomic], 1901 (instrs LDLARB, LDLARH, LDLARW, LDLARX)>; 1902 1903def : InstRW<[THX3T110Write_4Cyc_I0123, WriteAtomic], 1904 (instrs LDADDB, LDADDH, LDADDW, LDADDX)>; 1905 1906def : InstRW<[THX3T110Write_6Cyc_I0123, WriteAtomic], 1907 (instrs LDADDAB, LDADDAH, LDADDAW, LDADDAX)>; 1908 1909def : InstRW<[THX3T110Write_6Cyc_I0123, WriteAtomic], 1910 (instrs LDADDLB, LDADDLH, LDADDLW, LDADDLX)>; 1911 1912def : InstRW<[THX3T110Write_8Cyc_I0123, WriteAtomic], 1913 (instrs LDADDALB, LDADDALH, LDADDALW, LDADDALX)>; 1914 1915def : InstRW<[THX3T110Write_4Cyc_I0123, WriteAtomic], 1916 (instrs LDCLRB, LDCLRH, LDCLRW, LDCLRX)>; 1917 1918def : InstRW<[THX3T110Write_6Cyc_I0123, WriteAtomic], 1919 (instrs LDCLRAB, LDCLRAH, LDCLRAW, LDCLRAX)>; 1920 1921def : InstRW<[THX3T110Write_6Cyc_I0123, WriteAtomic], 1922 (instrs LDCLRLB, LDCLRLH, LDCLRLW, LDCLRLX)>; 1923 1924def : InstRW<[THX3T110Write_8Cyc_I0123, WriteAtomic], 1925 (instrs LDCLRALB, LDCLRALH, LDCLRALW, LDCLRALX)>; 1926 1927def : InstRW<[THX3T110Write_4Cyc_I0123, WriteAtomic], 1928 (instrs LDEORB, LDEORH, LDEORW, LDEORX)>; 1929 1930def : InstRW<[THX3T110Write_6Cyc_I0123, WriteAtomic], 1931 (instrs LDEORAB, LDEORAH, LDEORAW, LDEORAX)>; 1932 1933def : InstRW<[THX3T110Write_6Cyc_I0123, WriteAtomic], 1934 (instrs LDEORLB, LDEORLH, LDEORLW, LDEORLX)>; 1935 1936def : InstRW<[THX3T110Write_8Cyc_I0123, WriteAtomic], 1937 (instrs LDEORALB, LDEORALH, LDEORALW, LDEORALX)>; 1938 1939def : InstRW<[THX3T110Write_4Cyc_I0123, WriteAtomic], 1940 (instrs LDSETB, LDSETH, LDSETW, LDSETX)>; 1941 1942def : InstRW<[THX3T110Write_6Cyc_I0123, WriteAtomic], 1943 (instrs LDSETAB, LDSETAH, LDSETAW, LDSETAX)>; 1944 1945def : InstRW<[THX3T110Write_6Cyc_I0123, WriteAtomic], 1946 (instrs LDSETLB, LDSETLH, LDSETLW, LDSETLX)>; 1947 1948def : InstRW<[THX3T110Write_8Cyc_I0123, WriteAtomic], 1949 (instrs LDSETALB, LDSETALH, LDSETALW, LDSETALX)>; 1950 1951def : InstRW<[THX3T110Write_4Cyc_I0123, WriteAtomic], 1952 (instrs LDSMAXB, LDSMAXH, LDSMAXW, LDSMAXX, 1953 LDSMAXAB, LDSMAXAH, LDSMAXAW, LDSMAXAX, 1954 LDSMAXLB, LDSMAXLH, LDSMAXLW, LDSMAXLX, 1955 LDSMAXALB, LDSMAXALH, LDSMAXALW, LDSMAXALX)>; 1956 1957def : InstRW<[THX3T110Write_4Cyc_I0123, WriteAtomic], 1958 (instrs LDSMINB, LDSMINH, LDSMINW, LDSMINX, 1959 LDSMINAB, LDSMINAH, LDSMINAW, LDSMINAX, 1960 LDSMINLB, LDSMINLH, LDSMINLW, LDSMINLX, 1961 LDSMINALB, LDSMINALH, LDSMINALW, LDSMINALX)>; 1962 1963def : InstRW<[THX3T110Write_4Cyc_I0123, WriteAtomic], 1964 (instrs LDUMAXB, LDUMAXH, LDUMAXW, LDUMAXX, 1965 LDUMAXAB, LDUMAXAH, LDUMAXAW, LDUMAXAX, 1966 LDUMAXLB, LDUMAXLH, LDUMAXLW, LDUMAXLX, 1967 LDUMAXALB, LDUMAXALH, LDUMAXALW, LDUMAXALX)>; 1968 1969def : InstRW<[THX3T110Write_4Cyc_I0123, WriteAtomic], 1970 (instrs LDUMINB, LDUMINH, LDUMINW, LDUMINX, 1971 LDUMINAB, LDUMINAH, LDUMINAW, LDUMINAX, 1972 LDUMINLB, LDUMINLH, LDUMINLW, LDUMINLX, 1973 LDUMINALB, LDUMINALH, LDUMINALW, LDUMINALX)>; 1974 1975def : InstRW<[THX3T110Write_4Cyc_I0123, WriteAtomic], 1976 (instrs SWPB, SWPH, SWPW, SWPX)>; 1977 1978def : InstRW<[THX3T110Write_6Cyc_I0123, WriteAtomic], 1979 (instrs SWPAB, SWPAH, SWPAW, SWPAX)>; 1980 1981def : InstRW<[THX3T110Write_6Cyc_I0123, WriteAtomic], 1982 (instrs SWPLB, SWPLH, SWPLW, SWPLX)>; 1983 1984def : InstRW<[THX3T110Write_8Cyc_I0123, WriteAtomic], 1985 (instrs SWPALB, SWPALH, SWPALW, SWPALX)>; 1986 1987def : InstRW<[THX3T110Write_4Cyc_I0123, WriteAtomic], 1988 (instrs STLLRB, STLLRH, STLLRW, STLLRX)>; 1989 1990// V8.3a PAC 1991def : InstRW<[THX3T110Write_11Cyc_LS01_I1], (instregex "^LDRAA", "^LDRAB")>; 1992def : InstRW<[THX3T110Write_8Cyc_I123], 1993 (instrs BLRAA, BLRAAZ, BLRAB, BLRABZ, 1994 BRAA, BRAAZ, BRAB, BRABZ)>; 1995def : InstRW<[THX3T110Write_8Cyc_I123], (instrs RETAA, RETAB)>; 1996 1997} // SchedModel = ThunderX3T110Model 1998