106c3fb27SDimitry Andric//==- AArch64SchedCortexA510.td - ARM Cortex-A510 Scheduling Definitions -*- tablegen -*-=// 206c3fb27SDimitry Andric// 306c3fb27SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 406c3fb27SDimitry Andric// See https://llvm.org/LICENSE.txt for license information. 506c3fb27SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 606c3fb27SDimitry Andric// 706c3fb27SDimitry Andric//===----------------------------------------------------------------------===// 806c3fb27SDimitry Andric// 906c3fb27SDimitry Andric// This file defines the machine model for the ARM Cortex-A510 processor. 1006c3fb27SDimitry Andric// 1106c3fb27SDimitry Andric//===----------------------------------------------------------------------===// 1206c3fb27SDimitry Andric 1306c3fb27SDimitry Andric// ===---------------------------------------------------------------------===// 1406c3fb27SDimitry Andric// The following definitions describe the per-operand machine model. 1506c3fb27SDimitry Andric// This works with MachineScheduler. See MCSchedModel.h for details. 1606c3fb27SDimitry Andric 1706c3fb27SDimitry Andric// Cortex-A510 machine model for scheduling and other instruction cost heuristics. 1806c3fb27SDimitry Andricdef CortexA510Model : SchedMachineModel { 1906c3fb27SDimitry Andric let MicroOpBufferSize = 0; // The Cortex-A510 is an in-order processor 2006c3fb27SDimitry Andric let IssueWidth = 3; // It dual-issues under most circumstances 2106c3fb27SDimitry Andric let LoadLatency = 3; // Cycles for loads to access the cache. 2206c3fb27SDimitry Andric // Most loads have a latency of 2, but some have higher latencies. 2306c3fb27SDimitry Andric // 3 seems to be a good tradeoff 2406c3fb27SDimitry Andric let PostRAScheduler = 1; // Enable PostRA scheduler pass. 2506c3fb27SDimitry Andric let CompleteModel = 0; // Covers instructions applicable to Cortex-A510. 2606c3fb27SDimitry Andric 2706c3fb27SDimitry Andric // FIXME: Remove when all errors have been fixed. 2806c3fb27SDimitry Andric let FullInstRWOverlapCheck = 0; 2906c3fb27SDimitry Andric} 3006c3fb27SDimitry Andric 3106c3fb27SDimitry Andric 3206c3fb27SDimitry Andric//===----------------------------------------------------------------------===// 3306c3fb27SDimitry Andric// Subtarget-specific SchedWrite types 3406c3fb27SDimitry Andric 3506c3fb27SDimitry Andriclet SchedModel = CortexA510Model in { 3606c3fb27SDimitry Andric 3706c3fb27SDimitry Andric//===----------------------------------------------------------------------===// 3806c3fb27SDimitry Andric// Define each kind of processor resource and number available. 3906c3fb27SDimitry Andric 4006c3fb27SDimitry Andric// Modeling each pipeline as a ProcResource using the BufferSize = 0 since the 4106c3fb27SDimitry Andric// Cortex-A510 is in-order. 4206c3fb27SDimitry Andriclet BufferSize = 0 in { 4306c3fb27SDimitry Andric def CortexA510UnitALU0 : ProcResource<1>; // Int ALU0 4406c3fb27SDimitry Andric def CortexA510UnitALU12 : ProcResource<2>; // Int ALU1 & ALU2 4506c3fb27SDimitry Andric def CortexA510UnitMAC : ProcResource<1>; // Int MAC, 64-bi wide 4606c3fb27SDimitry Andric def CortexA510UnitDiv : ProcResource<1>; // Int Division, not pipelined 4706c3fb27SDimitry Andric // There are 2 LS pipes, 1 for Load/Store; 1 for Store only 4806c3fb27SDimitry Andric def CortexA510UnitLdSt : ProcResource<1>; // Load/Store shared pipe 4906c3fb27SDimitry Andric def CortexA510UnitLd1 : ProcResource<1>; // Load pipe 5006c3fb27SDimitry Andric def CortexA510UnitB : ProcResource<1>; // Branch 5106c3fb27SDimitry Andric def CortexA510UnitPAC : ProcResource<1>; // Pointer Authentication (PAC) pipe 5206c3fb27SDimitry Andric 5306c3fb27SDimitry Andric // The FP DIV/SQRT instructions execute totally differently from the FP ALU 5406c3fb27SDimitry Andric // instructions, which can mostly be dual-issued; that's why for now we model 5506c3fb27SDimitry Andric // them with 2 resources. 5606c3fb27SDimitry Andric def CortexA510UnitVALU0 : ProcResource<1>; // SIMD/FP/SVE ALU0 5706c3fb27SDimitry Andric def CortexA510UnitVALU1 : ProcResource<1>; // SIMD/FP/SVE ALU0 5806c3fb27SDimitry Andric def CortexA510UnitVMAC : ProcResource<2>; // SIMD/FP/SVE MAC 5906c3fb27SDimitry Andric def CortexA510UnitVMC : ProcResource<1>; // SIMD/FP/SVE multicycle instrs (e.g Div, SQRT, cryptography) 6006c3fb27SDimitry Andric} 6106c3fb27SDimitry Andric 6206c3fb27SDimitry Andricdef CortexA510UnitLd : ProcResGroup<[CortexA510UnitLdSt, CortexA510UnitLd1]>; 6306c3fb27SDimitry Andricdef CortexA510UnitVALU : ProcResGroup<[CortexA510UnitVALU0, CortexA510UnitVALU1]>; 6406c3fb27SDimitry Andricdef CortexA510UnitALU : ProcResGroup<[CortexA510UnitALU0, CortexA510UnitALU12]>; 6506c3fb27SDimitry Andric// These latencies are modeled without taking into account forwarding paths 6606c3fb27SDimitry Andric// (the software optimisation guide lists latencies taking into account 6706c3fb27SDimitry Andric// typical forwarding paths). 6806c3fb27SDimitry Andricdef : WriteRes<WriteImm, [CortexA510UnitALU]> { let Latency = 1; } // MOVN, MOVZ 6906c3fb27SDimitry Andricdef : WriteRes<WriteI, [CortexA510UnitALU]> { let Latency = 1; } // ALU 7006c3fb27SDimitry Andricdef : WriteRes<WriteISReg, [CortexA510UnitALU]> { let Latency = 2; } // ALU of Shifted-Reg 7106c3fb27SDimitry Andricdef : WriteRes<WriteIEReg, [CortexA510UnitALU]> { let Latency = 2; } // ALU of Extended-Reg 7206c3fb27SDimitry Andricdef : WriteRes<WriteExtr, [CortexA510UnitALU]> { let Latency = 2; } // EXTR from a reg pair 7306c3fb27SDimitry Andricdef : WriteRes<WriteIS, [CortexA510UnitALU]> { let Latency = 2; } // Shift/Scale 7406c3fb27SDimitry Andric 7506c3fb27SDimitry Andric// MAC 7606c3fb27SDimitry Andricdef : WriteRes<WriteIM32, [CortexA510UnitMAC]> { let Latency = 3; } // 32-bit Multiply 775f757f3fSDimitry Andricdef : WriteRes<WriteIM64, [CortexA510UnitMAC]> { let Latency = 5; let ReleaseAtCycles = [2];} // 64-bit Multiply 7806c3fb27SDimitry Andric 7906c3fb27SDimitry Andric// Div 8006c3fb27SDimitry Andricdef : WriteRes<WriteID32, [CortexA510UnitDiv]> { 815f757f3fSDimitry Andric let Latency = 8; let ReleaseAtCycles = [8]; 8206c3fb27SDimitry Andric} 8306c3fb27SDimitry Andricdef : WriteRes<WriteID64, [CortexA510UnitDiv]> { 845f757f3fSDimitry Andric let Latency = 16; let ReleaseAtCycles = [16]; 8506c3fb27SDimitry Andric} 8606c3fb27SDimitry Andric 8706c3fb27SDimitry Andric//===----------------------------------------------------------------------===// 8806c3fb27SDimitry Andric// Define customized scheduler read/write types specific to the Cortex A510 8906c3fb27SDimitry Andric 9006c3fb27SDimitry Andric//===----------------------------------------------------------------------===// 9106c3fb27SDimitry Andricclass CortexA510Write<int n, ProcResourceKind res> : SchedWriteRes<[res]> { 9206c3fb27SDimitry Andric let Latency = n; 9306c3fb27SDimitry Andric} 9406c3fb27SDimitry Andric 9506c3fb27SDimitry Andricclass CortexA510MCWrite<int n, int m, ProcResourceKind res> : SchedWriteRes<[res]> { 9606c3fb27SDimitry Andric let Latency = n; 975f757f3fSDimitry Andric let ReleaseAtCycles = [m]; 9806c3fb27SDimitry Andric let BeginGroup = 1; 9906c3fb27SDimitry Andric} 10006c3fb27SDimitry Andric 10106c3fb27SDimitry Andricclass CortexA510MC_RC0Write<int n, ProcResourceKind res> : SchedWriteRes<[res]> { 10206c3fb27SDimitry Andric let Latency = n; 10306c3fb27SDimitry Andric let BeginGroup = 1; 10406c3fb27SDimitry Andric} 10506c3fb27SDimitry Andric 10606c3fb27SDimitry Andric//===----------------------------------------------------------------------===// 10706c3fb27SDimitry Andric// Define generic 2 micro-op types 10806c3fb27SDimitry Andricdef A510Write_10cyc_1VMAC_1VALU : SchedWriteRes<[CortexA510UnitVALU, CortexA510UnitVMAC]> { 10906c3fb27SDimitry Andric let Latency = 10; 11006c3fb27SDimitry Andric let NumMicroOps = 2; 11106c3fb27SDimitry Andric} 11206c3fb27SDimitry Andric 11306c3fb27SDimitry Andricdef A510Write_15cyc_1VMAC_1VALU : SchedWriteRes<[CortexA510UnitVALU, CortexA510UnitVMAC]> { 11406c3fb27SDimitry Andric let Latency = 15; 11506c3fb27SDimitry Andric let NumMicroOps = 2; 11606c3fb27SDimitry Andric} 11706c3fb27SDimitry Andric 11806c3fb27SDimitry Andricclass A510Write_PAC_B <int lat> : SchedWriteRes<[CortexA510UnitPAC, CortexA510UnitB]> { 11906c3fb27SDimitry Andric let Latency = lat; 12006c3fb27SDimitry Andric let NumMicroOps = 2; 12106c3fb27SDimitry Andric} 12206c3fb27SDimitry Andric// Load 12306c3fb27SDimitry Andricdef : WriteRes<WriteLD, [CortexA510UnitLd]> { let Latency = 2; } 12406c3fb27SDimitry Andricdef : WriteRes<WriteLDIdx, [CortexA510UnitLd]> { let Latency = 2; } 12506c3fb27SDimitry Andricdef : WriteRes<WriteLDHi, [CortexA510UnitLd]> { let Latency = 2; } 12606c3fb27SDimitry Andric 12706c3fb27SDimitry Andricdef CortexA510WriteVLD1 : SchedWriteRes<[CortexA510UnitLd]> { let Latency = 3; } 12806c3fb27SDimitry Andricdef CortexA510WriteVLD1SI : SchedWriteRes<[CortexA510UnitLd]> { let Latency = 3; let SingleIssue = 1; } 12906c3fb27SDimitry Andricdef CortexA510WriteVLD2 : SchedWriteRes<[CortexA510UnitLd]> { let Latency = 4; 1305f757f3fSDimitry Andric let ReleaseAtCycles = [2]; } 13106c3fb27SDimitry Andricdef CortexA510WriteVLD3 : SchedWriteRes<[CortexA510UnitLd]> { let Latency = 5; 1325f757f3fSDimitry Andric let ReleaseAtCycles = [3]; } 13306c3fb27SDimitry Andricdef CortexA510WriteVLD4 : SchedWriteRes<[CortexA510UnitLd]> { let Latency = 6; 1345f757f3fSDimitry Andric let ReleaseAtCycles = [4]; } 13506c3fb27SDimitry Andricdef CortexA510WriteVLD6 : SchedWriteRes<[CortexA510UnitLd]> { let Latency = 5; 1365f757f3fSDimitry Andric let ReleaseAtCycles = [3]; } 13706c3fb27SDimitry Andricdef CortexA510WriteVLD8 : SchedWriteRes<[CortexA510UnitLd]> { let Latency = 6; 1385f757f3fSDimitry Andric let ReleaseAtCycles = [4]; } 13906c3fb27SDimitry Andric 14006c3fb27SDimitry Andricdef CortexA510WriteLDP1 : SchedWriteRes<[CortexA510UnitLd]> { let Latency = 3; } 14106c3fb27SDimitry Andricdef CortexA510WriteLDP2 : SchedWriteRes<[CortexA510UnitLd]> { let Latency = 3; } 14206c3fb27SDimitry Andricdef CortexA510WriteLDP4 : SchedWriteRes<[CortexA510UnitLd]> { let Latency = 3; } 14306c3fb27SDimitry Andric 14406c3fb27SDimitry Andric// Pre/Post Indexing - Performed as part of address generation 14506c3fb27SDimitry Andricdef : WriteRes<WriteAdr, []> { let Latency = 0; } 14606c3fb27SDimitry Andric 14706c3fb27SDimitry Andric// Store 14806c3fb27SDimitry Andriclet RetireOOO = 1 in { 14906c3fb27SDimitry Andricdef : WriteRes<WriteST, [CortexA510UnitLdSt]> { let Latency = 1; } 15006c3fb27SDimitry Andricdef : WriteRes<WriteSTP, [CortexA510UnitLdSt]> { let Latency = 1; } 15106c3fb27SDimitry Andricdef : WriteRes<WriteSTIdx, [CortexA510UnitLdSt]> { let Latency = 1; } 15206c3fb27SDimitry Andric} 15306c3fb27SDimitry Andricdef : WriteRes<WriteSTX, [CortexA510UnitLdSt]> { let Latency = 3; } 15406c3fb27SDimitry Andric 15506c3fb27SDimitry Andric// Vector Store - Similar to vector loads, can take 1-3 cycles to issue. 15606c3fb27SDimitry Andricdef : WriteRes<WriteVST, [CortexA510UnitLdSt]> { let Latency = 5; 1575f757f3fSDimitry Andric let ReleaseAtCycles = [2];} 15806c3fb27SDimitry Andricdef CortexA510WriteVST1 : SchedWriteRes<[CortexA510UnitLdSt]> { let Latency = 4; } 15906c3fb27SDimitry Andricdef CortexA510WriteVST2 : SchedWriteRes<[CortexA510UnitLdSt]> { let Latency = 5; 1605f757f3fSDimitry Andric let ReleaseAtCycles = [2]; } 16106c3fb27SDimitry Andricdef CortexA510WriteVST3 : SchedWriteRes<[CortexA510UnitLdSt]> { let Latency = 5; 1625f757f3fSDimitry Andric let ReleaseAtCycles = [3]; } 16306c3fb27SDimitry Andricdef CortexA510WriteVST4 : SchedWriteRes<[CortexA510UnitLdSt]> { let Latency = 5; 1645f757f3fSDimitry Andric let ReleaseAtCycles = [4]; } 16506c3fb27SDimitry Andric 16606c3fb27SDimitry Andricdef : WriteRes<WriteAtomic, []> { let Unsupported = 1; } 16706c3fb27SDimitry Andric 16806c3fb27SDimitry Andric// Branch 16906c3fb27SDimitry Andricdef : WriteRes<WriteBr, [CortexA510UnitB]>; 17006c3fb27SDimitry Andricdef : WriteRes<WriteBrReg, [CortexA510UnitB]>; 17106c3fb27SDimitry Andricdef : WriteRes<WriteSys, [CortexA510UnitB]>; 17206c3fb27SDimitry Andricdef : WriteRes<WriteBarrier, [CortexA510UnitB]>; 17306c3fb27SDimitry Andricdef : WriteRes<WriteHint, [CortexA510UnitB]>; 17406c3fb27SDimitry Andric 17506c3fb27SDimitry Andric// FP ALU 17606c3fb27SDimitry Andric// As WriteF result is produced in F5 and it can be mostly forwarded 17706c3fb27SDimitry Andric// to consumer at F1, the effectively Latency is set as 4. 17806c3fb27SDimitry Andricdef : WriteRes<WriteF, [CortexA510UnitVALU]> { let Latency = 4; } 17906c3fb27SDimitry Andricdef : WriteRes<WriteFCmp, [CortexA510UnitVALU]> { let Latency = 3; } 18006c3fb27SDimitry Andricdef : WriteRes<WriteFCvt, [CortexA510UnitVALU]> { let Latency = 4; } 18106c3fb27SDimitry Andricdef : WriteRes<WriteFCopy, [CortexA510UnitVALU]> { let Latency = 3; } 18206c3fb27SDimitry Andricdef : WriteRes<WriteFImm, [CortexA510UnitVALU]> { let Latency = 3; } 18306c3fb27SDimitry Andric 18406c3fb27SDimitry Andricclass CortexA510VSt<int n> : SchedWriteRes<[CortexA510UnitLdSt]> { 18506c3fb27SDimitry Andric let RetireOOO = 1; 1865f757f3fSDimitry Andric let ReleaseAtCycles = [n]; 18706c3fb27SDimitry Andric} 18806c3fb27SDimitry Andric 18906c3fb27SDimitry Andricdef CortexA510VSt0 : SchedWriteRes<[CortexA510UnitLdSt]> { 19006c3fb27SDimitry Andric let RetireOOO = 1; 19106c3fb27SDimitry Andric} 19206c3fb27SDimitry Andric 19306c3fb27SDimitry Andricdef : SchedAlias<WriteVd, CortexA510Write<4, CortexA510UnitVALU>>; 19406c3fb27SDimitry Andricdef : SchedAlias<WriteVq, CortexA510Write<4, CortexA510UnitVALU>>; 19506c3fb27SDimitry Andric 19606c3fb27SDimitry Andric// FP ALU specific new schedwrite definitions 19706c3fb27SDimitry Andricdef CortexA510WriteFPALU_F3 : SchedWriteRes<[CortexA510UnitVALU]> { let Latency = 3;} 19806c3fb27SDimitry Andricdef CortexA510WriteFPALU_F4 : SchedWriteRes<[CortexA510UnitVALU]> { let Latency = 4;} 19906c3fb27SDimitry Andric 20006c3fb27SDimitry Andric// FP Mul, Div, Sqrt. Div/Sqrt are not pipelined 20106c3fb27SDimitry Andricdef : WriteRes<WriteFMul, [CortexA510UnitVMAC]> { let Latency = 4; } 20206c3fb27SDimitry Andric 20306c3fb27SDimitry Andriclet RetireOOO = 1 in { 20406c3fb27SDimitry Andricdef : WriteRes<WriteFDiv, [CortexA510UnitVMC]> { let Latency = 22; 2055f757f3fSDimitry Andric let ReleaseAtCycles = [29]; } 20606c3fb27SDimitry Andricdef CortexA510WriteVMAC : SchedWriteRes<[CortexA510UnitVMAC]> { let Latency = 4; } 20706c3fb27SDimitry Andricdef CortexA510WriteFDivHP : SchedWriteRes<[CortexA510UnitVMC]> { let Latency = 8; 2085f757f3fSDimitry Andric let ReleaseAtCycles = [5]; } 20906c3fb27SDimitry Andricdef CortexA510WriteFDivSP : SchedWriteRes<[CortexA510UnitVMC]> { let Latency = 13; 2105f757f3fSDimitry Andric let ReleaseAtCycles = [10]; } 21106c3fb27SDimitry Andricdef CortexA510WriteFDivDP : SchedWriteRes<[CortexA510UnitVMC]> { let Latency = 22; 2125f757f3fSDimitry Andric let ReleaseAtCycles = [19]; } 21306c3fb27SDimitry Andricdef CortexA510WriteFSqrtHP : SchedWriteRes<[CortexA510UnitVMC]> { let Latency = 8; 2145f757f3fSDimitry Andric let ReleaseAtCycles = [5]; } 21506c3fb27SDimitry Andricdef CortexA510WriteFSqrtSP : SchedWriteRes<[CortexA510UnitVMC]> { let Latency = 12; 2165f757f3fSDimitry Andric let ReleaseAtCycles = [9]; } 21706c3fb27SDimitry Andricdef CortexA510WriteFSqrtDP : SchedWriteRes<[CortexA510UnitVMC]> { let Latency = 22; 2185f757f3fSDimitry Andric let ReleaseAtCycles = [19]; } 21906c3fb27SDimitry Andric} 22006c3fb27SDimitry Andric//===----------------------------------------------------------------------===// 22106c3fb27SDimitry Andric// Subtarget-specific SchedRead types. 22206c3fb27SDimitry Andric 22306c3fb27SDimitry Andricdef : ReadAdvance<ReadVLD, 0>; 22406c3fb27SDimitry Andricdef : ReadAdvance<ReadExtrHi, 0>; 22506c3fb27SDimitry Andricdef : ReadAdvance<ReadAdrBase, 0>; 22606c3fb27SDimitry Andricdef : ReadAdvance<ReadST, 1>; 22706c3fb27SDimitry Andric 22806c3fb27SDimitry Andricdef : ReadAdvance<ReadI, 0>; 22906c3fb27SDimitry Andricdef : ReadAdvance<ReadISReg, 0>; 23006c3fb27SDimitry Andricdef : ReadAdvance<ReadIEReg, 0>; 23106c3fb27SDimitry Andric 23206c3fb27SDimitry Andric 23306c3fb27SDimitry Andric// MUL 23406c3fb27SDimitry Andricdef : ReadAdvance<ReadIM, 0>; 23506c3fb27SDimitry Andricdef : ReadAdvance<ReadIMA, 2>; 23606c3fb27SDimitry Andric 23706c3fb27SDimitry Andric// Div 23806c3fb27SDimitry Andricdef : ReadAdvance<ReadID, 0>; 23906c3fb27SDimitry Andric 24006c3fb27SDimitry Andric//===----------------------------------------------------------------------===// 24106c3fb27SDimitry Andric// Subtarget-specific InstRWs. 24206c3fb27SDimitry Andric 24306c3fb27SDimitry Andricdef A510WriteISReg : SchedWriteVariant<[ 24406c3fb27SDimitry Andric SchedVar<RegShiftedPred, [WriteISReg]>, 24506c3fb27SDimitry Andric SchedVar<NoSchedPred, [WriteI]>]>; 24606c3fb27SDimitry Andricdef : InstRW<[A510WriteISReg], (instregex ".*rs$")>; 24706c3fb27SDimitry Andricdef : InstRW<[WriteIS], (instrs RBITWr, RBITXr)>; 24806c3fb27SDimitry Andric 24906c3fb27SDimitry Andric// Pointer Authentication Instructions (v8.3 PAC) 25006c3fb27SDimitry Andric// ----------------------------------------------------------------------------- 25106c3fb27SDimitry Andric 25206c3fb27SDimitry Andric// Authenticate data address 25306c3fb27SDimitry Andric// Authenticate instruction address 25406c3fb27SDimitry Andric// Compute pointer authentication code for data address 25506c3fb27SDimitry Andric// Compute pointer authentication code, using generic key 25606c3fb27SDimitry Andric// Compute pointer authentication code for instruction address 257*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<5, CortexA510UnitPAC>], (instregex "^AUT", "^PAC")>; 25806c3fb27SDimitry Andric 25906c3fb27SDimitry Andric// Branch and link, register, with pointer authentication 26006c3fb27SDimitry Andric// Branch, register, with pointer authentication 26106c3fb27SDimitry Andric// Branch, return, with pointer authentication 26206c3fb27SDimitry Andricdef : InstRW<[A510Write_PAC_B<1>], (instrs BLRAA, BLRAAZ, BLRAB, BLRABZ, BRAA, 26306c3fb27SDimitry Andric BRAAZ, BRAB, BRABZ, RETAA, RETAB, 26406c3fb27SDimitry Andric ERETAA, ERETAB)>; 26506c3fb27SDimitry Andric 26606c3fb27SDimitry Andric// Load register, with pointer authentication 26706c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<2, CortexA510UnitPAC>], (instregex "^LDRA[AB](indexed|writeback)")>; 26806c3fb27SDimitry Andric 26906c3fb27SDimitry Andric// Strip pointer authentication code 27006c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<5, CortexA510UnitPAC>], (instrs XPACD, XPACI, XPACLRI)>; 27106c3fb27SDimitry Andric//--- 27206c3fb27SDimitry Andric// Miscellaneous 27306c3fb27SDimitry Andric//--- 27406c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD1SI,CortexA510WriteLDP1], (instregex "LDPS?Wi")>; 27506c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD1,CortexA510WriteLDP1], (instregex "LDPSi")>; 27606c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD1,CortexA510WriteLDP2], (instregex "LDP(X|D)i")>; 27706c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD1,CortexA510WriteLDP4], (instregex "LDPQi")>; 27806c3fb27SDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD1SI,CortexA510WriteLDP1], (instregex "LDPS?W(pre|post)")>; 27906c3fb27SDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD1,CortexA510WriteLDP1], (instregex "LDPS(pre|post)")>; 28006c3fb27SDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD1,CortexA510WriteLDP2], (instregex "LDP(X|D)(pre|post)")>; 28106c3fb27SDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD1,CortexA510WriteLDP4], (instregex "LDPQ(pre|post)")>; 28206c3fb27SDimitry Andricdef : InstRW<[WriteI], (instrs COPY)>; 28306c3fb27SDimitry Andric//--- 28406c3fb27SDimitry Andric// Vector Loads - 128-bit per cycle 28506c3fb27SDimitry Andric//--- 28606c3fb27SDimitry Andric// 1-element structures 28706c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD1], (instregex "LD1i(8|16|32|64)$")>; // single element 28806c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD1], (instregex "LD1Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>; // replicate 28906c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD1], (instregex "LD1Onev(8b|4h|2s|1d)$")>; 29006c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD1], (instregex "LD1Onev(16b|8h|4s|2d)$")>; 29106c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD1], (instregex "LD1Twov(8b|4h|2s|1d)$")>; // multiple structures 29206c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD1], (instregex "LD1Twov(16b|8h|4s|2d)$")>; 29306c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD2], (instregex "LD1Threev(8b|4h|2s|1d)$")>; 29406c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD2], (instregex "LD1Threev(16b|8h|4s|2d)$")>; 29506c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD2], (instregex "LD1Fourv(8b|4h|2s|1d)$")>; 29606c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD2], (instregex "LD1Fourv(16b|8h|4s|2d)$")>; 29706c3fb27SDimitry Andric 2985f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD1], (instregex "LD1i(8|16|32|64)_POST$")>; 2995f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD1], (instregex "LD1Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>; 3005f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD1], (instregex "LD1Onev(8b|4h|2s|1d)_POST$")>; 3015f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD2], (instregex "LD1Onev(16b|8h|4s|2d)_POST$")>; 3025f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD2], (instregex "LD1Twov(8b|4h|2s|1d)_POST$")>; 3035f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD2], (instregex "LD1Twov(16b|8h|4s|2d)_POST$")>; 3045f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD2], (instregex "LD1Threev(8b|4h|2s|1d)_POST$")>; 3055f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD2], (instregex "LD1Threev(16b|8h|4s|2d)_POST$")>; 3065f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD2], (instregex "LD1Fourv(8b|4h|2s|1d)_POST$")>; 3075f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD2], (instregex "LD1Fourv(16b|8h|4s|2d)_POST$")>; 30806c3fb27SDimitry Andric 30906c3fb27SDimitry Andric// 2-element structures 31006c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD2], (instregex "LD2i(8|16|32|64)$")>; 31106c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD2], (instregex "LD2Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>; 31206c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD2], (instregex "LD2Twov(8b|4h|2s)$")>; 31306c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD4], (instregex "LD2Twov(16b|8h|4s|2d)$")>; 31406c3fb27SDimitry Andric 3155f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD2], (instregex "LD2i(8|16|32|64)(_POST)?$")>; 3165f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD2], (instregex "LD2Rv(8b|4h|2s|1d|16b|8h|4s|2d)(_POST)?$")>; 3175f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD2], (instregex "LD2Twov(8b|4h|2s)(_POST)?$")>; 3185f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD4], (instregex "LD2Twov(16b|8h|4s|2d)(_POST)?$")>; 31906c3fb27SDimitry Andric 32006c3fb27SDimitry Andric// 3-element structures 32106c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD2], (instregex "LD3i(8|16|32|64)$")>; 32206c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD2], (instregex "LD3Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>; 32306c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD3], (instregex "LD3Threev(8b|4h|2s|1d)$")>; 32406c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD6], (instregex "LD3Threev(16b|8h|4s|2d)$")>; 32506c3fb27SDimitry Andric 3265f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD2], (instregex "LD3i(8|16|32|64)_POST$")>; 3275f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD2], (instregex "LD3Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>; 3285f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD3], (instregex "LD3Threev(8b|4h|2s|1d)_POST$")>; 3295f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD6], (instregex "LD3Threev(16b|8h|4s|2d)_POST$")>; 33006c3fb27SDimitry Andric 33106c3fb27SDimitry Andric// 4-element structures 33206c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD2], (instregex "LD4i(8|16|32|64)$")>; // load single 4-el structure to one lane of 4 regs. 33306c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD2], (instregex "LD4Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>; // load single 4-el structure, replicate to all lanes of 4 regs. 33406c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD4], (instregex "LD4Fourv(8b|4h|2s|1d)$")>; // load multiple 4-el structures to 4 regs. 33506c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVLD8], (instregex "LD4Fourv(16b|8h|4s|2d)$")>; 33606c3fb27SDimitry Andric 3375f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD2], (instregex "LD4i(8|16|32|64)_POST$")>; 3385f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD2], (instregex "LD4Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>; 3395f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD4], (instregex "LD4Fourv(8b|4h|2s|1d)_POST$")>; 3405f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVLD8], (instregex "LD4Fourv(16b|8h|4s|2d)_POST$")>; 34106c3fb27SDimitry Andric 34206c3fb27SDimitry Andric//--- 34306c3fb27SDimitry Andric// Vector Stores 34406c3fb27SDimitry Andric//--- 34506c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVST1], (instregex "ST1i(8|16|32|64)$")>; 34606c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVST1], (instregex "ST1Onev(8b|4h|2s|1d|16b|8h|4s|2d)$")>; 34706c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVST1], (instregex "ST1Twov(8b|4h|2s|1d|16b|8h|4s|2d)$")>; 34806c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVST2], (instregex "ST1Threev(8b|4h|2s|1d|16b|8h|4s|2d)$")>; 34906c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVST4], (instregex "ST1Fourv(8b|4h|2s|1d|16b|8h|4s|2d)$")>; 3505f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVST1], (instregex "ST1i(8|16|32|64)_POST$")>; 3515f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVST1], (instregex "ST1Onev(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>; 3525f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVST1], (instregex "ST1Twov(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>; 3535f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVST2], (instregex "ST1Threev(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>; 3545f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVST4], (instregex "ST1Fourv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>; 35506c3fb27SDimitry Andric 35606c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVST2], (instregex "ST2i(8|16|32|64)$")>; 35706c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVST2], (instregex "ST2Twov(8b|4h|2s)$")>; 35806c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVST4], (instregex "ST2Twov(16b|8h|4s|2d)$")>; 3595f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVST2], (instregex "ST2i(8|16|32|64)_POST$")>; 3605f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVST2], (instregex "ST2Twov(8b|4h|2s)_POST$")>; 3615f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVST4], (instregex "ST2Twov(16b|8h|4s|2d)_POST$")>; 36206c3fb27SDimitry Andric 36306c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVST2], (instregex "ST3i(8|16|32|64)$")>; 36406c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVST4], (instregex "ST3Threev(8b|4h|2s|1d|16b|8h|4s|2d)$")>; 3655f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVST2], (instregex "ST3i(8|16|32|64)_POST$")>; 3665f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVST4], (instregex "ST3Threev(8b|4h|2s|1d|2d|16b|8h|4s|4d)_POST$")>; 36706c3fb27SDimitry Andric 36806c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVST2], (instregex "ST4i(8|16|32|64)$")>; 36906c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVST4], (instregex "ST4Fourv(8b|4h|2s|1d|16b|8h|4s|2d)$")>; 3705f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVST2], (instregex "ST4i(8|16|32|64)_POST$")>; 3715f757f3fSDimitry Andricdef : InstRW<[WriteAdr, CortexA510WriteVST4], (instregex "ST4Fourv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>; 37206c3fb27SDimitry Andric 37306c3fb27SDimitry Andric//--- 37406c3fb27SDimitry Andric// Floating Point Conversions, MAC, DIV, SQRT 37506c3fb27SDimitry Andric//--- 37606c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteFPALU_F3], (instregex "^DUP(v2i64|v4i32|v8i16|v16i8)")>; 37706c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteFPALU_F4], (instregex "^XTN")>; 37806c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteFPALU_F4], (instregex "^FCVT[ALMNPZ][SU](S|U)?(W|X)")>; 37906c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteFPALU_F4], (instregex "^FCVT(X)?[ALMNPXZ](S|U|N)?v")>; 38006c3fb27SDimitry Andric 38106c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteFPALU_F4], (instregex "^(S|U)CVTF(S|U)(W|X)(H|S|D)")>; 38206c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteFPALU_F4], (instregex "^(S|U)CVTF(h|s|d)")>; 38306c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteFPALU_F4], (instregex "^(S|U)CVTFv")>; 38406c3fb27SDimitry Andric 38506c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVMAC], (instregex "^FN?M(ADD|SUB).*")>; 38606c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteVMAC], (instregex "^FML(A|S)v.*")>; 38706c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteFDivHP], (instrs FDIVHrr)>; 38806c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteFDivSP], (instrs FDIVSrr)>; 38906c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteFDivDP], (instrs FDIVDrr)>; 39006c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteFDivHP], (instregex "^FDIVv.*16$")>; 39106c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteFDivSP], (instregex "^FDIVv.*32$")>; 39206c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteFDivDP], (instregex "^FDIVv.*64$")>; 39306c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteFSqrtHP], (instregex "^.*SQRT.*16$")>; 39406c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteFSqrtSP], (instregex "^.*SQRT.*32$")>; 39506c3fb27SDimitry Andricdef : InstRW<[CortexA510WriteFSqrtDP], (instregex "^.*SQRT.*64$")>; 39606c3fb27SDimitry Andric 397*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510WriteFPALU_F3], (instrs FCSELHrrr, FCSELSrrr, FCSELDrrr)>; 398*0fca6ea1SDimitry Andric 39906c3fb27SDimitry Andric// 4.15. Advanced SIMD integer instructions 40006c3fb27SDimitry Andric// ASIMD absolute diff 40106c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "[SU]ABDv(2i32|4i16|8i8)")>; 40206c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "[SU]ABDv(16i8|4i32|8i16)")>; 40306c3fb27SDimitry Andric// ASIMD absolute diff accum 404*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<6, CortexA510UnitVALU>], (instregex "[SU]ABAL?v")>; 40506c3fb27SDimitry Andric// ASIMD absolute diff long 40606c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "[SU]ABDLv")>; 40706c3fb27SDimitry Andric// ASIMD arith #1 408*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "(ADD|SUB|NEG)v", 409*0fca6ea1SDimitry Andric "[SU]R?HADDv", "[SU]HSUBv")>; 41006c3fb27SDimitry Andric// ASIMD arith #2 411*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "ABSv(1i64|2i32|4i16|8i8)$", 41206c3fb27SDimitry Andric "[SU]ADDLPv(2i32_v1i64|4i16_v2i32|8i8_v4i16)$", 41306c3fb27SDimitry Andric "ADDPv(2i32|4i16|8i8)$")>; 414*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "([SU]QADD|[SU]QSUB|SQNEG|SUQADD|USQADD)v(1i16|1i32|1i64|1i8|2i32|4i16|8i8)$")>; 415*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "ABSv(2i64|4i32|8i16|16i8)$", 41606c3fb27SDimitry Andric "[SU]ADDLPv(16i8_v8i16|4i32_v2i64|8i16_v4i32)$", 41706c3fb27SDimitry Andric "ADDPv(16i8|2i64|4i32|8i16)$")>; 418*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "([SU]QADD|[SU]QSUB|SQNEG|SUQADD|USQADD)v(16i8|2i64|4i32|8i16)$")>; 41906c3fb27SDimitry Andric// ASIMD arith #3 420*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "SADDLv", "UADDLv", "SADDWv", 421*0fca6ea1SDimitry Andric "UADDWv", "SSUBLv", "USUBLv", "SSUBWv", "USUBWv")>; 422*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "ADDHNv", "SUBHNv")>; 42306c3fb27SDimitry Andric// ASIMD arith #5 424*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<8, CortexA510UnitVALU>], (instregex "RADDHNv", "RSUBHNv")>; 42506c3fb27SDimitry Andric// ASIMD arith, reduce 426*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "ADDVv")>; 427*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "SADDLVv", "UADDLVv")>; 42806c3fb27SDimitry Andric// ASIMD compare #1 42906c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "CM(EQ|GE|GT|HI|HS|LE|LT)v(1i64|2i32|4i16|8i8)")>; 43006c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "CM(EQ|GE|GT|HI|HS|LE|LT)v(2i64|4i32|8i16|16i8)")>; 43106c3fb27SDimitry Andric// ASIMD compare #2 43206c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "CMTSTv(1i64|2i32|4i16|8i8)")>; 43306c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "CMTSTv(2i64|4i32|8i16|16i8)")>; 43406c3fb27SDimitry Andric// ASIMD logical $1 43506c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "(AND|EOR|NOT|ORN)v8i8", 43606c3fb27SDimitry Andric "(ORR|BIC)v(2i32|4i16|8i8)$", "MVNIv(2i|2s|4i16)")>; 43706c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "(AND|EOR|NOT|ORN)v16i8", 43806c3fb27SDimitry Andric "(ORR|BIC)v(16i8|4i32|8i16)$", "MVNIv(4i32|4s|8i16)")>; 43906c3fb27SDimitry Andric// ASIMD max/min, basic 440*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "[SU](MIN|MAX)P?v(2i32|4i16|8i8)")>; 441*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "[SU](MIN|MAX)P?v(16i8|4i132|8i16)")>; 44206c3fb27SDimitry Andric// SIMD max/min, reduce 44306c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "[SU](MAX|MIN)Vv")>; 44406c3fb27SDimitry Andric// ASIMD multiply, by element 44506c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "MULv(2i32|4i16|4i32|8i16)_indexed$", 44606c3fb27SDimitry Andric "SQR?DMULHv(1i16|1i32|2i32|4i16|4i32|8i16)_indexed$")>; 44706c3fb27SDimitry Andric// ASIMD multiply 44806c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instrs PMULv8i8)>; 44906c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instrs PMULv16i8)>; 45006c3fb27SDimitry Andric// ASIMD multiply accumulate 45106c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "ML[AS]v(2i32|4i16|8i8)$")>; 45206c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "ML[AS]v(16i8|4i32|8i16)$")>; 45306c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "ML[AS]v(2i32|4i16|4i32|8i16)_indexed$")>; 45406c3fb27SDimitry Andric// ASIMD multiply accumulate half 45506c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "SQRDML[AS]H[vi]")>; 45606c3fb27SDimitry Andric// ASIMD multiply accumulate long 45706c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "[SU]ML[AS]Lv")>; 45806c3fb27SDimitry Andric// ASIMD multiply accumulate long #2 45906c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "SQDML[AS]L[iv]")>; 46006c3fb27SDimitry Andric// ASIMD dot product 46106c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "[SU]DOTv8i8")>; 46206c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "[SU]DOTv16i8")>; 46306c3fb27SDimitry Andric// ASIMD dot product, by scalar 46406c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "[SU]DOTlanev")>; 46506c3fb27SDimitry Andric// ASIMD multiply long 46606c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "[SU]MULLv", "SQDMULL[iv]")>; 46706c3fb27SDimitry Andric// ASIMD polynomial (8x8) multiply long 46806c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instrs PMULLv8i8, PMULLv16i8)>; 46906c3fb27SDimitry Andric// ASIMD pairwise add and accumulate 470*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510MCWrite<7, 2, CortexA510UnitVALU>], (instregex "[SU]ADALPv")>; 47106c3fb27SDimitry Andric// ASIMD shift accumulate 472*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "[SU]SRA(d|v2i32|v4i16|v8i8)")>; 473*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "[SU]SRAv(16i8|2i64|4i32|8i16)")>; 47406c3fb27SDimitry Andric// ASIMD shift accumulate #2 475*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510MCWrite<7, 2, CortexA510UnitVALU>], (instregex "[SU]RSRA[vd]")>; 47606c3fb27SDimitry Andric// ASIMD shift by immed 47706c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "SHLd$", "SHLv", 47806c3fb27SDimitry Andric "SLId$", "SRId$", "[SU]SHR[vd]", "SHRNv")>; 47906c3fb27SDimitry Andric// ASIMD shift by immed 48006c3fb27SDimitry Andric// SXTL and UXTL are aliases for SHLL 48106c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "[US]?SHLLv")>; 48206c3fb27SDimitry Andric// ASIMD shift by immed #2 48306c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "[SU]RSHR(d|v2i32|v4i16|v8i8)", 48406c3fb27SDimitry Andric "[SU]RSHRv(16i8|2i64|4i32|8i16)")>; 48506c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "RSHRNv(2i32|4i16|8i8)", 48606c3fb27SDimitry Andric "RSHRNv(16i8|4i32|8i16)")>; 48706c3fb27SDimitry Andric// ASIMD shift by register 48806c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "[SU]SHLv(1i64|2i32|4i16|8i8)")>; 48906c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "[SU]SHLv(2i64|4i32|8i16|16i8)")>; 49006c3fb27SDimitry Andric// ASIMD shift by register #2 49106c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "[SU]RSHLv(1i64|2i32|4i16|8i8)")>; 49206c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "[SU]RSHLv(2i64|4i32|8i16|16i8)")>; 49306c3fb27SDimitry Andric 49406c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "[SU]QSHLv(1i64|2i32|4i16|8i8)")>; 49506c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "[SU]QSHLv(2i64|4i32|8i16|16i8)")>; 49606c3fb27SDimitry Andric 49706c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "[SU]QRSHLv(1i64|2i32|4i16|8i8)")>; 49806c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "[SU]QRSHLv(2i64|4i32|8i16|16i8)")>; 49906c3fb27SDimitry Andric 50006c3fb27SDimitry Andric// Cryptography extensions 50106c3fb27SDimitry Andric// ----------------------------------------------------------------------------- 50206c3fb27SDimitry Andric 50306c3fb27SDimitry Andric// Crypto AES ops 50406c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "^AES[DE]rr$", "^AESI?MCrr")>; 50506c3fb27SDimitry Andric 50606c3fb27SDimitry Andric// Crypto polynomial (64x64) multiply long 507*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510MCWrite<4, 0, CortexA510UnitVMC>], (instrs PMULLv1i64, PMULLv2i64)>; 50806c3fb27SDimitry Andric 50906c3fb27SDimitry Andric// Crypto SHA1 hash acceleration op 51006c3fb27SDimitry Andric// Crypto SHA1 schedule acceleration ops 51106c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "^SHA1(H|SU0|SU1)")>; 51206c3fb27SDimitry Andric 51306c3fb27SDimitry Andric// Crypto SHA1 hash acceleration ops 51406c3fb27SDimitry Andric// Crypto SHA256 hash acceleration ops 515*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510MCWrite<4, 0, CortexA510UnitVMC>], (instregex "^SHA1[CMP]", "^SHA256H2?")>; 51606c3fb27SDimitry Andric 51706c3fb27SDimitry Andric// Crypto SHA256 schedule acceleration ops 518*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510MCWrite<4, 0, CortexA510UnitVMC>], (instregex "^SHA256SU[01]")>; 51906c3fb27SDimitry Andric 52006c3fb27SDimitry Andric// Crypto SHA512 hash acceleration ops 521*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510MCWrite<9, 0, CortexA510UnitVMC>], (instregex "^SHA512(H|H2|SU0|SU1)")>; 52206c3fb27SDimitry Andric 52306c3fb27SDimitry Andric// Crypto SHA3 ops 524*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instrs BCAX, EOR3)>; 525*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instrs XAR)>; 526*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510MCWrite<9, 0, CortexA510UnitVMC>], (instrs RAX1)>; 52706c3fb27SDimitry Andric 52806c3fb27SDimitry Andric 52906c3fb27SDimitry Andric// Crypto SM3 ops 530*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510MCWrite<9, 0, CortexA510UnitVMC>], (instregex "^SM3PARTW[12]$", "^SM3SS1$", 53106c3fb27SDimitry Andric "^SM3TT[12][AB]$")>; 53206c3fb27SDimitry Andric 53306c3fb27SDimitry Andric// Crypto SM4 ops 534*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510MCWrite<9, 0, CortexA510UnitVMC>], (instrs SM4E, SM4ENCKEY)>; 53506c3fb27SDimitry Andric 53606c3fb27SDimitry Andric// CRC 53706c3fb27SDimitry Andric// ----------------------------------------------------------------------------- 53806c3fb27SDimitry Andric 53906c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<2, 0, CortexA510UnitMAC>], (instregex "^CRC32")>; 54006c3fb27SDimitry Andric 54106c3fb27SDimitry Andric// SVE Predicate instructions 54206c3fb27SDimitry Andric 54306c3fb27SDimitry Andric// Loop control, based on predicate 544*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<2, CortexA510UnitVALU0>], (instrs BRKA_PPmP, BRKA_PPzP, 54506c3fb27SDimitry Andric BRKB_PPmP, BRKB_PPzP)>; 54606c3fb27SDimitry Andric 54706c3fb27SDimitry Andric// Loop control, based on predicate and flag setting 548*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<2, CortexA510UnitVALU0>], (instrs BRKAS_PPzP, BRKBS_PPzP)>; 54906c3fb27SDimitry Andric 55006c3fb27SDimitry Andric// Loop control, propagating 551*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<2, CortexA510UnitVALU0>], (instrs BRKN_PPzP, BRKPA_PPzPP, BRKPB_PPzPP)>; 55206c3fb27SDimitry Andric 55306c3fb27SDimitry Andric// Loop control, propagating and flag setting 554*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<2, CortexA510UnitVALU0>], (instrs BRKNS_PPzP)>; 555*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU0>], (instrs BRKPAS_PPzPP, BRKPBS_PPzPP)>; 55606c3fb27SDimitry Andric 55706c3fb27SDimitry Andric 55806c3fb27SDimitry Andric// Loop control, based on GPR 559*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<2, CortexA510UnitVALU0>], 56006c3fb27SDimitry Andric (instregex "^WHILE(GE|GT|HI|HS|LE|LO|LS|LT)_P(WW|XX)_[BHSD]")>; 56106c3fb27SDimitry Andric 562*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<2, CortexA510UnitVALU0>], (instregex "^WHILE(RW|WR)_PXX_[BHSD]")>; 56306c3fb27SDimitry Andric 56406c3fb27SDimitry Andric// Loop terminate 56506c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<1, CortexA510UnitALU>], (instregex "^CTERM(EQ|NE)_(WW|XX)")>; 56606c3fb27SDimitry Andric 56706c3fb27SDimitry Andric// Predicate counting scalar 56806c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<1, CortexA510UnitALU>], (instrs ADDPL_XXI, ADDVL_XXI, RDVLI_XI)>; 56906c3fb27SDimitry Andric 57006c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<1, CortexA510UnitALU>], 57106c3fb27SDimitry Andric (instregex "^CNT[BHWD]_XPiI")>; 57206c3fb27SDimitry Andric 573*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitALU>], 57406c3fb27SDimitry Andric (instregex "^(INC|DEC)[BHWD]_XPiI")>; 57506c3fb27SDimitry Andric 576*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitALU>], 57706c3fb27SDimitry Andric (instregex "^(SQINC|SQDEC|UQINC|UQDEC)[BHWD]_[XW]Pi(Wd)?I")>; 57806c3fb27SDimitry Andric 57906c3fb27SDimitry Andric// Predicate counting scalar, active predicate 580*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU0>], 58106c3fb27SDimitry Andric (instregex "^CNTP_XPP_[BHSD]")>; 58206c3fb27SDimitry Andric 583*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU0>], 58406c3fb27SDimitry Andric (instregex "^(DEC|INC)P_XP_[BHSD]")>; 58506c3fb27SDimitry Andric 586*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<9, CortexA510UnitVALU0>], 58706c3fb27SDimitry Andric (instregex "^(SQDEC|SQINC|UQDEC|UQINC)P_XP_[BHSD]", 58806c3fb27SDimitry Andric "^(UQDEC|UQINC)P_WP_[BHSD]", 58906c3fb27SDimitry Andric "^(SQDEC|SQINC|UQDEC|UQINC)P_XPWd_[BHSD]")>; 59006c3fb27SDimitry Andric 59106c3fb27SDimitry Andric 59206c3fb27SDimitry Andric// Predicate counting vector, active predicate 59306c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], 59406c3fb27SDimitry Andric (instregex "^(DEC|INC|SQDEC|SQINC|UQDEC|UQINC)P_ZP_[HSD]")>; 59506c3fb27SDimitry Andric 59606c3fb27SDimitry Andric// Predicate logical 597*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<2, CortexA510UnitVALU0>], 59806c3fb27SDimitry Andric (instregex "^(AND|BIC|EOR|NAND|NOR|ORN|ORR)_PPzPP")>; 59906c3fb27SDimitry Andric 60006c3fb27SDimitry Andric// Predicate logical, flag setting 601*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<2, CortexA510UnitVALU0>], 60206c3fb27SDimitry Andric (instregex "^(ANDS|BICS|EORS|NANDS|NORS|ORNS|ORRS)_PPzPP")>; 60306c3fb27SDimitry Andric 60406c3fb27SDimitry Andric// Predicate reverse 605*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<2, CortexA510UnitVALU0>], (instregex "^REV_PP_[BHSD]")>; 60606c3fb27SDimitry Andric 60706c3fb27SDimitry Andric// Predicate select 608*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<2, CortexA510UnitVALU0>], (instrs SEL_PPPP)>; 60906c3fb27SDimitry Andric 61006c3fb27SDimitry Andric// Predicate set 611*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<2, CortexA510UnitVALU0>], (instregex "^PFALSE", "^PTRUE_[BHSD]")>; 61206c3fb27SDimitry Andric 61306c3fb27SDimitry Andric// Predicate set/initialize, set flags 614*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<2, CortexA510UnitVALU0>], (instregex "^PTRUES_[BHSD]")>; 61506c3fb27SDimitry Andric 61606c3fb27SDimitry Andric// Predicate find first/next 617*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<2, CortexA510UnitVALU0>], (instregex "^PFIRST_B", "^PNEXT_[BHSD]")>; 61806c3fb27SDimitry Andric 61906c3fb27SDimitry Andric// Predicate test 620*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<2, CortexA510UnitVALU0>], (instrs PTEST_PP)>; 62106c3fb27SDimitry Andric 62206c3fb27SDimitry Andric// Predicate transpose 623*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<2, CortexA510UnitVALU0>], (instregex "^TRN[12]_PPP_[BHSDQ]")>; 62406c3fb27SDimitry Andric 62506c3fb27SDimitry Andric// Predicate unpack and widen 626*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<2, CortexA510UnitVALU0>], (instrs PUNPKHI_PP, PUNPKLO_PP)>; 62706c3fb27SDimitry Andric 62806c3fb27SDimitry Andric// Predicate zip/unzip 629*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<2, CortexA510UnitVALU0>], (instregex "^(ZIP|UZP)[12]_PPP_[BHSDQ]")>; 63006c3fb27SDimitry Andric 63106c3fb27SDimitry Andric 63206c3fb27SDimitry Andric// SVE integer instructions 63306c3fb27SDimitry Andric// ----------------------------------------------------------------------------- 63406c3fb27SDimitry Andric// Arithmetic, absolute diff 63506c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "^[SU]ABD_(ZPmZ|ZPZZ)_[BHSD]")>; 63606c3fb27SDimitry Andric 63706c3fb27SDimitry Andric// Arithmetic, absolute diff accum 638*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510MCWrite<6, 2, CortexA510UnitVALU>], (instregex "^[SU]ABA_ZZZ_[BHSD]")>; 63906c3fb27SDimitry Andric 64006c3fb27SDimitry Andric// Arithmetic, absolute diff accum long 641*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510MCWrite<6, 2, CortexA510UnitVALU>], (instregex "^[SU]ABAL[TB]_ZZZ_[HSD]")>; 64206c3fb27SDimitry Andric 64306c3fb27SDimitry Andric// Arithmetic, absolute diff long 64406c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "^[SU]ABDL[TB]_ZZZ_[HSD]")>; 64506c3fb27SDimitry Andric 64606c3fb27SDimitry Andric// Arithmetic, basic 64706c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], 64806c3fb27SDimitry Andric (instregex "^(ABS|CNOT|NEG)_ZPmZ_[BHSD]", 64906c3fb27SDimitry Andric "^(ADD|SUB|SUBR)_ZPmZ_[BHSD]", 65006c3fb27SDimitry Andric "^(ADD|SUB|SUBR)_ZPZZ_[BHSD]", 65106c3fb27SDimitry Andric "^(ADD|SUB)_ZZZ_[BHSD]", 65206c3fb27SDimitry Andric "^(ADD|SUB|SUBR)_ZI_[BHSD]", 65306c3fb27SDimitry Andric "^ADR_[SU]XTW_ZZZ_D_[0123]", 65406c3fb27SDimitry Andric "^ADR_LSL_ZZZ_[SD]_[0123]", 655*0fca6ea1SDimitry Andric "^[SU]H(ADD|SUB|SUBR)_ZPmZ_[BHSD]")>; 656*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], 657*0fca6ea1SDimitry Andric (instregex "^[SU](ADD|SUB)[LW][BT]_ZZZ_[HSD]", 65806c3fb27SDimitry Andric "^SADDLBT_ZZZ_[HSD]", 65906c3fb27SDimitry Andric "^SSUBL(BT|TB)_ZZZ_[HSD]")>; 66006c3fb27SDimitry Andric 66106c3fb27SDimitry Andric// Arithmetic, complex 66206c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], 663*0fca6ea1SDimitry Andric (instregex "^SQ(ABS|NEG)_ZPmZ_[BHSD]", 66406c3fb27SDimitry Andric "^SQ(ADD|SUB|SUBR)_ZPmZ_?[BHSD]", 66506c3fb27SDimitry Andric "^[SU]Q(ADD|SUB)_ZZZ_[BHSD]", 66606c3fb27SDimitry Andric "^[SU]Q(ADD|SUB)_ZI_[BHSD]", 66706c3fb27SDimitry Andric "^(SRH|SUQ|UQ|USQ|URH)ADD_ZPmZ_[BHSD]", 66806c3fb27SDimitry Andric "^(UQSUB|UQSUBR)_ZPmZ_[BHSD]")>; 669*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<8, CortexA510UnitVALU>], 670*0fca6ea1SDimitry Andric (instregex "^R?(ADD|SUB)HN[BT]_ZZZ_[BHS]")>; 67106c3fb27SDimitry Andric 67206c3fb27SDimitry Andric// Arithmetic, large integer 67306c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^(AD|SB)CL[BT]_ZZZ_[SD]")>; 67406c3fb27SDimitry Andric 67506c3fb27SDimitry Andric// Arithmetic, pairwise add 67606c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "^ADDP_ZPmZ_[BHSD]")>; 67706c3fb27SDimitry Andric 67806c3fb27SDimitry Andric// Arithmetic, pairwise add and accum long 67906c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<7, 2, CortexA510UnitVALU>], (instregex "^[SU]ADALP_ZPmZ_[HSD]")>; 68006c3fb27SDimitry Andric 68106c3fb27SDimitry Andric// Arithmetic, shift 68206c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], 68306c3fb27SDimitry Andric (instregex "^(ASR|LSL|LSR)_WIDE_ZPmZ_[BHS]", 68406c3fb27SDimitry Andric "^(ASR|LSL|LSR)_WIDE_ZZZ_[BHS]", 68506c3fb27SDimitry Andric "^(ASR|LSL|LSR)_ZPmI_[BHSD]", 68606c3fb27SDimitry Andric "^(ASR|LSL|LSR)_ZPZI_[BHSD]", 68706c3fb27SDimitry Andric "^(ASR|LSL|LSR)_ZPmZ_[BHSD]", 68806c3fb27SDimitry Andric "^(ASR|LSL|LSR)_ZPZZ_[BHSD]", 68906c3fb27SDimitry Andric "^(ASR|LSL|LSR)_ZZI_[BHSD]", 69006c3fb27SDimitry Andric "^(ASRR|LSLR|LSRR)_ZPmZ_[BHSD]")>; 69106c3fb27SDimitry Andric// Arithmetic, shift right for divide 69206c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], 69306c3fb27SDimitry Andric (instregex "^ASRD_ZPmI_[BHSD]", 69406c3fb27SDimitry Andric "^ASRD_ZPZI_[BHSD]")>; 69506c3fb27SDimitry Andric 69606c3fb27SDimitry Andric// Arithmetic, shift and accumulate 69706c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], 69806c3fb27SDimitry Andric (instregex "^(SSRA|USRA)_ZZI_[BHSD]")>; 69906c3fb27SDimitry Andric 70006c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<7, 2, CortexA510UnitVALU>], 70106c3fb27SDimitry Andric (instregex "^(SRSRA|URSRA)_ZZI_[BHSD]")>; 70206c3fb27SDimitry Andric 70306c3fb27SDimitry Andric 70406c3fb27SDimitry Andric// Arithmetic, shift by immediate 70506c3fb27SDimitry Andric// Arithmetic, shift by immediate and insert 70606c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], 70706c3fb27SDimitry Andric (instregex "^(SHRNB|SHRNT|SSHLLB|SSHLLT|USHLLB|USHLLT|SLI|SRI)_ZZI_[BHSD]")>; 70806c3fb27SDimitry Andric 70906c3fb27SDimitry Andric// Arithmetic, shift complex 71006c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], 71106c3fb27SDimitry Andric (instregex "^(SQ)?RSHRU?N[BT]_ZZI_[BHS]", 71206c3fb27SDimitry Andric "^(SQRSHL|SQRSHLR|SQSHL|SQSHLR|UQRSHL|UQRSHLR|UQSHL|UQSHLR)_(ZPmZ|ZPZZ)_[BHSD]", 71306c3fb27SDimitry Andric "^(SQSHL|SQSHLU|UQSHL)_(ZPmI|ZPZI)_[BHSD]", 71406c3fb27SDimitry Andric "^SQSHRU?N[BT]_ZZI_[BHS]", 71506c3fb27SDimitry Andric "^UQR?SHRN[BT]_ZZI_[BHS]")>; 71606c3fb27SDimitry Andric 71706c3fb27SDimitry Andric// Arithmetic, shift rounding 71806c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], 71906c3fb27SDimitry Andric (instregex "^(SRSHL|SRSHR|SRSHLR|URSHL|URSHLR|URSHR)_(ZPmZ|ZPZZ|ZPZI)_[BHSD]", 72006c3fb27SDimitry Andric "^[SU]RSHR_ZPmI_[BHSD]")>; 72106c3fb27SDimitry Andric 72206c3fb27SDimitry Andric// Bit manipulation 72306c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<14, 13, CortexA510UnitVMC>], 72406c3fb27SDimitry Andric (instregex "^(BDEP|BEXT|BGRP)_ZZZ_B")>; 72506c3fb27SDimitry Andric 72606c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<22, 21, CortexA510UnitVMC>], 72706c3fb27SDimitry Andric (instregex "^(BDEP|BEXT|BGRP)_ZZZ_H")>; 72806c3fb27SDimitry Andric 72906c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<38, 37, CortexA510UnitVMC>], 73006c3fb27SDimitry Andric (instregex "^(BDEP|BEXT|BGRP)_ZZZ_S")>; 73106c3fb27SDimitry Andric 73206c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<70, 69, CortexA510UnitVMC>], 73306c3fb27SDimitry Andric (instregex "^(BDEP|BEXT|BGRP)_ZZZ_D")>; 73406c3fb27SDimitry Andric 73506c3fb27SDimitry Andric 73606c3fb27SDimitry Andric// Bitwise select 73706c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "^(BSL|BSL1N|BSL2N|NBSL)_ZZZZ")>; 73806c3fb27SDimitry Andric 73906c3fb27SDimitry Andric// Count/reverse bits 74006c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "^(CLS|CLZ|RBIT)_ZPmZ_[BHSD]")>; 741*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "^CNT_ZPmZ_[BH]")>; 74206c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<8, CortexA510UnitVALU>], (instregex "^CNT_ZPmZ_S")>; 74306c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<12, CortexA510UnitVALU>], (instregex "^CNT_ZPmZ_D")>; 74406c3fb27SDimitry Andric// Broadcast logical bitmask immediate to vector 74506c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instrs DUPM_ZI)>; 74606c3fb27SDimitry Andric 74706c3fb27SDimitry Andric// Compare and set flags 748*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], 74906c3fb27SDimitry Andric (instregex "^CMP(EQ|GE|GT|HI|HS|LE|LO|LS|LT|NE)_PPzZ[IZ]_[BHSD]", 75006c3fb27SDimitry Andric "^CMP(EQ|GE|GT|HI|HS|LE|LO|LS|LT|NE)_WIDE_PPzZZ_[BHS]")>; 75106c3fb27SDimitry Andric 75206c3fb27SDimitry Andric// Complex add 75306c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "^CADD_ZZI_[BHSD]")>; 75406c3fb27SDimitry Andric 75506c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^SQCADD_ZZI_[BHSD]")>; 75606c3fb27SDimitry Andric 75706c3fb27SDimitry Andric// Complex dot product 8-bit element 75806c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instrs CDOT_ZZZ_S, CDOT_ZZZI_S)>; 75906c3fb27SDimitry Andric 76006c3fb27SDimitry Andric// Complex dot product 16-bit element 76106c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instrs CDOT_ZZZ_D, CDOT_ZZZI_D)>; 76206c3fb27SDimitry Andric 76306c3fb27SDimitry Andric// Complex multiply-add B, H, S element size 76406c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^CMLA_ZZZ_[BHS]", 76506c3fb27SDimitry Andric "^CMLA_ZZZI_[HS]")>; 76606c3fb27SDimitry Andric 76706c3fb27SDimitry Andric// Complex multiply-add D element size 76806c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instrs CMLA_ZZZ_D)>; 76906c3fb27SDimitry Andric 77006c3fb27SDimitry Andric// Conditional extract operations, scalar form 77106c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<8, 2, CortexA510UnitVALU>], (instregex "^CLAST[AB]_RPZ_[BHSD]")>; 77206c3fb27SDimitry Andric 77306c3fb27SDimitry Andric// Conditional extract operations, SIMD&FP scalar and vector forms 77406c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^CLAST[AB]_[VZ]PZ_[BHSD]", 77506c3fb27SDimitry Andric "^COMPACT_ZPZ_[SD]", 77606c3fb27SDimitry Andric "^SPLICE_ZPZZ?_[BHSD]")>; 77706c3fb27SDimitry Andric 77806c3fb27SDimitry Andric// Convert to floating point, 64b to float or convert to double 77906c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^[SU]CVTF_ZPmZ_Dto[SD]")>; 78006c3fb27SDimitry Andric 78106c3fb27SDimitry Andric// Convert to floating point, 64b to half 78206c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^[SU]CVTF_ZPmZ_DtoH")>; 78306c3fb27SDimitry Andric 78406c3fb27SDimitry Andric// Convert to floating point, 32b to single or half 78506c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^[SU]CVTF_ZPmZ_Sto[HS]")>; 78606c3fb27SDimitry Andric 78706c3fb27SDimitry Andric// Convert to floating point, 32b to double 78806c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^[SU]CVTF_ZPmZ_StoD")>; 78906c3fb27SDimitry Andric 79006c3fb27SDimitry Andric// Convert to floating point, 16b to half 79106c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^[SU]CVTF_ZPmZ_HtoH")>; 79206c3fb27SDimitry Andric 79306c3fb27SDimitry Andric// Copy, scalar 79406c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU0>],(instregex "^CPY_ZPmR_[BHSD]")>; 79506c3fb27SDimitry Andric 79606c3fb27SDimitry Andric// Copy, scalar SIMD&FP or imm 79706c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "^CPY_ZPm[IV]_[BHSD]", 79806c3fb27SDimitry Andric "^CPY_ZPzI_[BHSD]")>; 79906c3fb27SDimitry Andric 80006c3fb27SDimitry Andric// Divides, 32 bit 80106c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<15, 12, CortexA510UnitVMC>], (instregex "^[SU]DIVR?_(ZPmZ|ZPZZ)_S")>; 80206c3fb27SDimitry Andric 80306c3fb27SDimitry Andric// Divides, 64 bit 80406c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<26, 23, CortexA510UnitVMC>], (instregex "^[SU]DIVR?_(ZPmZ|ZPZZ)_D")>; 80506c3fb27SDimitry Andric 80606c3fb27SDimitry Andric// Dot product, 8 bit 80706c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^[SU]DOT_ZZZI?_S")>; 80806c3fb27SDimitry Andric 80906c3fb27SDimitry Andric// Dot product, 8 bit, using signed and unsigned integers 81006c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instrs SUDOT_ZZZI, USDOT_ZZZI, USDOT_ZZZ)>; 81106c3fb27SDimitry Andric 81206c3fb27SDimitry Andric// Dot product, 16 bit 81306c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^[SU]DOT_ZZZI?_D")>; 81406c3fb27SDimitry Andric 81506c3fb27SDimitry Andric// Duplicate, immediate and indexed form 81606c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "^DUP_ZI_[BHSD]", 81706c3fb27SDimitry Andric "^DUP_ZZI_[BHSDQ]")>; 81806c3fb27SDimitry Andric 81906c3fb27SDimitry Andric// Duplicate, scalar form 82006c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "^DUP_ZR_[BHSD]")>; 82106c3fb27SDimitry Andric 82206c3fb27SDimitry Andric// Extend, sign or zero 82306c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "^[SU]XTB_ZPmZ_[HSD]", 82406c3fb27SDimitry Andric "^[SU]XTH_ZPmZ_[SD]", 82506c3fb27SDimitry Andric "^[SU]XTW_ZPmZ_[D]")>; 82606c3fb27SDimitry Andric 82706c3fb27SDimitry Andric// Extract 82806c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instrs EXT_ZZI, EXT_ZZI_B)>; 82906c3fb27SDimitry Andric 83006c3fb27SDimitry Andric// Extract narrow saturating 83106c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^[SU]QXTN[BT]_ZZ_[BHS]", 83206c3fb27SDimitry Andric "^SQXTUN[BT]_ZZ_[BHS]")>; 83306c3fb27SDimitry Andric 83406c3fb27SDimitry Andric// Extract/insert operation, SIMD and FP scalar form 83506c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^LAST[AB]_VPZ_[BHSD]", 83606c3fb27SDimitry Andric "^INSR_ZV_[BHSD]")>; 83706c3fb27SDimitry Andric 83806c3fb27SDimitry Andric// Extract/insert operation, scalar 83906c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<8, 2, CortexA510UnitVALU0>], (instregex "^LAST[AB]_RPZ_[BHSD]", 84006c3fb27SDimitry Andric "^INSR_ZR_[BHSD]")>; 84106c3fb27SDimitry Andric 84206c3fb27SDimitry Andric// Histogram operations 84306c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<8, 2, CortexA510UnitVALU0>], (instregex "^HISTCNT_ZPzZZ_[SD]", 84406c3fb27SDimitry Andric "^HISTSEG_ZZZ")>; 84506c3fb27SDimitry Andric 84606c3fb27SDimitry Andric// Horizontal operations, B, H, S form, immediate operands only 84706c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^INDEX_II_[BHS]")>; 84806c3fb27SDimitry Andric 84906c3fb27SDimitry Andric// Horizontal operations, B, H, S form, scalar, immediate operands/ scalar 85006c3fb27SDimitry Andric// operands only / immediate, scalar operands 85106c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^INDEX_(IR|RI|RR)_[BHS]")>; 85206c3fb27SDimitry Andric 85306c3fb27SDimitry Andric// Horizontal operations, D form, immediate operands only 85406c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instrs INDEX_II_D)>; 85506c3fb27SDimitry Andric 85606c3fb27SDimitry Andric// Horizontal operations, D form, scalar, immediate operands)/ scalar operands 85706c3fb27SDimitry Andric// only / immediate, scalar operands 85806c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^INDEX_(IR|RI|RR)_D")>; 85906c3fb27SDimitry Andric 86006c3fb27SDimitry Andric// Logical 86106c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], 86206c3fb27SDimitry Andric (instregex "^(AND|EOR|ORR)_ZI", 86306c3fb27SDimitry Andric "^(AND|BIC|EOR|EOR|ORR)_ZZZ", 86406c3fb27SDimitry Andric "^(AND|BIC|EOR|NOT|ORR)_ZPmZ_[BHSD]", 86506c3fb27SDimitry Andric "^(AND|BIC|EOR|NOT|ORR)_ZPZZ_[BHSD]")>; 86606c3fb27SDimitry Andric 86706c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], 86806c3fb27SDimitry Andric (instregex "^EOR(BT|TB)_ZZZ_[BHSD]")>; 86906c3fb27SDimitry Andric 87006c3fb27SDimitry Andric// Max/min, basic and pairwise 87106c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "^[SU](MAX|MIN)_ZI_[BHSD]", 87206c3fb27SDimitry Andric "^[SU](MAX|MIN)P?_(ZPmZ|ZPZZ)_[BHSD]")>; 87306c3fb27SDimitry Andric 87406c3fb27SDimitry Andric// Matching operations 87506c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<7, 2, CortexA510UnitVALU>], (instregex "^N?MATCH_PPzZZ_[BH]")>; 87606c3fb27SDimitry Andric 87706c3fb27SDimitry Andric// Matrix multiply-accumulate 87806c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instrs SMMLA_ZZZ, UMMLA_ZZZ, USMMLA_ZZZ)>; 87906c3fb27SDimitry Andric 88006c3fb27SDimitry Andric// Move prefix 88106c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "^MOVPRFX_ZP[mz]Z_[BHSD]", 88206c3fb27SDimitry Andric "^MOVPRFX_ZZ")>; 88306c3fb27SDimitry Andric 88406c3fb27SDimitry Andric// Multiply, B, H, S element size 88506c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^MUL_(ZI|ZPmZ|ZZZI|ZZZ|ZPZZ)_[BHS]", 88606c3fb27SDimitry Andric "^[SU]MULH_(ZPmZ|ZZZ|ZPZZ)_[BHS]")>; 88706c3fb27SDimitry Andric 88806c3fb27SDimitry Andric// Multiply, D element size 88906c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^MUL_(ZI|ZPmZ|ZZZI|ZZZ|ZPZZ)_D", 89006c3fb27SDimitry Andric "^[SU]MULH_(ZPmZ|ZZZ|ZPZZ)_D")>; 89106c3fb27SDimitry Andric 89206c3fb27SDimitry Andric// Multiply long 89306c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^[SU]MULL[BT]_ZZZI_[SD]", 89406c3fb27SDimitry Andric "^[SU]MULL[BT]_ZZZ_[HSD]")>; 89506c3fb27SDimitry Andric 89606c3fb27SDimitry Andric// Multiply accumulate, B, H, S element size 89706c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^ML[AS]_(ZZZI|ZPZZZ)_[BHS]", 89806c3fb27SDimitry Andric "^(ML[AS]|MAD|MSB)_ZPmZZ_[BHS]")>; 89906c3fb27SDimitry Andric 90006c3fb27SDimitry Andric// Multiply accumulate, D element size 90106c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^ML[AS]_(ZZZI|ZPZZZ)_D", 90206c3fb27SDimitry Andric "^(ML[AS]|MAD|MSB)_ZPmZZ_D")>; 90306c3fb27SDimitry Andric 90406c3fb27SDimitry Andric// Multiply accumulate long 90506c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^[SU]ML[AS]L[BT]_ZZZ_[HSD]", 90606c3fb27SDimitry Andric "^[SU]ML[AS]L[BT]_ZZZI_[SD]")>; 90706c3fb27SDimitry Andric 90806c3fb27SDimitry Andric// Multiply accumulate saturating doubling long regular 90906c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^SQDML[AS](LB|LT|LBT)_ZZZ_[HSD]", 91006c3fb27SDimitry Andric "^SQDML[AS](LB|LT)_ZZZI_[SD]")>; 91106c3fb27SDimitry Andric 91206c3fb27SDimitry Andric// Multiply saturating doubling high, B, H, S element size 91306c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^SQDMULH_ZZZ_[BHS]", 91406c3fb27SDimitry Andric "^SQDMULH_ZZZI_[HS]")>; 91506c3fb27SDimitry Andric 91606c3fb27SDimitry Andric// Multiply saturating doubling high, D element size 91706c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instrs SQDMULH_ZZZ_D, SQDMULH_ZZZI_D)>; 91806c3fb27SDimitry Andric 91906c3fb27SDimitry Andric// Multiply saturating doubling long 92006c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^SQDMULL[BT]_ZZZ_[HSD]", 92106c3fb27SDimitry Andric "^SQDMULL[BT]_ZZZI_[SD]")>; 92206c3fb27SDimitry Andric 92306c3fb27SDimitry Andric// Multiply saturating rounding doubling regular/complex accumulate, B, H, S 92406c3fb27SDimitry Andric// element size 92506c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^SQRDML[AS]H_ZZZ_[BHS]", 92606c3fb27SDimitry Andric "^SQRDCMLAH_ZZZ_[BHS]", 92706c3fb27SDimitry Andric "^SQRDML[AS]H_ZZZI_[HS]", 92806c3fb27SDimitry Andric "^SQRDCMLAH_ZZZI_[HS]")>; 92906c3fb27SDimitry Andric 93006c3fb27SDimitry Andric// Multiply saturating rounding doubling regular/complex accumulate, D element 93106c3fb27SDimitry Andric// size 93206c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^SQRDML[AS]H_ZZZI?_D", 93306c3fb27SDimitry Andric "^SQRDCMLAH_ZZZ_D")>; 93406c3fb27SDimitry Andric 93506c3fb27SDimitry Andric// Multiply saturating rounding doubling regular/complex, B, H, S element size 93606c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^SQRDMULH_ZZZ_[BHS]", 93706c3fb27SDimitry Andric "^SQRDMULH_ZZZI_[HS]")>; 93806c3fb27SDimitry Andric 93906c3fb27SDimitry Andric// Multiply saturating rounding doubling regular/complex, D element size 94006c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^SQRDMULH_ZZZI?_D")>; 94106c3fb27SDimitry Andric 94206c3fb27SDimitry Andric// Multiply/multiply long, (8x8) polynomial 94306c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^PMUL_ZZZ_B")>; 94406c3fb27SDimitry Andric 945*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<9, CortexA510UnitVMC>], (instregex "^PMULL[BT]_ZZZ_[HDQ]")>; 94606c3fb27SDimitry Andric 94706c3fb27SDimitry Andric 94806c3fb27SDimitry Andric// Predicate counting vector 949*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], 950*0fca6ea1SDimitry Andric (instregex "^(DEC|INC)[HWD]_ZPiI")>; 95106c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], 952*0fca6ea1SDimitry Andric (instregex "^(SQDEC|SQINC|UQDEC|UQINC)[HWD]_ZPiI")>; 95306c3fb27SDimitry Andric 95406c3fb27SDimitry Andric// Reciprocal estimate 95506c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^URECPE_ZPmZ_S", "^URSQRTE_ZPmZ_S")>; 95606c3fb27SDimitry Andric 95706c3fb27SDimitry Andric// Reduction, arithmetic, B form 95806c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU0>], (instregex "^[SU](ADD|MAX|MIN)V_VPZ_B")>; 95906c3fb27SDimitry Andric 96006c3fb27SDimitry Andric// Reduction, arithmetic, H form 96106c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU0>], (instregex "^[SU](ADD|MAX|MIN)V_VPZ_H")>; 96206c3fb27SDimitry Andric 96306c3fb27SDimitry Andric// Reduction, arithmetic, S form 96406c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU0>], (instregex "^[SU](ADD|MAX|MIN)V_VPZ_S")>; 96506c3fb27SDimitry Andric 96606c3fb27SDimitry Andric// Reduction, arithmetic, D form 96706c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU0>], (instregex "^[SU](ADD|MAX|MIN)V_VPZ_D")>; 96806c3fb27SDimitry Andric 96906c3fb27SDimitry Andric// Reduction, logical 97006c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU0>], (instregex "^(ANDV|EORV|ORV)_VPZ_[BHSD]")>; 97106c3fb27SDimitry Andric 97206c3fb27SDimitry Andric// Reverse, vector 973*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "^REV_ZZ_[BHSD]", 97406c3fb27SDimitry Andric "^REVB_ZPmZ_[HSD]", 97506c3fb27SDimitry Andric "^REVH_ZPmZ_[SD]", 97606c3fb27SDimitry Andric "^REVW_ZPmZ_D")>; 97706c3fb27SDimitry Andric 97806c3fb27SDimitry Andric// Select, vector form 97906c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "^SEL_ZPZZ_[BHSD]")>; 98006c3fb27SDimitry Andric 98106c3fb27SDimitry Andric// Table lookup 98206c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^TBL_ZZZZ?_[BHSD]")>; 98306c3fb27SDimitry Andric 98406c3fb27SDimitry Andric// Table lookup extension 98506c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^TBX_ZZZ_[BHSD]")>; 98606c3fb27SDimitry Andric 98706c3fb27SDimitry Andric// Transpose, vector form 988*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "^TRN[12]_ZZZ_[BHSDQ]")>; 98906c3fb27SDimitry Andric 99006c3fb27SDimitry Andric// Unpack and extend 99106c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^[SU]UNPK(HI|LO)_ZZ_[HSD]")>; 99206c3fb27SDimitry Andric 99306c3fb27SDimitry Andric// Zip/unzip 994*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "^(UZP|ZIP)[12]_ZZZ_[BHSDQ]")>; 99506c3fb27SDimitry Andric 99606c3fb27SDimitry Andric// SVE floating-point instructions 99706c3fb27SDimitry Andric// ----------------------------------------------------------------------------- 99806c3fb27SDimitry Andric 99906c3fb27SDimitry Andric// Floating point absolute value/difference 100006c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^FAB[SD]_ZPmZ_[HSD]", 100106c3fb27SDimitry Andric "^FAB[SD]_ZPZZ_[HSD]")>; 100206c3fb27SDimitry Andric 100306c3fb27SDimitry Andric// Floating point arithmetic 100406c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^F(ADD|SUB)_(ZPm[IZ]|ZZZ|ZPZI|ZPZZ)_[HSD]", 100506c3fb27SDimitry Andric "^FADDP_ZPmZZ_[HSD]", 100606c3fb27SDimitry Andric "^FNEG_ZPmZ_[HSD]", 100706c3fb27SDimitry Andric "^FSUBR_(ZPm[IZ]|ZPZ[IZ])_[HSD]")>; 100806c3fb27SDimitry Andric 100906c3fb27SDimitry Andric// Floating point associative add, F16 101006c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<32, 29, CortexA510UnitVALU>], (instrs FADDA_VPZ_H)>; 101106c3fb27SDimitry Andric 101206c3fb27SDimitry Andric// Floating point associative add, F32 101306c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<16, 13, CortexA510UnitVALU>], (instrs FADDA_VPZ_S)>; 101406c3fb27SDimitry Andric 101506c3fb27SDimitry Andric// Floating point associative add, F64 101606c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<8, 5, CortexA510UnitVALU>], (instrs FADDA_VPZ_D)>; 101706c3fb27SDimitry Andric 101806c3fb27SDimitry Andric// Floating point compare 101906c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^FACG[ET]_PPzZZ_[HSD]", 102006c3fb27SDimitry Andric "^FCM(EQ|GE|GT|NE)_PPzZ[0Z]_[HSD]", 102106c3fb27SDimitry Andric "^FCM(LE|LT)_PPzZ0_[HSD]", 102206c3fb27SDimitry Andric "^FCMUO_PPzZZ_[HSD]")>; 102306c3fb27SDimitry Andric 102406c3fb27SDimitry Andric// Floating point complex add 102506c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^FCADD_ZPmZ_[HSD]")>; 102606c3fb27SDimitry Andric 102706c3fb27SDimitry Andric// Floating point complex multiply add 102806c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^FCMLA_ZPmZZ_[HSD]", 102906c3fb27SDimitry Andric "^FCMLA_ZZZI_[HS]")>; 103006c3fb27SDimitry Andric 103106c3fb27SDimitry Andric// Floating point convert, long or narrow (F16 to F32 or F32 to F16) 103206c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^FCVT_ZPmZ_(HtoS|StoH)", 103306c3fb27SDimitry Andric "^FCVTLT_ZPmZ_HtoS", 103406c3fb27SDimitry Andric "^FCVTNT_ZPmZ_StoH")>; 103506c3fb27SDimitry Andric 103606c3fb27SDimitry Andric// Floating point convert, long or narrow (F16 to F64, F32 to F64, F64 to F32 103706c3fb27SDimitry Andric// or F64 to F16) 103806c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^FCVT_ZPmZ_(HtoD|StoD|DtoS|DtoH)", 103906c3fb27SDimitry Andric "^FCVTLT_ZPmZ_StoD", 104006c3fb27SDimitry Andric "^FCVTNT_ZPmZ_DtoS")>; 104106c3fb27SDimitry Andric 104206c3fb27SDimitry Andric// Floating point convert, round to odd 104306c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^FCVTX_ZPmZ_DtoS", "FCVTXNT_ZPmZ_DtoS")>; 104406c3fb27SDimitry Andric 104506c3fb27SDimitry Andric// Floating point base2 log, F16 104606c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^FLOGB_(ZPmZ|ZPZZ)_H")>; 104706c3fb27SDimitry Andric 104806c3fb27SDimitry Andric// Floating point base2 log, F32 104906c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^FLOGB_(ZPmZ|ZPZZ)_S")>; 105006c3fb27SDimitry Andric 105106c3fb27SDimitry Andric// Floating point base2 log, F64 105206c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^FLOGB_(ZPmZ|ZPZZ)_D")>; 105306c3fb27SDimitry Andric 105406c3fb27SDimitry Andric// Floating point convert to integer, F16 105506c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^FCVTZ[SU]_ZPmZ_HtoH")>; 105606c3fb27SDimitry Andric 105706c3fb27SDimitry Andric// Floating point convert to integer, F32 105806c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^FCVTZ[SU]_ZPmZ_(HtoS|StoS)")>; 105906c3fb27SDimitry Andric 106006c3fb27SDimitry Andric// Floating point convert to integer, F64 106106c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], 106206c3fb27SDimitry Andric (instregex "^FCVTZ[SU]_ZPmZ_(HtoD|StoD|DtoS|DtoD)")>; 106306c3fb27SDimitry Andric 106406c3fb27SDimitry Andric// Floating point copy 106506c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU0>], (instregex "^FCPY_ZPmI_[HSD]", 106606c3fb27SDimitry Andric "^FDUP_ZI_[HSD]")>; 106706c3fb27SDimitry Andric 106806c3fb27SDimitry Andric// Floating point divide, F16 106906c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<8, 5, CortexA510UnitVMC>], (instregex "^FDIVR?_(ZPmZ|ZPZZ)_H")>; 107006c3fb27SDimitry Andric 107106c3fb27SDimitry Andric// Floating point divide, F32 107206c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<13, 10, CortexA510UnitVMC>], (instregex "^FDIVR?_(ZPmZ|ZPZZ)_S")>; 107306c3fb27SDimitry Andric 107406c3fb27SDimitry Andric// Floating point divide, F64 107506c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<22, 19, CortexA510UnitVMC>], (instregex "^FDIVR?_(ZPmZ|ZPZZ)_D")>; 107606c3fb27SDimitry Andric 107706c3fb27SDimitry Andric// Floating point min/max pairwise 107806c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^F(MAX|MIN)(NM)?P_ZPmZZ_[HSD]")>; 107906c3fb27SDimitry Andric 108006c3fb27SDimitry Andric// Floating point min/max 108106c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^F(MAX|MIN)(NM)?_(ZPm[IZ]|ZPZZ|ZPZI)_[HSD]")>; 108206c3fb27SDimitry Andric 108306c3fb27SDimitry Andric// Floating point multiply 108406c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^(FSCALE|FMULX)_(ZPmZ|ZPZZ)_[HSD]", 108506c3fb27SDimitry Andric "^FMUL_(ZPm[IZ]|ZZZI?|ZPZI|ZPZZ)_[HSD]")>; 108606c3fb27SDimitry Andric 108706c3fb27SDimitry Andric// Floating point multiply accumulate 108806c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], 108906c3fb27SDimitry Andric (instregex "^FML[AS]_(ZPmZZ|ZZZI|ZPZZZ)_[HSD]", 109006c3fb27SDimitry Andric "^(FMAD|FNMAD|FNML[AS]|FN?MSB)_(ZPmZZ|ZPZZZ)_[HSD]")>; 109106c3fb27SDimitry Andric 109206c3fb27SDimitry Andric// Floating point multiply add/sub accumulate long 109306c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^FML[AS]L[BT]_ZZZI?_SHH")>; 109406c3fb27SDimitry Andric 109506c3fb27SDimitry Andric// Floating point reciprocal estimate, F16 109606c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^FRECPE_ZZ_H", "^FRECPX_ZPmZ_H", 109706c3fb27SDimitry Andric "^FRSQRTE_ZZ_H")>; 109806c3fb27SDimitry Andric 109906c3fb27SDimitry Andric// Floating point reciprocal estimate, F32 110006c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^FRECPE_ZZ_S", "^FRECPX_ZPmZ_S", 110106c3fb27SDimitry Andric "^FRSQRTE_ZZ_S")>; 110206c3fb27SDimitry Andric// Floating point reciprocal estimate, F64 110306c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>],(instregex "^FRECPE_ZZ_D", "^FRECPX_ZPmZ_D", 110406c3fb27SDimitry Andric "^FRSQRTE_ZZ_D")>; 110506c3fb27SDimitry Andric 110606c3fb27SDimitry Andric// Floating point reciprocal step 110706c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^F(RECPS|RSQRTS)_ZZZ_[HSD]")>; 110806c3fb27SDimitry Andric 110906c3fb27SDimitry Andric// Floating point reduction, F16 111006c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU0>], 111106c3fb27SDimitry Andric (instregex "^(FMAXNMV|FMAXV|FMINNMV|FMINV)_VPZ_[HSD]")>; 111206c3fb27SDimitry Andric 111306c3fb27SDimitry Andric// Floating point reduction, F32 111406c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<12, 11, CortexA510UnitVALU0>], 111506c3fb27SDimitry Andric (instregex "^FADDV_VPZ_H")>; 111606c3fb27SDimitry Andric 111706c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<8, 5, CortexA510UnitVALU0>], 111806c3fb27SDimitry Andric (instregex "^FADDV_VPZ_S")>; 111906c3fb27SDimitry Andric 112006c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU0>], 112106c3fb27SDimitry Andric (instregex "^FADDV_VPZ_D")>; 112206c3fb27SDimitry Andric 112306c3fb27SDimitry Andric 112406c3fb27SDimitry Andric// Floating point round to integral, F16 112506c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^FRINT[AIMNPXZ]_ZPmZ_H")>; 112606c3fb27SDimitry Andric 112706c3fb27SDimitry Andric// Floating point round to integral, F32 112806c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^FRINT[AIMNPXZ]_ZPmZ_S")>; 112906c3fb27SDimitry Andric 113006c3fb27SDimitry Andric// Floating point round to integral, F64 113106c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^FRINT[AIMNPXZ]_ZPmZ_D")>; 113206c3fb27SDimitry Andric 113306c3fb27SDimitry Andric// Floating point square root, F16 113406c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<8, 5, CortexA510UnitVMC>], (instregex "^FSQRT_ZPmZ_H")>; 113506c3fb27SDimitry Andric 113606c3fb27SDimitry Andric// Floating point square root, F32 113706c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<12, 9, CortexA510UnitVMC>], (instregex "^FSQRT_ZPmZ_S")>; 113806c3fb27SDimitry Andric 113906c3fb27SDimitry Andric// Floating point square root, F64 114006c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<22, 19, CortexA510UnitVMC>], (instregex "^FSQRT_ZPmZ_D")>; 114106c3fb27SDimitry Andric 114206c3fb27SDimitry Andric// Floating point trigonometric exponentiation 114306c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^FEXPA_ZZ_[HSD]")>; 114406c3fb27SDimitry Andric 114506c3fb27SDimitry Andric// Floating point trigonometric multiply add 114606c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^FTMAD_ZZI_[HSD]")>; 114706c3fb27SDimitry Andric 114806c3fb27SDimitry Andric// Floating point trigonometric, miscellaneous 114906c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^FTSMUL_ZZZ_[HSD]")>; 1150*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "^FTSSEL_ZZZ_[HSD]")>; 115106c3fb27SDimitry Andric 115206c3fb27SDimitry Andric 115306c3fb27SDimitry Andric// SVE BFloat16 (BF16) instructions 115406c3fb27SDimitry Andric// ----------------------------------------------------------------------------- 115506c3fb27SDimitry Andric 115606c3fb27SDimitry Andric// Convert, F32 to BF16 115706c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instrs BFCVT_ZPmZ, BFCVTNT_ZPmZ)>; 115806c3fb27SDimitry Andric 115906c3fb27SDimitry Andric// Dot product 116006c3fb27SDimitry Andricdef : InstRW<[A510Write_10cyc_1VMAC_1VALU], (instrs BFDOT_ZZI, BFDOT_ZZZ)>; 116106c3fb27SDimitry Andric 116206c3fb27SDimitry Andric// Matrix multiply accumulate 116306c3fb27SDimitry Andricdef : InstRW<[A510Write_15cyc_1VMAC_1VALU], (instrs BFMMLA_ZZZ)>; 116406c3fb27SDimitry Andric 116506c3fb27SDimitry Andric// Multiply accumulate long 116606c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVMAC>], (instregex "^BFMLAL[BT]_ZZZ(I)?")>; 116706c3fb27SDimitry Andric 116806c3fb27SDimitry Andric// SVE Load instructions 116906c3fb27SDimitry Andric// ----------------------------------------------------------------------------- 117006c3fb27SDimitry Andric 117106c3fb27SDimitry Andric// Load vector 117206c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitLd>], (instrs LDR_ZXI)>; 117306c3fb27SDimitry Andric 117406c3fb27SDimitry Andric// Load predicate 117506c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitLdSt>], (instrs LDR_PXI)>; 117606c3fb27SDimitry Andric 117706c3fb27SDimitry Andric// Contiguous load, scalar + imm 11785f757f3fSDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitLd>], (instregex "^LD1[BHWD]_IMM$", 11795f757f3fSDimitry Andric "^LD1S?B_[HSD]_IMM$", 11805f757f3fSDimitry Andric "^LD1S?H_[SD]_IMM$", 11815f757f3fSDimitry Andric "^LD1S?W_D_IMM$" )>; 118206c3fb27SDimitry Andric// Contiguous load, scalar + scalar 118306c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitLd>], (instregex "^LD1[BHWD]$", 118406c3fb27SDimitry Andric "^LD1S?B_[HSD]$", 118506c3fb27SDimitry Andric "^LD1S?H_[SD]$", 118606c3fb27SDimitry Andric "^LD1S?W_D$" )>; 118706c3fb27SDimitry Andric 118806c3fb27SDimitry Andric// Contiguous load broadcast, scalar + imm 118906c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitLd>], (instregex "^LD1R[BHWD]_IMM$", 119006c3fb27SDimitry Andric "^LD1RSW_IMM$", 119106c3fb27SDimitry Andric "^LD1RS?B_[HSD]_IMM$", 119206c3fb27SDimitry Andric "^LD1RS?H_[SD]_IMM$", 119306c3fb27SDimitry Andric "^LD1RS?W_D_IMM$", 119406c3fb27SDimitry Andric "^LD1RQ_[BHWD]_IMM$")>; 119506c3fb27SDimitry Andric 119606c3fb27SDimitry Andric// Contiguous load broadcast, scalar + scalar 119706c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitLdSt>], (instregex "^LD1RQ_[BHWD]$")>; 119806c3fb27SDimitry Andric 119906c3fb27SDimitry Andric// Non temporal load, scalar + imm 120006c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitLdSt>], (instregex "^LDNT1[BHWD]_ZRI$")>; 120106c3fb27SDimitry Andric 120206c3fb27SDimitry Andric// Non temporal load, scalar + scalar 120306c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitLdSt>], (instregex "^LDNT1[BHWD]_ZRR$")>; 120406c3fb27SDimitry Andric 120506c3fb27SDimitry Andric// Non temporal gather load, vector + scalar 32-bit element size 1206*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510MCWrite<9, 9, CortexA510UnitLdSt>], (instregex "^LDNT1[BHW]_ZZR_S$", 1207*0fca6ea1SDimitry Andric "^LDNT1S[BH]_ZZR_S$")>; 120806c3fb27SDimitry Andric 120906c3fb27SDimitry Andric// Non temporal gather load, vector + scalar 64-bit element size 1210*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510MCWrite<7, 7, CortexA510UnitLdSt>], (instregex "^LDNT1S?[BHW]_ZZR_D$")>; 1211*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510MCWrite<7, 7, CortexA510UnitLdSt>], (instrs LDNT1D_ZZR_D)>; 121206c3fb27SDimitry Andric 121306c3fb27SDimitry Andric// Contiguous first faulting load, scalar + scalar 1214*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitLd>], (instregex "^LDFF1[BHWD]$", 1215*0fca6ea1SDimitry Andric "^LDFF1S?B_[HSD]$", 1216*0fca6ea1SDimitry Andric "^LDFF1S?H_[SD]$", 1217*0fca6ea1SDimitry Andric "^LDFF1S?W_D$")>; 121806c3fb27SDimitry Andric 121906c3fb27SDimitry Andric// Contiguous non faulting load, scalar + imm 1220*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitLd>], (instregex "^LDNF1[BHWD]_IMM$", 1221*0fca6ea1SDimitry Andric "^LDNF1S?B_[HSD]_IMM$", 1222*0fca6ea1SDimitry Andric "^LDNF1S?H_[SD]_IMM$", 1223*0fca6ea1SDimitry Andric "^LDNF1S?W_D_IMM$")>; 122406c3fb27SDimitry Andric 122506c3fb27SDimitry Andric// Contiguous Load two structures to two vectors, scalar + imm 122606c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<3, 1, CortexA510UnitLdSt>], (instregex "^LD2[BHWD]_IMM$")>; 122706c3fb27SDimitry Andric 122806c3fb27SDimitry Andric// Contiguous Load two structures to two vectors, scalar + scalar 122906c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<3, 2, CortexA510UnitLdSt>], (instregex "^LD2[BHWD]$")>; 123006c3fb27SDimitry Andric 123106c3fb27SDimitry Andric// Contiguous Load three structures to three vectors, scalar + imm 123206c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<5, 3, CortexA510UnitLdSt>], (instregex "^LD3[BHWD]_IMM$")>; 123306c3fb27SDimitry Andric 123406c3fb27SDimitry Andric// Contiguous Load three structures to three vectors, scalar + scalar 123506c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<5, 3, CortexA510UnitLdSt>], (instregex "^LD3[BHWD]$")>; 123606c3fb27SDimitry Andric 123706c3fb27SDimitry Andric// Contiguous Load four structures to four vectors, scalar + imm 123806c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<5, 3, CortexA510UnitLdSt>], (instregex "^LD4[BHWD]_IMM$")>; 123906c3fb27SDimitry Andric 124006c3fb27SDimitry Andric// Contiguous Load four structures to four vectors, scalar + scalar 124106c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<5, 3, CortexA510UnitLdSt>], (instregex "^LD4[BHWD]$")>; 124206c3fb27SDimitry Andric 124306c3fb27SDimitry Andric// Gather load, vector + imm, 32-bit element size 1244*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510MCWrite<9, 9, CortexA510UnitLdSt>], (instregex "^GLD(FF)?1S?[BH]_S_IMM$", 1245*0fca6ea1SDimitry Andric "^GLD(FF)?1W_IMM$")>; 124606c3fb27SDimitry Andric 124706c3fb27SDimitry Andric// Gather load, vector + imm, 64-bit element size 1248*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510MCWrite<7, 7, CortexA510UnitLdSt>], (instregex "^GLD(FF)?1S?[BHW]_D_IMM$", 1249*0fca6ea1SDimitry Andric "^GLD(FF)?1D_IMM$")>; 125006c3fb27SDimitry Andric 125106c3fb27SDimitry Andric// Gather load, 64-bit element size 125206c3fb27SDimitry Andricdef : InstRW<[CortexA510MCWrite<7, 7, CortexA510UnitLdSt>], 1253*0fca6ea1SDimitry Andric (instregex "^GLD(FF)?1S?[BHW]_D_[SU]XTW(_SCALED)?$", 1254*0fca6ea1SDimitry Andric "^GLD(FF)?1S?[BHW]_D(_SCALED)?$", 1255*0fca6ea1SDimitry Andric "^GLD(FF)?1D_[SU]XTW(_SCALED)?$", 1256*0fca6ea1SDimitry Andric "^GLD(FF)?1D(_SCALED)?$")>; 125706c3fb27SDimitry Andric 125806c3fb27SDimitry Andric// Gather load, 32-bit scaled offset 1259*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510MCWrite<7, 7, CortexA510UnitLd>], 1260*0fca6ea1SDimitry Andric (instregex "^GLD(FF)?1S?[HW]_S_[SU]XTW_SCALED$", 1261*0fca6ea1SDimitry Andric "^GLD(FF)?1W_[SU]XTW_SCALED")>; 126206c3fb27SDimitry Andric 126306c3fb27SDimitry Andric// Gather load, 32-bit unpacked unscaled offset 1264*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510MCWrite<7, 7, CortexA510UnitLd>], (instregex "^GLD(FF)?1S?[BH]_S_[SU]XTW$", 1265*0fca6ea1SDimitry Andric "^GLD(FF)?1W_[SU]XTW$")>; 126606c3fb27SDimitry Andric 126706c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<0, CortexA510UnitVALU>], (instregex "^PRF(B|H|W|D).*")>; 126806c3fb27SDimitry Andric// SVE Store instructions 126906c3fb27SDimitry Andric// ----------------------------------------------------------------------------- 127006c3fb27SDimitry Andric 127106c3fb27SDimitry Andric// Store from predicate reg 127206c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt0], (instrs STR_PXI)>; 127306c3fb27SDimitry Andric 127406c3fb27SDimitry Andric// Store from vector reg 127506c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt0], (instrs STR_ZXI)>; 127606c3fb27SDimitry Andric 127706c3fb27SDimitry Andric// Contiguous store, scalar + imm 127806c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt0], (instregex "^ST1[BHWD]_IMM$", 127906c3fb27SDimitry Andric "^ST1B_[HSD]_IMM$", 128006c3fb27SDimitry Andric "^ST1H_[SD]_IMM$", 128106c3fb27SDimitry Andric "^ST1W_D_IMM$")>; 128206c3fb27SDimitry Andric 128306c3fb27SDimitry Andric// Contiguous store, scalar + scalar 128406c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt0], (instregex "^ST1H(_[SD])?$")>; 128506c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt0], (instregex "^ST1[BWD]$", 128606c3fb27SDimitry Andric "^ST1B_[HSD]$", 128706c3fb27SDimitry Andric "^ST1W_D$")>; 128806c3fb27SDimitry Andric 128906c3fb27SDimitry Andric// Contiguous store two structures from two vectors, scalar + imm 129006c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt<11>], (instregex "^ST2[BHWD]_IMM$")>; 129106c3fb27SDimitry Andric 129206c3fb27SDimitry Andric// Contiguous store two structures from two vectors, scalar + scalar 129306c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt<11>], (instrs ST2H)>; 129406c3fb27SDimitry Andric 129506c3fb27SDimitry Andric// Contiguous store two structures from two vectors, scalar + scalar 129606c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt<11>], (instregex "^ST2[BWD]$")>; 129706c3fb27SDimitry Andric 129806c3fb27SDimitry Andric// Contiguous store three structures from three vectors, scalar + imm 129906c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt<25>], (instregex "^ST3[BHW]_IMM$")>; 130006c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt<14>], (instregex "^ST3D_IMM$")>; 130106c3fb27SDimitry Andric 130206c3fb27SDimitry Andric// Contiguous store three structures from three vectors, scalar + scalar 130306c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt<25>], (instregex "^ST3[BHW]$")>; 130406c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt<14>], (instregex "^ST3D$")>; 130506c3fb27SDimitry Andric 130606c3fb27SDimitry Andric// Contiguous store four structures from four vectors, scalar + imm 130706c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt<50>], (instregex "^ST4[BHW]_IMM$")>; 130806c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt<25>], (instregex "^ST4D_IMM$")>; 130906c3fb27SDimitry Andric 131006c3fb27SDimitry Andric// Contiguous store four structures from four vectors, scalar + scalar 131106c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt<50>], (instregex "^ST4[BHW]$")>; 131206c3fb27SDimitry Andric 131306c3fb27SDimitry Andric// Contiguous store four structures from four vectors, scalar + scalar 131406c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt<25>], (instregex "^ST4D$")>; 131506c3fb27SDimitry Andric 131606c3fb27SDimitry Andric// Non temporal store, scalar + imm 131706c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt0], (instregex "^STNT1[BHWD]_ZRI$")>; 131806c3fb27SDimitry Andric 131906c3fb27SDimitry Andric// Non temporal store, scalar + scalar 132006c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt0], (instrs STNT1H_ZRR)>; 132106c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt0], (instregex "^STNT1[BWD]_ZRR$")>; 132206c3fb27SDimitry Andric 132306c3fb27SDimitry Andric// Scatter non temporal store, vector + scalar 32-bit element size 132406c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt<9>], (instregex "^STNT1[BHW]_ZZR_S")>; 132506c3fb27SDimitry Andric 132606c3fb27SDimitry Andric// Scatter non temporal store, vector + scalar 64-bit element size 132706c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt<7>], (instregex "^STNT1[BHWD]_ZZR_D")>; 132806c3fb27SDimitry Andric 132906c3fb27SDimitry Andric// Scatter store vector + imm 32-bit element size 133006c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt<9>], (instregex "^SST1[BH]_S_IMM$", 133106c3fb27SDimitry Andric "^SST1W_IMM$")>; 133206c3fb27SDimitry Andric 133306c3fb27SDimitry Andric// Scatter store vector + imm 64-bit element size 133406c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt<7>], (instregex "^SST1[BHW]_D_IMM$", 133506c3fb27SDimitry Andric "^SST1D_IMM$")>; 133606c3fb27SDimitry Andric 133706c3fb27SDimitry Andric// Scatter store, 32-bit scaled offset 133806c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt<8>], 133906c3fb27SDimitry Andric (instregex "^SST1(H_S|W)_[SU]XTW_SCALED$")>; 134006c3fb27SDimitry Andric 134106c3fb27SDimitry Andric// Scatter store, 32-bit unpacked unscaled offset 134206c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt<8>], (instregex "^SST1[BHW]_D_[SU]XTW$", 134306c3fb27SDimitry Andric "^SST1D_[SU]XTW$")>; 134406c3fb27SDimitry Andric 134506c3fb27SDimitry Andric// Scatter store, 32-bit unpacked scaled offset 134606c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt<8>], (instregex "^SST1[HW]_D_[SU]XTW_SCALED$", 134706c3fb27SDimitry Andric "^SST1D_[SU]XTW_SCALED$")>; 134806c3fb27SDimitry Andric 134906c3fb27SDimitry Andric// Scatter store, 32-bit unscaled offset 135006c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt<8>], (instregex "^SST1[BH]_S_[SU]XTW$", 135106c3fb27SDimitry Andric "^SST1W_[SU]XTW$")>; 135206c3fb27SDimitry Andric 135306c3fb27SDimitry Andric// Scatter store, 64-bit scaled offset 135406c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt<8>], (instregex "^SST1[HW]_D_SCALED$", 135506c3fb27SDimitry Andric "^SST1D_SCALED$")>; 135606c3fb27SDimitry Andric 135706c3fb27SDimitry Andric// Scatter store, 64-bit unscaled offset 135806c3fb27SDimitry Andricdef : InstRW<[CortexA510VSt<8>], (instregex "^SST1[BHW]_D$", 135906c3fb27SDimitry Andric "^SST1D$")>; 136006c3fb27SDimitry Andric 136106c3fb27SDimitry Andric// SVE Miscellaneous instructions 136206c3fb27SDimitry Andric// ----------------------------------------------------------------------------- 136306c3fb27SDimitry Andric 136406c3fb27SDimitry Andric// Read first fault register, unpredicated 1365*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<1, CortexA510UnitALU>], (instrs RDFFR_P)>; 136606c3fb27SDimitry Andric 136706c3fb27SDimitry Andric// Read first fault register, predicated 1368*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitALU0>], (instrs RDFFR_PPz)>; 136906c3fb27SDimitry Andric 137006c3fb27SDimitry Andric// Read first fault register and set flags 137106c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitALU0>], (instrs RDFFRS_PPz)>; 137206c3fb27SDimitry Andric 137306c3fb27SDimitry Andric// Set first fault register 137406c3fb27SDimitry Andric// Write to first fault register 137506c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<1, CortexA510UnitALU>], (instrs SETFFR, WRFFR)>; 137606c3fb27SDimitry Andric 137706c3fb27SDimitry Andric// SVE Cryptographic instructions 137806c3fb27SDimitry Andric// ----------------------------------------------------------------------------- 137906c3fb27SDimitry Andric 138006c3fb27SDimitry Andric// Crypto AES ops 138106c3fb27SDimitry Andricdef : InstRW<[CortexA510Write<3, CortexA510UnitVALU>], (instregex "^AES[DE]_ZZZ_B$", 138206c3fb27SDimitry Andric "^AESI?MC_ZZ_B$")>; 138306c3fb27SDimitry Andric 138406c3fb27SDimitry Andric// Crypto SHA3 ops 1385*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510Write<4, CortexA510UnitVALU>], (instregex "^(BCAX|EOR3)_ZZZZ$", 138606c3fb27SDimitry Andric "^XAR_ZZZI_[BHSD]$")>; 138706c3fb27SDimitry Andric 1388*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510MC_RC0Write<9, CortexA510UnitVMC>], (instregex "^RAX1_ZZZ_D$")>; 138906c3fb27SDimitry Andric 139006c3fb27SDimitry Andric// Crypto SM4 ops 1391*0fca6ea1SDimitry Andricdef : InstRW<[CortexA510MC_RC0Write<9, CortexA510UnitVMC>], (instregex "^SM4E(KEY)?_ZZZ_S$")>; 139206c3fb27SDimitry Andric 139306c3fb27SDimitry Andric} 1394