Index: lib/Target/SystemZ/SystemZSchedule.td =================================================================== --- lib/Target/SystemZ/SystemZSchedule.td +++ lib/Target/SystemZ/SystemZSchedule.td @@ -8,72 +8,107 @@ //===----------------------------------------------------------------------===// // Scheduler resources -// Resources ending with a '2' use that resource for 2 cycles. An instruction -// using two such resources use the mapped unit for 4 cycles, and 2 is added -// to the total number of uops of the sched class. -// These three resources are used to express decoder grouping rules. -// The number of decoder slots needed by an instructions is normally -// one. For a cracked instruction (BeginGroup && !EndGroup) it is -// two. Expanded instructions (BeginGroup && EndGroup) group alone. +// These resources are used to express decoder grouping rules. The number of +// decoder slots needed by an instructions is normally one, but there are +// exceptions. +def NormalGr : SchedWrite; +def Cracked : SchedWrite; def GroupAlone : SchedWrite; def BeginGroup : SchedWrite; def EndGroup : SchedWrite; -// Latencies, to make code a bit neater. If more than one resource is -// used for an instruction, the greatest latency (not the sum) will be -// output by Tablegen. Therefore, in such cases one of these resources -// is needed. -def Lat2 : SchedWrite; -def Lat3 : SchedWrite; -def Lat4 : SchedWrite; -def Lat5 : SchedWrite; -def Lat6 : SchedWrite; -def Lat7 : SchedWrite; -def Lat8 : SchedWrite; -def Lat9 : SchedWrite; -def Lat10 : SchedWrite; -def Lat11 : SchedWrite; -def Lat12 : SchedWrite; -def Lat15 : SchedWrite; -def Lat20 : SchedWrite; -def Lat30 : SchedWrite; +// A SchedWrite added to other SchedWrites to make LSU latency parameterizable. +def LSULatency : SchedWrite; -// Fixed-point +// Operand WriteLatencies. +def WLat1 : SchedWrite; +def WLat2 : SchedWrite; +def WLat3 : SchedWrite; +def WLat4 : SchedWrite; +def WLat5 : SchedWrite; +def WLat6 : SchedWrite; +def WLat7 : SchedWrite; +def WLat8 : SchedWrite; +def WLat9 : SchedWrite; +def WLat10 : SchedWrite; +def WLat11 : SchedWrite; +def WLat12 : SchedWrite; +def WLat15 : SchedWrite; +def WLat16 : SchedWrite; +def WLat20 : SchedWrite; +def WLat26 : SchedWrite; +def WLat30 : SchedWrite; + +def WLat1LSU : WriteSequence<[WLat1, LSULatency]>; +def WLat2LSU : WriteSequence<[WLat2, LSULatency]>; +def WLat3LSU : WriteSequence<[WLat3, LSULatency]>; +def WLat4LSU : WriteSequence<[WLat4, LSULatency]>; +def WLat6LSU : WriteSequence<[WLat6, LSULatency]>; +def WLat5LSU : WriteSequence<[WLat5, LSULatency]>; +def WLat7LSU : WriteSequence<[WLat7, LSULatency]>; +def WLat8LSU : WriteSequence<[WLat8, LSULatency]>; +def WLat11LSU : WriteSequence<[WLat11, LSULatency]>; +def WLat16LSU : WriteSequence<[WLat16, LSULatency]>; + +// ReadAdvances, used for the register operand next to a memory operand, +// modelling that the register operand is needed later than the address +// operands. +def RegReadAdv : SchedRead; + +// Fixed-point units def FXa : SchedWrite; def FXa2 : SchedWrite; +def FXa3 : SchedWrite; +def FXa4 : SchedWrite; def FXb : SchedWrite; +def FXb2 : SchedWrite; +def FXb3 : SchedWrite; +def FXb4 : SchedWrite; +def FXb5 : SchedWrite; def FXU : SchedWrite; +def FXU2 : SchedWrite; +def FXU3 : SchedWrite; +def FXU4 : SchedWrite; +def FXU5 : SchedWrite; +def FXU6 : SchedWrite; // Load/store unit def LSU : SchedWrite; - -// Model a return without latency, otherwise if-converter will model -// extra cost and abort (currently there is an assert that checks that -// all instructions have at least one uop). -def LSU_lat1 : SchedWrite; +def LSU2 : SchedWrite; +def LSU3 : SchedWrite; +def LSU4 : SchedWrite; +def LSU5 : SchedWrite; // Floating point unit (zEC12 and earlier) def FPU : SchedWrite; def FPU2 : SchedWrite; +def FPU4 : SchedWrite; def DFU : SchedWrite; def DFU2 : SchedWrite; +def DFU4 : SchedWrite; // Vector sub units (z13 and later) def VecBF : SchedWrite; def VecBF2 : SchedWrite; +def VecBF4 : SchedWrite; def VecDF : SchedWrite; def VecDF2 : SchedWrite; +def VecDF4 : SchedWrite; def VecDFX : SchedWrite; def VecDFX2 : SchedWrite; +def VecDFX4 : SchedWrite; def VecFPd : SchedWrite; // Blocking BFP div/sqrt unit. def VecMul : SchedWrite; def VecStr : SchedWrite; def VecXsPm : SchedWrite; +def VecXsPm2 : SchedWrite; // Virtual branching unit -def VBU : SchedWrite; +def VBU : SchedWrite; +// Millicode +def MCD : SchedWrite; include "SystemZScheduleZ14.td" include "SystemZScheduleZ13.td" Index: lib/Target/SystemZ/SystemZScheduleZ13.td =================================================================== --- lib/Target/SystemZ/SystemZScheduleZ13.td +++ lib/Target/SystemZ/SystemZScheduleZ13.td @@ -18,7 +18,7 @@ let UnsupportedFeatures = Arch11UnsupportedFeatures.List; - let IssueWidth = 8; + let IssueWidth = 6; // Number of instructions decoded per cycle. let MicroOpBufferSize = 60; // Issue queues let LoadLatency = 1; // Optimistic load latency. @@ -29,37 +29,53 @@ } let SchedModel = Z13Model in { - // These definitions need the SchedModel value. They could be put in a // subtarget common include file, but it seems the include system in Tablegen // currently (2016) rejects multiple includes of same file. -def : WriteRes { - let NumMicroOps = 0; - let BeginGroup = 1; - let EndGroup = 1; + +// Decoder grouping rules +let NumMicroOps = 1 in { + def : WriteRes; + def : WriteRes { let BeginGroup = 1; } + def : WriteRes { let EndGroup = 1; } } -def : WriteRes { - let NumMicroOps = 0; +def : WriteRes { + let NumMicroOps = 2; let BeginGroup = 1; } -def : WriteRes { - let NumMicroOps = 0; +def : WriteRes { + let NumMicroOps = 3; + let BeginGroup = 1; let EndGroup = 1; } -def : WriteRes { let Latency = 2; let NumMicroOps = 0;} -def : WriteRes { let Latency = 3; let NumMicroOps = 0;} -def : WriteRes { let Latency = 4; let NumMicroOps = 0;} -def : WriteRes { let Latency = 5; let NumMicroOps = 0;} -def : WriteRes { let Latency = 6; let NumMicroOps = 0;} -def : WriteRes { let Latency = 7; let NumMicroOps = 0;} -def : WriteRes { let Latency = 8; let NumMicroOps = 0;} -def : WriteRes { let Latency = 9; let NumMicroOps = 0;} -def : WriteRes { let Latency = 10; let NumMicroOps = 0;} -def : WriteRes { let Latency = 11; let NumMicroOps = 0;} -def : WriteRes { let Latency = 12; let NumMicroOps = 0;} -def : WriteRes { let Latency = 15; let NumMicroOps = 0;} -def : WriteRes { let Latency = 20; let NumMicroOps = 0;} -def : WriteRes { let Latency = 30; let NumMicroOps = 0;} + +// Incoming latency removed from the register operand which is used together +// with a memory operand by the instruction. +def : ReadAdvance; + +// LoadLatency (above) is not used for instructions in this file. This is +// instead the role of LSULatency, which is the latency value added to the +// result of loads and instructions with folded memory operands. +def : WriteRes { let Latency = 4; let NumMicroOps = 0; } + +let NumMicroOps = 0 in { + def : WriteRes { let Latency = 1; } + def : WriteRes { let Latency = 2; } + def : WriteRes { let Latency = 3; } + def : WriteRes { let Latency = 4; } + def : WriteRes { let Latency = 5; } + def : WriteRes { let Latency = 6; } + def : WriteRes { let Latency = 7; } + def : WriteRes { let Latency = 8; } + def : WriteRes { let Latency = 9; } + def : WriteRes { let Latency = 10; } + def : WriteRes { let Latency = 11; } + def : WriteRes { let Latency = 12; } + def : WriteRes { let Latency = 15; } + def : WriteRes { let Latency = 16; } + def : WriteRes { let Latency = 20; } + def : WriteRes { let Latency = 30; } +} // Execution units. def Z13_FXaUnit : ProcResource<2>; @@ -68,24 +84,45 @@ def Z13_VecUnit : ProcResource<2>; def Z13_VecFPdUnit : ProcResource<2> { let BufferSize = 1; /* blocking */ } def Z13_VBUnit : ProcResource<2>; +def Z13_MCD : ProcResource<1>; // Subtarget specific definitions of scheduling resources. -def : WriteRes { let Latency = 1; } -def : WriteRes { let Latency = 2; } -def : WriteRes { let Latency = 1; } -def : WriteRes { let Latency = 4; } -def : WriteRes { let Latency = 8; } -def : WriteRes { let Latency = 9; } -def : WriteRes { let Latency = 8; } -def : WriteRes { let Latency = 9; } -def : WriteRes { let Latency = 1; } -def : WriteRes { let Latency = 2; } -def : WriteRes { let Latency = 30; - let ResourceCycles = [30]; } -def : WriteRes { let Latency = 5; } -def : WriteRes { let Latency = 4; } -def : WriteRes { let Latency = 3; } -def : WriteRes; // Virtual Branching Unit +let NumMicroOps = 0 in { + def : WriteRes; + def : WriteRes { let ResourceCycles = [2]; } + def : WriteRes { let ResourceCycles = [3]; } + def : WriteRes { let ResourceCycles = [4]; } + def : WriteRes; + def : WriteRes { let ResourceCycles = [2]; } + def : WriteRes { let ResourceCycles = [3]; } + def : WriteRes { let ResourceCycles = [4]; } + def : WriteRes { let ResourceCycles = [5]; } + def : WriteRes; + def : WriteRes { let ResourceCycles = [2]; } + def : WriteRes { let ResourceCycles = [3]; } + def : WriteRes { let ResourceCycles = [4]; } + def : WriteRes { let ResourceCycles = [5]; } + def : WriteRes; + def : WriteRes { let ResourceCycles = [2]; } + def : WriteRes { let ResourceCycles = [4]; } + def : WriteRes; + def : WriteRes { let ResourceCycles = [2]; } + def : WriteRes { let ResourceCycles = [4]; } + def : WriteRes; + def : WriteRes { let ResourceCycles = [2]; } + def : WriteRes { let ResourceCycles = [4]; } + def : WriteRes { let ResourceCycles = [30]; } + def : WriteRes; + def : WriteRes; + def : WriteRes; + def : WriteRes { let ResourceCycles = [2]; } + // Virtual Branching Unit + def : WriteRes; +} + +def : WriteRes { let NumMicroOps = 3; + let BeginGroup = 1; + let EndGroup = 1; } // -------------------------- INSTRUCTIONS ---------------------------------- // @@ -99,26 +136,27 @@ // Stack allocation //===----------------------------------------------------------------------===// -def : InstRW<[FXa], (instregex "ADJDYNALLOC$")>; // Pseudo -> LA / LAY +// Pseudo -> LA / LAY +def : InstRW<[WLat1, FXa, NormalGr], (instregex "ADJDYNALLOC$")>; //===----------------------------------------------------------------------===// // Branch instructions //===----------------------------------------------------------------------===// // Branch -def : InstRW<[VBU], (instregex "(Call)?BRC(L)?(Asm.*)?$")>; -def : InstRW<[VBU], (instregex "(Call)?J(G)?(Asm.*)?$")>; -def : InstRW<[FXb], (instregex "(Call)?BC(R)?(Asm.*)?$")>; -def : InstRW<[FXb], (instregex "(Call)?B(R)?(Asm.*)?$")>; -def : InstRW<[FXa, EndGroup], (instregex "BRCT(G)?$")>; -def : InstRW<[FXb, FXa, Lat2, GroupAlone], (instregex "BRCTH$")>; -def : InstRW<[FXb, FXa, Lat2, GroupAlone], (instregex "BCT(G)?(R)?$")>; -def : InstRW<[FXa, FXa, FXb, FXb, Lat4, GroupAlone], +def : InstRW<[WLat1, VBU, NormalGr], (instregex "(Call)?BRC(L)?(Asm.*)?$")>; +def : InstRW<[WLat1, VBU, NormalGr], (instregex "(Call)?J(G)?(Asm.*)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "(Call)?BC(R)?(Asm.*)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "(Call)?B(R)?(Asm.*)?$")>; +def : InstRW<[WLat1, FXa, EndGroup], (instregex "BRCT(G)?$")>; +def : InstRW<[WLat1, FXa, FXb, GroupAlone], (instregex "BRCTH$")>; +def : InstRW<[WLat1, FXa, FXb, GroupAlone], (instregex "BCT(G)?(R)?$")>; +def : InstRW<[WLat1, FXa2, FXb2, GroupAlone], (instregex "B(R)?X(H|L).*$")>; // Compare and branch -def : InstRW<[FXb], (instregex "C(L)?(G)?(I|R)J(Asm.*)?$")>; -def : InstRW<[FXb, FXb, Lat2, GroupAlone], +def : InstRW<[WLat1, FXb, NormalGr], (instregex "C(L)?(G)?(I|R)J(Asm.*)?$")>; +def : InstRW<[WLat1, FXb2, GroupAlone], (instregex "C(L)?(G)?(I|R)B(Call|Return|Asm.*)?$")>; //===----------------------------------------------------------------------===// @@ -126,574 +164,609 @@ //===----------------------------------------------------------------------===// // Trap -def : InstRW<[VBU], (instregex "(Cond)?Trap$")>; +def : InstRW<[WLat1, VBU, NormalGr], (instregex "(Cond)?Trap$")>; // Compare and trap -def : InstRW<[FXb], (instregex "C(G)?(I|R)T(Asm.*)?$")>; -def : InstRW<[FXb], (instregex "CL(G)?RT(Asm.*)?$")>; -def : InstRW<[FXb], (instregex "CL(F|G)IT(Asm.*)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "CL(G)?T(Asm.*)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "C(G)?(I|R)T(Asm.*)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "CL(G)?RT(Asm.*)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "CL(F|G)IT(Asm.*)?$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "CL(G)?T(Asm.*)?$")>; //===----------------------------------------------------------------------===// // Call and return instructions //===----------------------------------------------------------------------===// // Call -def : InstRW<[VBU, FXa, FXa, Lat3, GroupAlone], (instregex "(Call)?BRAS$")>; -def : InstRW<[FXa, FXa, FXb, Lat3, GroupAlone], (instregex "(Call)?BRASL$")>; -def : InstRW<[FXa, FXa, FXb, Lat3, GroupAlone], (instregex "(Call)?BAS(R)?$")>; -def : InstRW<[FXa, FXa, FXb, Lat3, GroupAlone], (instregex "TLS_(G|L)DCALL$")>; +def : InstRW<[WLat1, VBU, FXa2, GroupAlone], (instregex "(Call)?BRAS$")>; +def : InstRW<[WLat1, FXa2, FXb, GroupAlone], (instregex "(Call)?BRASL$")>; +def : InstRW<[WLat1, FXa2, FXb, GroupAlone], (instregex "(Call)?BAS(R)?$")>; +def : InstRW<[WLat1, FXa2, FXb, GroupAlone], (instregex "TLS_(G|L)DCALL$")>; // Return -def : InstRW<[FXb, EndGroup], (instregex "Return$")>; -def : InstRW<[FXb], (instregex "CondReturn$")>; +def : InstRW<[WLat1, FXb, EndGroup], (instregex "Return$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "CondReturn$")>; //===----------------------------------------------------------------------===// // Move instructions //===----------------------------------------------------------------------===// // Moves -def : InstRW<[FXb, LSU, Lat5], (instregex "MV(G|H)?HI$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "MVI(Y)?$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "MV(G|H)?HI$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "MVI(Y)?$")>; // Move character -def : InstRW<[FXb, LSU, LSU, LSU, Lat8, GroupAlone], (instregex "MVC$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MVCL(E|U)?$")>; +def : InstRW<[WLat1, FXb, LSU3, GroupAlone], (instregex "MVC$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "MVCL(E|U)?$")>; // Pseudo -> reg move -def : InstRW<[FXa], (instregex "COPY(_TO_REGCLASS)?$")>; -def : InstRW<[FXa], (instregex "EXTRACT_SUBREG$")>; -def : InstRW<[FXa], (instregex "INSERT_SUBREG$")>; -def : InstRW<[FXa], (instregex "REG_SEQUENCE$")>; -def : InstRW<[FXa], (instregex "SUBREG_TO_REG$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "COPY(_TO_REGCLASS)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "EXTRACT_SUBREG$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "INSERT_SUBREG$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "REG_SEQUENCE$")>; // Loads -def : InstRW<[LSU], (instregex "L(Y|FH|RL|Mux|CBB)?$")>; -def : InstRW<[LSU], (instregex "LG(RL)?$")>; -def : InstRW<[LSU], (instregex "L128$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "L(Y|FH|RL|Mux)?$")>; +def : InstRW<[LSULatency, LSULatency, LSU, NormalGr], (instregex "LCBB$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LG(RL)?$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "L128$")>; -def : InstRW<[FXa], (instregex "LLIH(F|H|L)$")>; -def : InstRW<[FXa], (instregex "LLIL(F|H|L)$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LLIH(F|H|L)$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LLIL(F|H|L)$")>; -def : InstRW<[FXa], (instregex "LG(F|H)I$")>; -def : InstRW<[FXa], (instregex "LHI(Mux)?$")>; -def : InstRW<[FXa], (instregex "LR(Mux)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LG(F|H)I$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LHI(Mux)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LR(Mux)?$")>; // Load and zero rightmost byte -def : InstRW<[LSU], (instregex "LZR(F|G)$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LZR(F|G)$")>; // Load and trap -def : InstRW<[FXb, LSU, Lat5], (instregex "L(FH|G)?AT$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "L(FH|G)?AT$")>; // Load and test -def : InstRW<[FXa, LSU, Lat5], (instregex "LT(G)?$")>; -def : InstRW<[FXa], (instregex "LT(G)?R$")>; +def : InstRW<[WLat1LSU, WLat1LSU, LSU, FXa, NormalGr], (instregex "LT(G)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LT(G)?R$")>; // Stores -def : InstRW<[FXb, LSU, Lat5], (instregex "STG(RL)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "ST128$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "ST(Y|FH|RL|Mux)?$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "STG(RL)?$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "ST128$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "ST(Y|FH|RL|Mux)?$")>; // String moves. -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MVST$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "MVST$")>; //===----------------------------------------------------------------------===// // Conditional move instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXa, Lat2], (instregex "LOCRMux$")>; -def : InstRW<[FXa, Lat2], (instregex "LOC(G|FH)?R(Asm.*)?$")>; -def : InstRW<[FXa, Lat2], (instregex "LOC(G|H)?HI(Mux|(Asm.*))?$")>; -def : InstRW<[FXa, LSU, Lat6], (instregex "LOC(G|FH|Mux)?(Asm.*)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "STOC(G|FH|Mux)?(Asm.*)?$")>; +def : InstRW<[WLat2, FXa, NormalGr], (instregex "LOCRMux$")>; +def : InstRW<[WLat2, FXa, NormalGr], (instregex "LOC(G|FH)?R(Asm.*)?$")>; +def : InstRW<[WLat2, FXa, NormalGr], (instregex "LOC(G|H)?HI(Mux|(Asm.*))?$")>; +def : InstRW<[WLat2LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "LOC(G|FH|Mux)?(Asm.*)?$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], + (instregex "STOC(G|FH|Mux)?(Asm.*)?$")>; //===----------------------------------------------------------------------===// // Sign extensions //===----------------------------------------------------------------------===// -def : InstRW<[FXa], (instregex "L(B|H|G)R$")>; -def : InstRW<[FXa], (instregex "LG(B|H|F)R$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "L(B|H|G)R$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LG(B|H|F)R$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "LTGF$")>; -def : InstRW<[FXa], (instregex "LTGFR$")>; +def : InstRW<[WLat1LSU, WLat1LSU, FXa, LSU, NormalGr], (instregex "LTGF$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LTGFR$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "LB(H|Mux)?$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "LH(Y)?$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "LH(H|Mux|RL)$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "LG(B|H|F)$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "LG(H|F)RL$")>; +def : InstRW<[WLat1LSU, FXa, LSU, NormalGr], (instregex "LB(H|Mux)?$")>; +def : InstRW<[WLat1LSU, FXa, LSU, NormalGr], (instregex "LH(Y)?$")>; +def : InstRW<[WLat1LSU, FXa, LSU, NormalGr], (instregex "LH(H|Mux|RL)$")>; +def : InstRW<[WLat1LSU, FXa, LSU, NormalGr], (instregex "LG(B|H|F)$")>; +def : InstRW<[WLat1LSU, FXa, LSU, NormalGr], (instregex "LG(H|F)RL$")>; //===----------------------------------------------------------------------===// // Zero extensions //===----------------------------------------------------------------------===// -def : InstRW<[FXa], (instregex "LLCR(Mux)?$")>; -def : InstRW<[FXa], (instregex "LLHR(Mux)?$")>; -def : InstRW<[FXa], (instregex "LLG(C|H|F|T)R$")>; -def : InstRW<[LSU], (instregex "LLC(Mux)?$")>; -def : InstRW<[LSU], (instregex "LLH(Mux)?$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "LL(C|H)H$")>; -def : InstRW<[LSU], (instregex "LLHRL$")>; -def : InstRW<[LSU], (instregex "LLG(C|H|F|T|HRL|FRL)$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LLCR(Mux)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LLHR(Mux)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LLG(C|H|F|T)R$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLC(Mux)?$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLH(Mux)?$")>; +def : InstRW<[WLat1LSU, FXa, LSU, NormalGr], (instregex "LL(C|H)H$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLHRL$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLG(C|H|F|T|HRL|FRL)$")>; // Load and zero rightmost byte -def : InstRW<[LSU], (instregex "LLZRGF$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLZRGF$")>; // Load and trap -def : InstRW<[FXb, LSU, Lat5], (instregex "LLG(F|T)?AT$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "LLG(F|T)?AT$")>; //===----------------------------------------------------------------------===// // Truncations //===----------------------------------------------------------------------===// -def : InstRW<[FXb, LSU, Lat5], (instregex "STC(H|Y|Mux)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "STH(H|Y|RL|Mux)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "STCM(H|Y)?$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "STC(H|Y|Mux)?$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "STH(H|Y|RL|Mux)?$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "STCM(H|Y)?$")>; //===----------------------------------------------------------------------===// // Multi-register moves //===----------------------------------------------------------------------===// // Load multiple (estimated average of 5 ops) -def : InstRW<[LSU, LSU, LSU, LSU, LSU, Lat10, GroupAlone], - (instregex "LM(H|Y|G)?$")>; +def : InstRW<[WLat10, WLat10, LSU5, GroupAlone], (instregex "LM(H|Y|G)?$")>; // Load multiple disjoint -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "LMD$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "LMD$")>; -// Store multiple (estimated average of ceil(5/2) FXb ops) -def : InstRW<[LSU, LSU, FXb, FXb, FXb, Lat10, - GroupAlone], (instregex "STM(G|H|Y)?$")>; +// Store multiple +def : InstRW<[WLat1, LSU2, FXb3, GroupAlone], (instregex "STM(G|H|Y)?$")>; //===----------------------------------------------------------------------===// // Byte swaps //===----------------------------------------------------------------------===// -def : InstRW<[FXa], (instregex "LRV(G)?R$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "LRV(G|H)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "STRV(G|H)?$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MVCIN$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LRV(G)?R$")>; +def : InstRW<[WLat1LSU, FXa, LSU, NormalGr], (instregex "LRV(G|H)?$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "STRV(G|H)?$")>; +def : InstRW<[WLat30, MCD], (instregex "MVCIN$")>; //===----------------------------------------------------------------------===// // Load address instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXa], (instregex "LA(Y|RL)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LA(Y|RL)?$")>; // Load the Global Offset Table address ( -> larl ) -def : InstRW<[FXa], (instregex "GOT$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "GOT$")>; //===----------------------------------------------------------------------===// // Absolute and Negation //===----------------------------------------------------------------------===// -def : InstRW<[FXa, Lat2], (instregex "LP(G)?R$")>; -def : InstRW<[FXa, FXa, Lat3, BeginGroup], (instregex "L(N|P)GFR$")>; -def : InstRW<[FXa, Lat2], (instregex "LN(R|GR)$")>; -def : InstRW<[FXa], (instregex "LC(R|GR)$")>; -def : InstRW<[FXa, FXa, Lat2, BeginGroup], (instregex "LCGFR$")>; +def : InstRW<[WLat2, WLat2, FXa, NormalGr], (instregex "LP(G)?R$")>; +def : InstRW<[WLat3, WLat3, FXa2, Cracked], (instregex "L(N|P)GFR$")>; +def : InstRW<[WLat2, WLat2, FXa, NormalGr], (instregex "LN(R|GR)$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LC(R|GR)$")>; +def : InstRW<[WLat2, WLat2, FXa2, Cracked], (instregex "LCGFR$")>; //===----------------------------------------------------------------------===// // Insertion //===----------------------------------------------------------------------===// -def : InstRW<[FXa, LSU, Lat5], (instregex "IC(Y)?$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "IC32(Y)?$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "ICM(H|Y)?$")>; -def : InstRW<[FXa], (instregex "II(F|H|L)Mux$")>; -def : InstRW<[FXa], (instregex "IIHF(64)?$")>; -def : InstRW<[FXa], (instregex "IIHH(64)?$")>; -def : InstRW<[FXa], (instregex "IIHL(64)?$")>; -def : InstRW<[FXa], (instregex "IILF(64)?$")>; -def : InstRW<[FXa], (instregex "IILH(64)?$")>; -def : InstRW<[FXa], (instregex "IILL(64)?$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXa, LSU, NormalGr], (instregex "IC(Y)?$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "IC32(Y)?$")>; +def : InstRW<[WLat1LSU, RegReadAdv, WLat1LSU, FXa, LSU, NormalGr], + (instregex "ICM(H|Y)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "II(F|H|L)Mux$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "IIHF(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "IIHH(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "IIHL(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "IILF(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "IILH(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "IILL(64)?$")>; //===----------------------------------------------------------------------===// // Addition //===----------------------------------------------------------------------===// -def : InstRW<[FXa, LSU, Lat5], (instregex "A(Y)?$")>; -def : InstRW<[FXa, LSU, Lat6], (instregex "AH(Y)?$")>; -def : InstRW<[FXa], (instregex "AIH$")>; -def : InstRW<[FXa], (instregex "AFI(Mux)?$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "AG$")>; -def : InstRW<[FXa], (instregex "AGFI$")>; -def : InstRW<[FXa], (instregex "AGHI(K)?$")>; -def : InstRW<[FXa], (instregex "AGR(K)?$")>; -def : InstRW<[FXa], (instregex "AHI(K)?$")>; -def : InstRW<[FXa], (instregex "AHIMux(K)?$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "AL(Y)?$")>; -def : InstRW<[FXa], (instregex "AL(FI|HSIK)$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "ALG(F)?$")>; -def : InstRW<[FXa], (instregex "ALGHSIK$")>; -def : InstRW<[FXa], (instregex "ALGF(I|R)$")>; -def : InstRW<[FXa], (instregex "ALGR(K)?$")>; -def : InstRW<[FXa], (instregex "ALR(K)?$")>; -def : InstRW<[FXa], (instregex "AR(K)?$")>; -def : InstRW<[FXa], (instregex "A(L)?HHHR$")>; -def : InstRW<[FXa, Lat2], (instregex "A(L)?HHLR$")>; -def : InstRW<[FXa], (instregex "ALSIH(N)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "A(L)?(G)?SI$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "A(Y)?$")>; +def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "AH(Y)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "AIH$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "AFI(Mux)?$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "AG$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "AGFI$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "AGHI(K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "AGR(K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "AHI(K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "AHIMux(K)?$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "AL(Y)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "AL(FI|HSIK)$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "ALG(F)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "ALGHSIK$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "ALGF(I|R)$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "ALGR(K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "ALR(K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "AR(K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "A(L)?HHHR$")>; +def : InstRW<[WLat2, WLat2, FXa, NormalGr], (instregex "A(L)?HHLR$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "ALSIH(N)?$")>; +def : InstRW<[WLat2LSU, FXb, LSU, NormalGr], (instregex "A(L)?(G)?SI$")>; // Logical addition with carry -def : InstRW<[FXa, LSU, Lat6, GroupAlone], (instregex "ALC(G)?$")>; -def : InstRW<[FXa, Lat2, GroupAlone], (instregex "ALC(G)?R$")>; +def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXa, LSU, GroupAlone], + (instregex "ALC(G)?$")>; +def : InstRW<[WLat2, WLat2, FXa, GroupAlone], (instregex "ALC(G)?R$")>; // Add with sign extension (32 -> 64) -def : InstRW<[FXa, LSU, Lat6], (instregex "AGF$")>; -def : InstRW<[FXa, Lat2], (instregex "AGFR$")>; +def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "AGF$")>; +def : InstRW<[WLat2, WLat2, FXa, NormalGr], (instregex "AGFR$")>; //===----------------------------------------------------------------------===// // Subtraction //===----------------------------------------------------------------------===// -def : InstRW<[FXa, LSU, Lat5], (instregex "S(G|Y)?$")>; -def : InstRW<[FXa, LSU, Lat6], (instregex "SH(Y)?$")>; -def : InstRW<[FXa], (instregex "SGR(K)?$")>; -def : InstRW<[FXa], (instregex "SLFI$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "SL(G|GF|Y)?$")>; -def : InstRW<[FXa], (instregex "SLGF(I|R)$")>; -def : InstRW<[FXa], (instregex "SLGR(K)?$")>; -def : InstRW<[FXa], (instregex "SLR(K)?$")>; -def : InstRW<[FXa], (instregex "SR(K)?$")>; -def : InstRW<[FXa], (instregex "S(L)?HHHR$")>; -def : InstRW<[FXa, Lat2], (instregex "S(L)?HHLR$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "S(G|Y)?$")>; +def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "SH(Y)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "SGR(K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "SLFI$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "SL(G|GF|Y)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "SLGF(I|R)$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "SLGR(K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "SLR(K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "SR(K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "S(L)?HHHR$")>; +def : InstRW<[WLat2, WLat2, FXa, NormalGr], (instregex "S(L)?HHLR$")>; // Subtraction with borrow -def : InstRW<[FXa, LSU, Lat6, GroupAlone], (instregex "SLB(G)?$")>; -def : InstRW<[FXa, Lat2, GroupAlone], (instregex "SLB(G)?R$")>; +def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXa, LSU, GroupAlone], + (instregex "SLB(G)?$")>; +def : InstRW<[WLat2, WLat2, FXa, GroupAlone], (instregex "SLB(G)?R$")>; // Subtraction with sign extension (32 -> 64) -def : InstRW<[FXa, LSU, Lat6], (instregex "SGF$")>; -def : InstRW<[FXa, Lat2], (instregex "SGFR$")>; +def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "SGF$")>; +def : InstRW<[WLat2, WLat2, FXa, NormalGr], (instregex "SGFR$")>; //===----------------------------------------------------------------------===// // AND //===----------------------------------------------------------------------===// -def : InstRW<[FXa, LSU, Lat5], (instregex "N(G|Y)?$")>; -def : InstRW<[FXa], (instregex "NGR(K)?$")>; -def : InstRW<[FXa], (instregex "NI(FMux|HMux|LMux)$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "NI(Y)?$")>; -def : InstRW<[FXa], (instregex "NIHF(64)?$")>; -def : InstRW<[FXa], (instregex "NIHH(64)?$")>; -def : InstRW<[FXa], (instregex "NIHL(64)?$")>; -def : InstRW<[FXa], (instregex "NILF(64)?$")>; -def : InstRW<[FXa], (instregex "NILH(64)?$")>; -def : InstRW<[FXa], (instregex "NILL(64)?$")>; -def : InstRW<[FXa], (instregex "NR(K)?$")>; -def : InstRW<[LSU, LSU, FXb, Lat9, BeginGroup], (instregex "NC$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "N(G|Y)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "NGR(K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "NI(FMux|HMux|LMux)$")>; +def : InstRW<[WLat2LSU, FXb, LSU, NormalGr], (instregex "NI(Y)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "NIHF(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "NIHH(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "NIHL(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "NILF(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "NILH(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "NILL(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "NR(K)?$")>; +def : InstRW<[WLat3LSU, LSU2, FXb, Cracked], (instregex "NC$")>; //===----------------------------------------------------------------------===// // OR //===----------------------------------------------------------------------===// -def : InstRW<[FXa, LSU, Lat5], (instregex "O(G|Y)?$")>; -def : InstRW<[FXa], (instregex "OGR(K)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "OI(Y)?$")>; -def : InstRW<[FXa], (instregex "OI(FMux|HMux|LMux)$")>; -def : InstRW<[FXa], (instregex "OIHF(64)?$")>; -def : InstRW<[FXa], (instregex "OIHH(64)?$")>; -def : InstRW<[FXa], (instregex "OIHL(64)?$")>; -def : InstRW<[FXa], (instregex "OILF(64)?$")>; -def : InstRW<[FXa], (instregex "OILH(64)?$")>; -def : InstRW<[FXa], (instregex "OILL(64)?$")>; -def : InstRW<[FXa], (instregex "OR(K)?$")>; -def : InstRW<[LSU, LSU, FXb, Lat9, BeginGroup], (instregex "OC$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "O(G|Y)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "OGR(K)?$")>; +def : InstRW<[WLat2LSU, FXb, LSU, NormalGr], (instregex "OI(Y)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "OI(FMux|HMux|LMux)$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "OIHF(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "OIHH(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "OIHL(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "OILF(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "OILH(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "OILL(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "OR(K)?$")>; +def : InstRW<[WLat3LSU, LSU2, FXb, Cracked], (instregex "OC$")>; //===----------------------------------------------------------------------===// // XOR //===----------------------------------------------------------------------===// -def : InstRW<[FXa, LSU, Lat5], (instregex "X(G|Y)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "XI(Y)?$")>; -def : InstRW<[FXa], (instregex "XIFMux$")>; -def : InstRW<[FXa], (instregex "XGR(K)?$")>; -def : InstRW<[FXa], (instregex "XIHF(64)?$")>; -def : InstRW<[FXa], (instregex "XILF(64)?$")>; -def : InstRW<[FXa], (instregex "XR(K)?$")>; -def : InstRW<[LSU, LSU, FXb, Lat9, BeginGroup], (instregex "XC$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "X(G|Y)?$")>; +def : InstRW<[WLat2LSU, FXb, LSU, NormalGr], (instregex "XI(Y)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "XIFMux$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "XGR(K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "XIHF(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "XILF(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "XR(K)?$")>; +def : InstRW<[WLat3LSU, LSU2, FXb, Cracked], (instregex "XC$")>; //===----------------------------------------------------------------------===// // Multiplication //===----------------------------------------------------------------------===// -def : InstRW<[FXa, LSU, Lat10], (instregex "MS(GF|Y)?$")>; -def : InstRW<[FXa, Lat6], (instregex "MS(R|FI)$")>; -def : InstRW<[FXa, LSU, Lat12], (instregex "MSG$")>; -def : InstRW<[FXa, Lat8], (instregex "MSGR$")>; -def : InstRW<[FXa, Lat6], (instregex "MSGF(I|R)$")>; -def : InstRW<[FXa2, LSU, Lat15, GroupAlone], (instregex "MLG$")>; -def : InstRW<[FXa2, Lat9, GroupAlone], (instregex "MLGR$")>; -def : InstRW<[FXa, Lat5], (instregex "MGHI$")>; -def : InstRW<[FXa, Lat5], (instregex "MHI$")>; -def : InstRW<[FXa, LSU, Lat9], (instregex "MH(Y)?$")>; -def : InstRW<[FXa2, Lat7, GroupAlone], (instregex "M(L)?R$")>; -def : InstRW<[FXa2, LSU, Lat7, GroupAlone], (instregex "M(FY|L)?$")>; +def : InstRW<[WLat6LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "MS(GF|Y)?$")>; +def : InstRW<[WLat6, FXa, NormalGr], (instregex "MS(R|FI)$")>; +def : InstRW<[WLat8LSU, RegReadAdv, FXa, LSU, NormalGr], (instregex "MSG$")>; +def : InstRW<[WLat8, FXa, NormalGr], (instregex "MSGR$")>; +def : InstRW<[WLat6, FXa, NormalGr], (instregex "MSGF(I|R)$")>; +def : InstRW<[WLat11LSU, RegReadAdv, FXa2, LSU, GroupAlone], + (instregex "MLG$")>; +def : InstRW<[WLat9, FXa2, GroupAlone], (instregex "MLGR$")>; +def : InstRW<[WLat5, FXa, NormalGr], (instregex "MGHI$")>; +def : InstRW<[WLat5, FXa, NormalGr], (instregex "MHI$")>; +def : InstRW<[WLat5LSU, RegReadAdv, FXa, LSU, NormalGr], (instregex "MH(Y)?$")>; +def : InstRW<[WLat7, FXa2, GroupAlone], (instregex "M(L)?R$")>; +def : InstRW<[WLat7LSU, RegReadAdv, FXa2, LSU, GroupAlone], + (instregex "M(FY|L)?$")>; //===----------------------------------------------------------------------===// // Division and remainder //===----------------------------------------------------------------------===// -def : InstRW<[FXa2, FXa2, Lat20, GroupAlone], (instregex "DR$")>; -def : InstRW<[FXa2, FXa2, LSU, Lat30, GroupAlone], (instregex "D$")>; -def : InstRW<[FXa2, Lat30, GroupAlone], (instregex "DSG(F)?R$")>; -def : InstRW<[LSU, FXa2, Lat30, GroupAlone], (instregex "DSG(F)?$")>; -def : InstRW<[FXa2, FXa2, Lat20, GroupAlone], (instregex "DLR$")>; -def : InstRW<[FXa2, FXa2, Lat30, GroupAlone], (instregex "DLGR$")>; -def : InstRW<[FXa2, FXa2, LSU, Lat30, GroupAlone], (instregex "DL(G)?$")>; +def : InstRW<[WLat20, FXa4, GroupAlone], (instregex "DR$")>; +def : InstRW<[WLat30, RegReadAdv, FXa4, LSU, GroupAlone], (instregex "D$")>; +def : InstRW<[WLat30, FXa2, GroupAlone], (instregex "DSG(F)?R$")>; +def : InstRW<[WLat30, RegReadAdv, FXa2, LSU, GroupAlone], + (instregex "DSG(F)?$")>; +def : InstRW<[WLat20, FXa4, GroupAlone], (instregex "DLR$")>; +def : InstRW<[WLat30, FXa4, GroupAlone], (instregex "DLGR$")>; +def : InstRW<[WLat30, RegReadAdv, FXa4, LSU, GroupAlone], (instregex "DL(G)?$")>; //===----------------------------------------------------------------------===// // Shifts //===----------------------------------------------------------------------===// -def : InstRW<[FXa], (instregex "SLL(G|K)?$")>; -def : InstRW<[FXa], (instregex "SRL(G|K)?$")>; -def : InstRW<[FXa], (instregex "SRA(G|K)?$")>; -def : InstRW<[FXa], (instregex "SLA(G|K)?$")>; -def : InstRW<[FXa, FXa, FXa, FXa, LSU, Lat8, GroupAlone], +def : InstRW<[WLat1, FXa, NormalGr], (instregex "SLL(G|K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "SRL(G|K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "SRA(G|K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "SLA(G|K)?$")>; +def : InstRW<[WLat5LSU, WLat5LSU, FXa4, LSU, GroupAlone], (instregex "S(L|R)D(A|L)$")>; // Rotate -def : InstRW<[FXa, LSU, Lat6], (instregex "RLL(G)?$")>; +def : InstRW<[WLat2LSU, FXa, LSU, NormalGr], (instregex "RLL(G)?$")>; // Rotate and insert -def : InstRW<[FXa], (instregex "RISBG(N|32)?$")>; -def : InstRW<[FXa], (instregex "RISBH(G|H|L)$")>; -def : InstRW<[FXa], (instregex "RISBL(G|H|L)$")>; -def : InstRW<[FXa], (instregex "RISBMux$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "RISBG(N|32)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "RISBH(G|H|L)$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "RISBL(G|H|L)$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "RISBMux$")>; // Rotate and Select -def : InstRW<[FXa, FXa, Lat3, BeginGroup], (instregex "R(N|O|X)SBG$")>; +def : InstRW<[WLat3, WLat3, FXa2, Cracked], (instregex "R(N|O|X)SBG$")>; //===----------------------------------------------------------------------===// // Comparison //===----------------------------------------------------------------------===// -def : InstRW<[FXb, LSU, Lat5], (instregex "C(G|Y|Mux|RL)?$")>; -def : InstRW<[FXb], (instregex "C(F|H)I(Mux)?$")>; -def : InstRW<[FXb], (instregex "CG(F|H)I$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "CG(HSI|RL)$")>; -def : InstRW<[FXb], (instregex "C(G)?R$")>; -def : InstRW<[FXb], (instregex "CIH$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "CH(F|SI)$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "CL(Y|Mux|FHSI)?$")>; -def : InstRW<[FXb], (instregex "CLFI(Mux)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "CLG(HRL|HSI)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "CLGF(RL)?$")>; -def : InstRW<[FXb], (instregex "CLGF(I|R)$")>; -def : InstRW<[FXb], (instregex "CLGR$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "CLGRL$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "CLH(F|RL|HSI)$")>; -def : InstRW<[FXb], (instregex "CLIH$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "CLI(Y)?$")>; -def : InstRW<[FXb], (instregex "CLR$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "CLRL$")>; -def : InstRW<[FXb], (instregex "C(L)?HHR$")>; -def : InstRW<[FXb, Lat2], (instregex "C(L)?HLR$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXb, LSU, NormalGr], + (instregex "C(G|Y|Mux)?$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "CRL$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "C(F|H)I(Mux)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "CG(F|H)I$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "CG(HSI|RL)$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "C(G)?R$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "CIH$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXb, LSU, NormalGr], (instregex "CHF$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "CHSI$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXb, LSU, NormalGr], + (instregex "CL(Y|Mux)?$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "CLFHSI$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "CLFI(Mux)?$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXb, LSU, NormalGr], (instregex "CLG$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "CLG(HRL|HSI)$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXb, LSU, NormalGr], (instregex "CLGF$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "CLGFRL$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "CLGF(I|R)$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "CLGR$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "CLGRL$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXb, LSU, NormalGr], (instregex "CLHF$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "CLH(RL|HSI)$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "CLIH$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "CLI(Y)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "CLR$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "CLRL$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "C(L)?HHR$")>; +def : InstRW<[WLat2, FXb, NormalGr], (instregex "C(L)?HLR$")>; // Compare halfword -def : InstRW<[FXb, LSU, Lat6], (instregex "CH(Y|RL)?$")>; -def : InstRW<[FXb, LSU, Lat6], (instregex "CGH(RL)?$")>; -def : InstRW<[FXa, FXb, LSU, Lat6, BeginGroup], (instregex "CHHSI$")>; +def : InstRW<[WLat2LSU, RegReadAdv, FXb, LSU, NormalGr], (instregex "CH(Y)?$")>; +def : InstRW<[WLat2LSU, FXb, LSU, NormalGr], (instregex "CHRL$")>; +def : InstRW<[WLat2LSU, RegReadAdv, FXb, LSU, NormalGr], (instregex "CGH$")>; +def : InstRW<[WLat2LSU, FXb, LSU, NormalGr], (instregex "CGHRL$")>; +def : InstRW<[WLat2LSU, FXa, FXb, LSU, Cracked], (instregex "CHHSI$")>; // Compare with sign extension (32 -> 64) -def : InstRW<[FXb, LSU, Lat6], (instregex "CGF(RL)?$")>; -def : InstRW<[FXb, Lat2], (instregex "CGFR$")>; +def : InstRW<[WLat2LSU, RegReadAdv, FXb, LSU, NormalGr], (instregex "CGF$")>; +def : InstRW<[WLat2LSU, FXb, LSU, NormalGr], (instregex "CGFRL$")>; +def : InstRW<[WLat2, FXb, NormalGr], (instregex "CGFR$")>; // Compare logical character -def : InstRW<[FXb, LSU, LSU, Lat9, BeginGroup], (instregex "CLC$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "CLCL(E|U)?$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "CLST$")>; +def : InstRW<[WLat6, FXb, LSU2, Cracked], (instregex "CLC$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CLCL(E|U)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CLST$")>; // Test under mask -def : InstRW<[FXb, LSU, Lat5], (instregex "TM(Y)?$")>; -def : InstRW<[FXb], (instregex "TM(H|L)Mux$")>; -def : InstRW<[FXb], (instregex "TMHH(64)?$")>; -def : InstRW<[FXb], (instregex "TMHL(64)?$")>; -def : InstRW<[FXb], (instregex "TMLH(64)?$")>; -def : InstRW<[FXb], (instregex "TMLL(64)?$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "TM(Y)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "TM(H|L)Mux$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "TMHH(64)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "TMHL(64)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "TMLH(64)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "TMLL(64)?$")>; // Compare logical characters under mask -def : InstRW<[FXb, LSU, Lat6], (instregex "CLM(H|Y)?$")>; +def : InstRW<[WLat2LSU, RegReadAdv, FXb, LSU, NormalGr], + (instregex "CLM(H|Y)?$")>; //===----------------------------------------------------------------------===// // Prefetch and execution hint //===----------------------------------------------------------------------===// -def : InstRW<[LSU], (instregex "PFD(RL)?$")>; -def : InstRW<[FXb, Lat2], (instregex "BPP$")>; +def : InstRW<[WLat1, LSU, NormalGr], (instregex "PFD(RL)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "BPP$")>; def : InstRW<[FXb, EndGroup], (instregex "BPRP$")>; -def : InstRW<[FXb], (instregex "NIAI$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "NIAI$")>; //===----------------------------------------------------------------------===// // Atomic operations //===----------------------------------------------------------------------===// -def : InstRW<[FXb, EndGroup], (instregex "Serialize$")>; +def : InstRW<[WLat1, FXb, EndGroup], (instregex "Serialize$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "LAA(G)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "LAAL(G)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "LAN(G)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "LAO(G)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "LAX(G)?$")>; +def : InstRW<[WLat2LSU, WLat2LSU, FXb, LSU, NormalGr], (instregex "LAA(G)?$")>; +def : InstRW<[WLat2LSU, WLat2LSU, FXb, LSU, NormalGr], (instregex "LAAL(G)?$")>; +def : InstRW<[WLat2LSU, WLat2LSU, FXb, LSU, NormalGr], (instregex "LAN(G)?$")>; +def : InstRW<[WLat2LSU, WLat2LSU, FXb, LSU, NormalGr], (instregex "LAO(G)?$")>; +def : InstRW<[WLat2LSU, WLat2LSU, FXb, LSU, NormalGr], (instregex "LAX(G)?$")>; // Test and set -def : InstRW<[FXb, LSU, Lat5, EndGroup], (instregex "TS$")>; +def : InstRW<[WLat2LSU, FXb, LSU, EndGroup], (instregex "TS$")>; // Compare and swap -def : InstRW<[FXa, FXb, LSU, Lat6, GroupAlone], (instregex "CS(G|Y)?$")>; +def : InstRW<[WLat3LSU, WLat3LSU, FXa, FXb, LSU, GroupAlone], + (instregex "CS(G|Y)?$")>; // Compare double and swap -def : InstRW<[FXa, FXa, FXb, FXb, FXa, LSU, Lat10, GroupAlone], +def : InstRW<[WLat6LSU, WLat6LSU, FXa3, FXb2, LSU, GroupAlone], (instregex "CDS(Y)?$")>; -def : InstRW<[FXa, FXa, FXb, FXb, LSU, FXb, FXb, LSU, LSU, Lat20, GroupAlone], +def : InstRW<[WLat15, WLat15, FXa2, FXb4, LSU3, GroupAlone], (instregex "CDSG$")>; // Compare and swap and store -def : InstRW<[FXa, LSU, Lat30], (instregex "CSST$")>; +def : InstRW<[WLat30, MCD], (instregex "CSST$")>; // Perform locked operation -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "PLO$")>; +def : InstRW<[WLat30, MCD], (instregex "PLO$")>; // Load/store pair from/to quadword -def : InstRW<[LSU, LSU, Lat5, GroupAlone], (instregex "LPQ$")>; -def : InstRW<[FXb, FXb, LSU, Lat6, GroupAlone], (instregex "STPQ$")>; +def : InstRW<[WLat4LSU, LSU2, GroupAlone], (instregex "LPQ$")>; +def : InstRW<[WLat1, FXb2, LSU, GroupAlone], (instregex "STPQ$")>; // Load pair disjoint -def : InstRW<[LSU, LSU, Lat5, GroupAlone], (instregex "LPD(G)?$")>; +def : InstRW<[WLat1LSU, WLat1LSU, LSU2, GroupAlone], (instregex "LPD(G)?$")>; //===----------------------------------------------------------------------===// // Translate and convert //===----------------------------------------------------------------------===// -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "TR$")>; -def : InstRW<[FXa, FXa, FXa, LSU, LSU, Lat30, GroupAlone], (instregex "TRT$")>; -def : InstRW<[FXa, LSU, Lat30], (instregex "TRTR$")>; -def : InstRW<[FXa, Lat30], (instregex "TRE$")>; -def : InstRW<[FXa, Lat30], (instregex "TRT(R)?E(Opt)?$")>; -def : InstRW<[LSU, Lat30], (instregex "TR(T|O)(T|O)(Opt)?$")>; -def : InstRW<[FXa, Lat30], (instregex "CU(12|14|21|24|41|42)(Opt)?$")>; -def : InstRW<[FXa, Lat30], (instregex "(CUUTF|CUTFU)(Opt)?$")>; +def : InstRW<[WLat1, LSU5, GroupAlone], (instregex "TR$")>; +def : InstRW<[WLat30, WLat30, WLat30, FXa3, LSU2, GroupAlone], + (instregex "TRT$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "TRTR$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "TRE$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "TRT(R)?E(Opt)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "TR(T|O)(T|O)(Opt)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], + (instregex "CU(12|14|21|24|41|42)(Opt)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "(CUUTF|CUTFU)(Opt)?$")>; //===----------------------------------------------------------------------===// // Message-security assist //===----------------------------------------------------------------------===// -def : InstRW<[FXa, Lat30], (instregex "KM(C|F|O|CTR)?$")>; -def : InstRW<[FXa, Lat30], (instregex "(KIMD|KLMD|KMAC|PCC|PPNO)$")>; +def : InstRW<[WLat30, WLat30, WLat30, WLat30, MCD], + (instregex "KM(C|F|O|CTR)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], + (instregex "(KIMD|KLMD|KMAC|PCC|PPNO)$")>; //===----------------------------------------------------------------------===// // Decimal arithmetic //===----------------------------------------------------------------------===// -def : InstRW<[FXb, VecDF, VecDF, LSU, LSU, Lat30, GroupAlone], +def : InstRW<[WLat30, RegReadAdv, FXb, VecDF2, LSU2, GroupAlone], (instregex "CVBG$")>; -def : InstRW<[FXb, VecDF, LSU, Lat30, GroupAlone], (instregex "CVB(Y)?$")>; -def : InstRW<[FXb, FXb, FXb, VecDF2, VecDF2, LSU, Lat30, GroupAlone], - (instregex "CVDG$")>; -def : InstRW<[FXb, VecDF, FXb, LSU, Lat30, GroupAlone], (instregex "CVD(Y)?$")>; -def : InstRW<[LSU, Lat10, GroupAlone], (instregex "MVO$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MV(N|Z)$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "(PACK|PKA|PKU)$")>; -def : InstRW<[LSU, Lat12, GroupAlone], (instregex "UNPK(A|U)$")>; -def : InstRW<[FXb, LSU, LSU, Lat9, BeginGroup], (instregex "UNPK$")>; - -def : InstRW<[FXb, VecDFX, LSU, LSU, LSU, Lat9, GroupAlone], +def : InstRW<[WLat30, RegReadAdv, FXb, VecDF, LSU, GroupAlone], + (instregex "CVB(Y)?$")>; +def : InstRW<[WLat1, FXb3, VecDF4, LSU, GroupAlone], (instregex "CVDG$")>; +def : InstRW<[WLat1, FXb2, VecDF, LSU, GroupAlone], (instregex "CVD(Y)?$")>; +def : InstRW<[WLat1, LSU5, GroupAlone], (instregex "MV(N|O|Z)$")>; +def : InstRW<[WLat1, LSU5, GroupAlone], (instregex "(PACK|PKA|PKU)$")>; +def : InstRW<[WLat12, LSU5, GroupAlone], (instregex "UNPK(A|U)$")>; +def : InstRW<[WLat1, FXb, LSU2, Cracked], (instregex "UNPK$")>; + +def : InstRW<[WLat5LSU, FXb, VecDFX, LSU3, GroupAlone], (instregex "(A|S|ZA)P$")>; -def : InstRW<[FXb, VecDFX2, VecDFX2, LSU, LSU, LSU, Lat30, GroupAlone], - (instregex "(M|D)P$")>; -def : InstRW<[FXb, VecDFX, VecDFX, LSU, LSU, Lat15, GroupAlone], - (instregex "SRP$")>; -def : InstRW<[VecDFX, LSU, LSU, Lat5, GroupAlone], (instregex "CP$")>; -def : InstRW<[VecDFX, LSU, Lat4, BeginGroup], (instregex "TP$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "ED(MK)?$")>; +def : InstRW<[WLat1, FXb, VecDFX4, LSU3, GroupAlone], (instregex "(M|D)P$")>; +def : InstRW<[WLat15, FXb, VecDFX2, LSU2, GroupAlone], (instregex "SRP$")>; +def : InstRW<[WLat8, VecDFX, LSU, LSU, GroupAlone], (instregex "CP$")>; +def : InstRW<[WLat3LSU, VecDFX, LSU, Cracked], (instregex "TP$")>; +def : InstRW<[WLat30, MCD], (instregex "ED(MK)?$")>; //===----------------------------------------------------------------------===// // Access registers //===----------------------------------------------------------------------===// // Extract/set/copy access register -def : InstRW<[LSU], (instregex "(EAR|SAR|CPYA)$")>; +def : InstRW<[WLat3, LSU, NormalGr], (instregex "(EAR|SAR|CPYA)$")>; // Load address extended -def : InstRW<[LSU, FXa, Lat5, BeginGroup], (instregex "LAE(Y)?$")>; +def : InstRW<[WLat5, LSU, FXa, Cracked], (instregex "LAE(Y)?$")>; // Load/store access multiple (not modeled precisely) -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "(L|ST)AM(Y)?$")>; +def : InstRW<[WLat20, WLat20, LSU5, GroupAlone], (instregex "LAM(Y)?$")>; +def : InstRW<[WLat1, LSU5, GroupAlone], (instregex "STAM(Y)?$")>; //===----------------------------------------------------------------------===// // Program mask and addressing mode //===----------------------------------------------------------------------===// // Insert Program Mask -def : InstRW<[FXa, Lat3, EndGroup], (instregex "IPM$")>; +def : InstRW<[WLat3, FXa, EndGroup], (instregex "IPM$")>; // Set Program Mask -def : InstRW<[LSU, EndGroup], (instregex "SPM$")>; +def : InstRW<[WLat3, LSU, EndGroup], (instregex "SPM$")>; // Branch and link -def : InstRW<[FXa, FXa, FXb, Lat5, GroupAlone], (instregex "BAL(R)?$")>; +def : InstRW<[WLat1, FXa2, FXb, GroupAlone], (instregex "BAL(R)?$")>; // Test addressing mode -def : InstRW<[FXb], (instregex "TAM$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "TAM$")>; // Set addressing mode -def : InstRW<[FXb, Lat2, EndGroup], (instregex "SAM(24|31|64)$")>; +def : InstRW<[WLat1, FXb, EndGroup], (instregex "SAM(24|31|64)$")>; // Branch (and save) and set mode. -def : InstRW<[FXa, FXb, Lat2, GroupAlone], (instregex "BSM$")>; -def : InstRW<[FXa, FXa, FXb, Lat3, GroupAlone], (instregex "BASSM$")>; +def : InstRW<[WLat1, FXa, FXb, GroupAlone], (instregex "BSM$")>; +def : InstRW<[WLat1, FXa2, FXb, GroupAlone], (instregex "BASSM$")>; //===----------------------------------------------------------------------===// // Transactional execution //===----------------------------------------------------------------------===// // Transaction begin -def : InstRW<[LSU, LSU, FXb, FXb, FXb, FXb, FXb, Lat15, GroupAlone], - (instregex "TBEGIN(C)?$")>; +def : InstRW<[WLat9, LSU2, FXb5, GroupAlone], (instregex "TBEGIN(C)?$")>; // Transaction end -def : InstRW<[FXb, GroupAlone], (instregex "TEND$")>; +def : InstRW<[WLat1, FXb, GroupAlone], (instregex "TEND$")>; // Transaction abort -def : InstRW<[LSU, GroupAlone], (instregex "TABORT$")>; +def : InstRW<[WLat30, MCD], (instregex "TABORT$")>; // Extract Transaction Nesting Depth -def : InstRW<[FXa], (instregex "ETND$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "ETND$")>; // Nontransactional store -def : InstRW<[FXb, LSU, Lat5], (instregex "NTSTG$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "NTSTG$")>; //===----------------------------------------------------------------------===// // Processor assist //===----------------------------------------------------------------------===// -def : InstRW<[FXb], (instregex "PPA$")>; +def : InstRW<[WLat30, MCD], (instregex "PPA$")>; //===----------------------------------------------------------------------===// // Miscellaneous Instructions. //===----------------------------------------------------------------------===// // Find leftmost one -def : InstRW<[FXa, FXa, Lat6, GroupAlone], (instregex "FLOGR$")>; +def : InstRW<[WLat7, WLat7, FXa2, GroupAlone], (instregex "FLOGR$")>; // Population count -def : InstRW<[FXa, Lat3], (instregex "POPCNT$")>; +def : InstRW<[WLat3, WLat3, FXa, NormalGr], (instregex "POPCNT$")>; // String instructions -def : InstRW<[FXa, LSU, Lat30], (instregex "SRST$")>; -def : InstRW<[FXa, Lat30], (instregex "SRSTU$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "CUSE$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "SRST(U)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CUSE$")>; // Various complex instructions -def : InstRW<[LSU, Lat30], (instregex "CFC$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "UPT$")>; -def : InstRW<[LSU, Lat30], (instregex "CKSM$")>; -def : InstRW<[FXa, Lat30], (instregex "CMPSC$")>; +def : InstRW<[WLat30, WLat30, WLat30, WLat30, MCD], (instregex "CFC$")>; +def : InstRW<[WLat30, WLat30, WLat30, WLat30, WLat30, WLat30, MCD], + (instregex "UPT$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CKSM$")>; +def : InstRW<[WLat30, WLat30, WLat30, WLat30, MCD], (instregex "CMPSC$")>; // Execute -def : InstRW<[FXb, GroupAlone], (instregex "EX(RL)?$")>; +def : InstRW<[WLat1, FXb, GroupAlone], (instregex "EX(RL)?$")>; //===----------------------------------------------------------------------===// // .insn directive instructions @@ -711,155 +784,154 @@ //===----------------------------------------------------------------------===// // Load zero -def : InstRW<[FXb], (instregex "LZ(DR|ER)$")>; -def : InstRW<[FXb, FXb, Lat2, BeginGroup], (instregex "LZXR$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "LZ(DR|ER)$")>; +def : InstRW<[WLat2, FXb2, Cracked], (instregex "LZXR$")>; // Load -def : InstRW<[VecXsPm], (instregex "LER$")>; -def : InstRW<[FXb], (instregex "LD(R|R32|GR)$")>; -def : InstRW<[FXb, Lat3], (instregex "LGDR$")>; -def : InstRW<[FXb, FXb, Lat2, GroupAlone], (instregex "LXR$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "LER$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "LD(R|R32|GR)$")>; +def : InstRW<[WLat3, FXb, NormalGr], (instregex "LGDR$")>; +def : InstRW<[WLat2, FXb2, GroupAlone], (instregex "LXR$")>; // Load and Test -def : InstRW<[VecXsPm, Lat4], (instregex "LT(D|E)BR$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "LTEBRCompare$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "LTDBRCompare$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "LTXBR$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "LTXBRCompare$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "LT(E|D)BR$")>; +def : InstRW<[WLat3, VecXsPm, NormalGr], (instregex "LT(E|D)BRCompare$")>; +def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], + (instregex "LTXBR(Compare)?$")>; // Copy sign -def : InstRW<[VecXsPm], (instregex "CPSDRd(d|s)$")>; -def : InstRW<[VecXsPm], (instregex "CPSDRs(d|s)$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "CPSDR(d|s)(d|s)$")>; //===----------------------------------------------------------------------===// // FP: Load instructions //===----------------------------------------------------------------------===// -def : InstRW<[VecXsPm, LSU, Lat7], (instregex "LE(Y)?$")>; -def : InstRW<[LSU], (instregex "LD(Y|E32)?$")>; -def : InstRW<[LSU], (instregex "LX$")>; +def : InstRW<[WLat2LSU, VecXsPm, LSU, NormalGr], (instregex "LE(Y)?$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LD(Y|E32)?$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LX$")>; //===----------------------------------------------------------------------===// // FP: Store instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb, LSU, Lat7], (instregex "STD(Y)?$")>; -def : InstRW<[FXb, LSU, Lat7], (instregex "STE(Y)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "STX$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "ST(E|D)(Y)?$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "STX$")>; //===----------------------------------------------------------------------===// // FP: Conversion instructions //===----------------------------------------------------------------------===// // Load rounded -def : InstRW<[VecBF], (instregex "LEDBR(A)?$")>; -def : InstRW<[VecDF, VecDF, Lat20], (instregex "LEXBR(A)?$")>; -def : InstRW<[VecDF, VecDF, Lat20], (instregex "LDXBR(A)?$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "LEDBR(A)?$")>; +def : InstRW<[WLat9, VecDF2, NormalGr], (instregex "L(E|D)XBR(A)?$")>; // Load lengthened -def : InstRW<[VecBF, LSU, Lat12], (instregex "LDEB$")>; -def : InstRW<[VecBF], (instregex "LDEBR$")>; -def : InstRW<[VecBF2, VecBF2, LSU, Lat12 , GroupAlone], (instregex "LX(D|E)B$")>; -def : InstRW<[VecBF2, VecBF2, GroupAlone], (instregex "LX(D|E)BR$")>; +def : InstRW<[WLat7LSU, VecBF, LSU, NormalGr], (instregex "LDEB$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "LDEBR$")>; +def : InstRW<[WLat8LSU, VecBF4, LSU, GroupAlone], (instregex "LX(E|D)B$")>; +def : InstRW<[WLat8, VecBF4, GroupAlone], (instregex "LX(E|D)BR$")>; // Convert from fixed / logical -def : InstRW<[FXb, VecBF, Lat9, BeginGroup], (instregex "CE(F|G)BR(A)?$")>; -def : InstRW<[FXb, VecBF, Lat9, BeginGroup], (instregex "CD(F|G)BR(A)?$")>; -def : InstRW<[FXb, VecDF2, VecDF2, Lat12, GroupAlone], (instregex "CX(F|G)BR(A)?$")>; -def : InstRW<[FXb, VecBF, Lat9, BeginGroup], (instregex "CEL(F|G)BR$")>; -def : InstRW<[FXb, VecBF, Lat9, BeginGroup], (instregex "CDL(F|G)BR$")>; -def : InstRW<[FXb, VecDF2, VecDF2, Lat12, GroupAlone], (instregex "CXL(F|G)BR$")>; +def : InstRW<[WLat8, FXb, VecBF, Cracked], (instregex "C(E|D)(F|G)BR(A)?$")>; +def : InstRW<[WLat11, FXb, VecDF4, GroupAlone], (instregex "CX(F|G)BR(A)?$")>; +def : InstRW<[WLat8, FXb, VecBF, Cracked], (instregex "C(E|D)L(F|G)BR$")>; +def : InstRW<[WLat11, FXb, VecDF4, GroupAlone], (instregex "CXL(F|G)BR$")>; // Convert to fixed / logical -def : InstRW<[FXb, VecBF, Lat11, BeginGroup], (instregex "CF(E|D)BR(A)?$")>; -def : InstRW<[FXb, VecBF, Lat11, BeginGroup], (instregex "CG(E|D)BR(A)?$")>; -def : InstRW<[FXb, VecDF, VecDF, Lat20, BeginGroup], (instregex "C(F|G)XBR(A)?$")>; -def : InstRW<[FXb, VecBF, Lat11, GroupAlone], (instregex "CLFEBR$")>; -def : InstRW<[FXb, VecBF, Lat11, BeginGroup], (instregex "CLFDBR$")>; -def : InstRW<[FXb, VecBF, Lat11, BeginGroup], (instregex "CLG(E|D)BR$")>; -def : InstRW<[FXb, VecDF, VecDF, Lat20, BeginGroup], (instregex "CL(F|G)XBR$")>; +def : InstRW<[WLat10, WLat10, FXb, VecBF, Cracked], + (instregex "C(F|G)(E|D)BR(A)?$")>; +def : InstRW<[WLat12, WLat12, FXb, VecDF2, Cracked], + (instregex "C(F|G)XBR(A)?$")>; +def : InstRW<[WLat10, WLat10, FXb, VecBF, GroupAlone], (instregex "CLFEBR$")>; +def : InstRW<[WLat10, WLat10, FXb, VecBF, Cracked], (instregex "CLFDBR$")>; +def : InstRW<[WLat10, WLat10, FXb, VecBF, Cracked], (instregex "CLG(E|D)BR$")>; +def : InstRW<[WLat12, WLat12, FXb, VecDF2, Cracked], (instregex "CL(F|G)XBR$")>; //===----------------------------------------------------------------------===// // FP: Unary arithmetic //===----------------------------------------------------------------------===// // Load Complement / Negative / Positive -def : InstRW<[VecXsPm, Lat4], (instregex "L(C|N|P)DBR$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "L(C|N|P)EBR$")>; -def : InstRW<[FXb], (instregex "LCDFR(_32)?$")>; -def : InstRW<[FXb], (instregex "LNDFR(_32)?$")>; -def : InstRW<[FXb], (instregex "LPDFR(_32)?$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "L(C|N|P)XBR$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "L(C|N|P)(E|D)BR$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "L(C|N|P)DFR(_32)?$")>; +def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "L(C|N|P)XBR$")>; // Square root -def : InstRW<[VecFPd, LSU], (instregex "SQ(E|D)B$")>; -def : InstRW<[VecFPd], (instregex "SQ(E|D)BR$")>; -def : InstRW<[VecFPd, VecFPd, GroupAlone], (instregex "SQXBR$")>; +def : InstRW<[WLat30, VecFPd, LSU, NormalGr], (instregex "SQ(E|D)B$")>; +def : InstRW<[WLat30, VecFPd, NormalGr], (instregex "SQ(E|D)BR$")>; +def : InstRW<[WLat30, VecFPd, GroupAlone], (instregex "SQXBR$")>; // Load FP integer -def : InstRW<[VecBF], (instregex "FIEBR(A)?$")>; -def : InstRW<[VecBF], (instregex "FIDBR(A)?$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "FIXBR(A)?$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "FI(E|D)BR(A)?$")>; +def : InstRW<[WLat10, VecDF4, GroupAlone], (instregex "FIXBR(A)?$")>; //===----------------------------------------------------------------------===// // FP: Binary arithmetic //===----------------------------------------------------------------------===// // Addition -def : InstRW<[VecBF, LSU, Lat12], (instregex "A(E|D)B$")>; -def : InstRW<[VecBF], (instregex "A(E|D)BR$")>; -def : InstRW<[VecDF2, VecDF2, Lat10, GroupAlone], (instregex "AXBR$")>; +def : InstRW<[WLat7LSU, WLat7LSU, RegReadAdv, VecBF, LSU, NormalGr], + (instregex "A(E|D)B$")>; +def : InstRW<[WLat7, WLat7, VecBF, NormalGr], (instregex "A(E|D)BR$")>; +def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "AXBR$")>; // Subtraction -def : InstRW<[VecBF, LSU, Lat12], (instregex "S(E|D)B$")>; -def : InstRW<[VecBF], (instregex "S(E|D)BR$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "SXBR$")>; +def : InstRW<[WLat7LSU, WLat7LSU, RegReadAdv, VecBF, LSU, NormalGr], + (instregex "S(E|D)B$")>; +def : InstRW<[WLat7, WLat7, VecBF, NormalGr], (instregex "S(E|D)BR$")>; +def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "SXBR$")>; // Multiply -def : InstRW<[VecBF, LSU, Lat12], (instregex "M(D|DE|EE)B$")>; -def : InstRW<[VecBF], (instregex "M(D|DE|EE)BR$")>; -def : InstRW<[VecBF2, VecBF2, LSU, Lat12, GroupAlone], (instregex "MXDB$")>; -def : InstRW<[VecBF2, VecBF2, GroupAlone], (instregex "MXDBR$")>; -def : InstRW<[VecDF2, VecDF2, Lat20, GroupAlone], (instregex "MXBR$")>; +def : InstRW<[WLat7LSU, RegReadAdv, VecBF, LSU, NormalGr], + (instregex "M(D|DE|EE)B$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "M(D|DE|EE)BR$")>; +def : InstRW<[WLat8LSU, RegReadAdv, VecBF4, LSU, GroupAlone], + (instregex "MXDB$")>; +def : InstRW<[WLat8, VecBF4, GroupAlone], (instregex "MXDBR$")>; +def : InstRW<[WLat20, VecDF4, GroupAlone], (instregex "MXBR$")>; // Multiply and add / subtract -def : InstRW<[VecBF2, LSU, Lat12, GroupAlone], (instregex "M(A|S)EB$")>; -def : InstRW<[VecBF, GroupAlone], (instregex "M(A|S)EBR$")>; -def : InstRW<[VecBF2, LSU, Lat12, GroupAlone], (instregex "M(A|S)DB$")>; -def : InstRW<[VecBF], (instregex "M(A|S)DBR$")>; +def : InstRW<[WLat7LSU, RegReadAdv, RegReadAdv, VecBF2, LSU, GroupAlone], + (instregex "M(A|S)EB$")>; +def : InstRW<[WLat7, VecBF, GroupAlone], (instregex "M(A|S)EBR$")>; +def : InstRW<[WLat7LSU, RegReadAdv, RegReadAdv, VecBF2, LSU, GroupAlone], + (instregex "M(A|S)DB$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "M(A|S)DBR$")>; // Division -def : InstRW<[VecFPd, LSU], (instregex "D(E|D)B$")>; -def : InstRW<[VecFPd], (instregex "D(E|D)BR$")>; -def : InstRW<[VecFPd, VecFPd, GroupAlone], (instregex "DXBR$")>; +def : InstRW<[WLat30, RegReadAdv, VecFPd, LSU, NormalGr], + (instregex "D(E|D)B$")>; +def : InstRW<[WLat30, VecFPd, NormalGr], (instregex "D(E|D)BR$")>; +def : InstRW<[WLat30, VecFPd, GroupAlone], (instregex "DXBR$")>; // Divide to integer -def : InstRW<[VecFPd, Lat30], (instregex "DI(E|D)BR$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "DI(E|D)BR$")>; //===----------------------------------------------------------------------===// // FP: Comparisons //===----------------------------------------------------------------------===// // Compare -def : InstRW<[VecXsPm, LSU, Lat8], (instregex "(K|C)(E|D)B$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "(K|C)(E|D)BR$")>; -def : InstRW<[VecDF, VecDF, Lat20, GroupAlone], (instregex "(K|C)XBR$")>; +def : InstRW<[WLat3LSU, RegReadAdv, VecXsPm, LSU, NormalGr], + (instregex "(K|C)(E|D)B$")>; +def : InstRW<[WLat3, VecXsPm, NormalGr], (instregex "(K|C)(E|D)BR$")>; +def : InstRW<[WLat9, VecDF2, GroupAlone], (instregex "(K|C)XBR$")>; // Test Data Class -def : InstRW<[LSU, VecXsPm, Lat9], (instregex "TC(E|D)B$")>; -def : InstRW<[LSU, VecDF2, VecDF2, Lat15, GroupAlone], (instregex "TCXB$")>; +def : InstRW<[WLat5, LSU, VecXsPm, NormalGr], (instregex "TC(E|D)B$")>; +def : InstRW<[WLat10, LSU2, VecDF4, GroupAlone], (instregex "TCXB$")>; //===----------------------------------------------------------------------===// // FP: Floating-point control register instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXa, LSU, Lat4, GroupAlone], (instregex "EFPC$")>; -def : InstRW<[FXb, LSU, Lat5, GroupAlone], (instregex "STFPC$")>; -def : InstRW<[LSU, Lat3, GroupAlone], (instregex "SFPC$")>; -def : InstRW<[LSU, LSU, Lat6, GroupAlone], (instregex "LFPC$")>; -def : InstRW<[FXa, Lat30], (instregex "SFASR$")>; -def : InstRW<[FXa, LSU, Lat30], (instregex "LFAS$")>; -def : InstRW<[FXb, Lat3, GroupAlone], (instregex "SRNM(B|T)?$")>; +def : InstRW<[WLat4, FXa, LSU, GroupAlone], (instregex "EFPC$")>; +def : InstRW<[WLat1, FXb, LSU, GroupAlone], (instregex "STFPC$")>; +def : InstRW<[WLat3, LSU, GroupAlone], (instregex "SFPC$")>; +def : InstRW<[WLat3LSU, LSU2, GroupAlone], (instregex "LFPC$")>; +def : InstRW<[WLat30, MCD], (instregex "SFASR$")>; +def : InstRW<[WLat30, MCD], (instregex "LFAS$")>; +def : InstRW<[WLat3, FXb, GroupAlone], (instregex "SRNM(B|T)?$")>; // --------------------- Hexadecimal floating point ------------------------- // @@ -869,108 +941,113 @@ //===----------------------------------------------------------------------===// // Load and Test -def : InstRW<[VecXsPm, Lat4], (instregex "LT(D|E)R$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "LTXR$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "LT(E|D)R$")>; +def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "LTXR$")>; //===----------------------------------------------------------------------===// // HFP: Conversion instructions //===----------------------------------------------------------------------===// // Load rounded -def : InstRW<[VecBF], (instregex "(LEDR|LRER)$")>; -def : InstRW<[VecBF], (instregex "LEXR$")>; -def : InstRW<[VecDF2], (instregex "(LDXR|LRDR)$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "(LEDR|LRER)$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "LEXR$")>; +def : InstRW<[WLat9, VecDF2, NormalGr], (instregex "(LDXR|LRDR)$")>; // Load lengthened -def : InstRW<[LSU], (instregex "LDE$")>; -def : InstRW<[FXb], (instregex "LDER$")>; -def : InstRW<[VecBF2, VecBF2, LSU, Lat12, GroupAlone], (instregex "LX(D|E)$")>; -def : InstRW<[VecBF2, VecBF2, GroupAlone], (instregex "LX(D|E)R$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LDE$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "LDER$")>; +def : InstRW<[WLat8LSU, VecBF4, LSU, GroupAlone], (instregex "LX(E|D)$")>; +def : InstRW<[WLat8, VecBF4, GroupAlone], (instregex "LX(E|D)R$")>; // Convert from fixed -def : InstRW<[FXb, VecBF, Lat9, BeginGroup], (instregex "CE(F|G)R$")>; -def : InstRW<[FXb, VecBF, Lat9, BeginGroup], (instregex "CD(F|G)R$")>; -def : InstRW<[FXb, VecDF2, VecDF2, Lat12, GroupAlone], (instregex "CX(F|G)R$")>; +def : InstRW<[WLat8, FXb, VecBF, Cracked], (instregex "C(E|D)(F|G)R$")>; +def : InstRW<[WLat11, FXb, VecDF4, GroupAlone], (instregex "CX(F|G)R$")>; // Convert to fixed -def : InstRW<[FXb, VecBF, Lat11, BeginGroup], (instregex "CF(E|D)R$")>; -def : InstRW<[FXb, VecBF, Lat11, BeginGroup], (instregex "CG(E|D)R$")>; -def : InstRW<[FXb, VecDF, VecDF, Lat20, BeginGroup], (instregex "C(F|G)XR$")>; +def : InstRW<[WLat10, WLat10, FXb, VecBF, Cracked], (instregex "C(F|G)(E|D)R$")>; +def : InstRW<[WLat12, WLat12, FXb, VecDF2, Cracked], (instregex "C(F|G)XR$")>; // Convert BFP to HFP / HFP to BFP. -def : InstRW<[VecBF], (instregex "THD(E)?R$")>; -def : InstRW<[VecBF], (instregex "TB(E)?DR$")>; +def : InstRW<[WLat7, WLat7, VecBF, NormalGr], (instregex "THD(E)?R$")>; +def : InstRW<[WLat7, WLat7, VecBF, NormalGr], (instregex "TB(E)?DR$")>; //===----------------------------------------------------------------------===// // HFP: Unary arithmetic //===----------------------------------------------------------------------===// // Load Complement / Negative / Positive -def : InstRW<[VecXsPm, Lat4], (instregex "L(C|N|P)DR$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "L(C|N|P)ER$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "L(C|N|P)XR$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "L(C|N|P)(E|D)R$")>; +def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "L(C|N|P)XR$")>; // Halve -def : InstRW<[VecBF], (instregex "H(E|D)R$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "H(E|D)R$")>; // Square root -def : InstRW<[VecFPd, LSU], (instregex "SQ(E|D)$")>; -def : InstRW<[VecFPd], (instregex "SQ(E|D)R$")>; -def : InstRW<[VecFPd, VecFPd, GroupAlone], (instregex "SQXR$")>; +def : InstRW<[WLat30, VecFPd, LSU, NormalGr], (instregex "SQ(E|D)$")>; +def : InstRW<[WLat30, VecFPd, NormalGr], (instregex "SQ(E|D)R$")>; +def : InstRW<[WLat30, VecFPd, GroupAlone], (instregex "SQXR$")>; // Load FP integer -def : InstRW<[VecBF], (instregex "FIER$")>; -def : InstRW<[VecBF], (instregex "FIDR$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "FIXR$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "FI(E|D)R$")>; +def : InstRW<[WLat10, VecDF4, GroupAlone], (instregex "FIXR$")>; //===----------------------------------------------------------------------===// // HFP: Binary arithmetic //===----------------------------------------------------------------------===// // Addition -def : InstRW<[VecBF, LSU, Lat12], (instregex "A(E|D|U|W)$")>; -def : InstRW<[VecBF], (instregex "A(E|D|U|W)R$")>; -def : InstRW<[VecDF2, VecDF2, Lat10, GroupAlone], (instregex "AXR$")>; +def : InstRW<[WLat7LSU, WLat7LSU, RegReadAdv, VecBF, LSU, NormalGr], + (instregex "A(E|D|U|W)$")>; +def : InstRW<[WLat7, WLat7, VecBF, NormalGr], (instregex "A(E|D|U|W)R$")>; +def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "AXR$")>; // Subtraction -def : InstRW<[VecBF, LSU, Lat12], (instregex "S(E|D|U|W)$")>; -def : InstRW<[VecBF], (instregex "S(E|D|U|W)R$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "SXR$")>; +def : InstRW<[WLat7LSU, WLat7LSU, RegReadAdv, VecBF, LSU, NormalGr], + (instregex "S(E|D|U|W)$")>; +def : InstRW<[WLat7, WLat7, VecBF, NormalGr], (instregex "S(E|D|U|W)R$")>; +def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "SXR$")>; // Multiply -def : InstRW<[VecBF, LSU, Lat12], (instregex "M(D|DE|E|EE)$")>; -def : InstRW<[VecBF], (instregex "M(D|DE|E|EE)R$")>; -def : InstRW<[VecBF2, VecBF2, LSU, Lat12, GroupAlone], (instregex "MXD$")>; -def : InstRW<[VecBF2, VecBF2, GroupAlone], (instregex "MXDR$")>; -def : InstRW<[VecDF2, VecDF2, Lat20, GroupAlone], (instregex "MXR$")>; -def : InstRW<[VecBF2, VecBF2, LSU, Lat12, GroupAlone], (instregex "MY$")>; -def : InstRW<[VecBF2, LSU, Lat12, GroupAlone], (instregex "MY(H|L)$")>; -def : InstRW<[VecBF2, VecBF2, GroupAlone], (instregex "MYR$")>; -def : InstRW<[VecBF, GroupAlone], (instregex "MY(H|L)R$")>; +def : InstRW<[WLat7LSU, RegReadAdv, VecBF, LSU, NormalGr], + (instregex "M(D|DE|E|EE)$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "M(D|DE|E|EE)R$")>; +def : InstRW<[WLat8LSU, RegReadAdv, VecBF4, LSU, GroupAlone], + (instregex "MXD$")>; +def : InstRW<[WLat8, VecBF4, GroupAlone], (instregex "MXDR$")>; +def : InstRW<[WLat30, VecDF4, GroupAlone], (instregex "MXR$")>; +def : InstRW<[WLat8LSU, RegReadAdv, VecBF4, LSU, GroupAlone], + (instregex "MY$")>; +def : InstRW<[WLat7LSU, RegReadAdv, VecBF2, LSU, GroupAlone], + (instregex "MY(H|L)$")>; +def : InstRW<[WLat8, VecBF4, GroupAlone], (instregex "MYR$")>; +def : InstRW<[WLat7, VecBF, GroupAlone], (instregex "MY(H|L)R$")>; // Multiply and add / subtract -def : InstRW<[VecBF2, LSU, Lat12, GroupAlone], (instregex "M(A|S)E$")>; -def : InstRW<[VecBF, GroupAlone], (instregex "M(A|S)ER$")>; -def : InstRW<[VecBF2, LSU, Lat12, GroupAlone], (instregex "M(A|S)D$")>; -def : InstRW<[VecBF, GroupAlone], (instregex "M(A|S)DR$")>; -def : InstRW<[VecBF2, LSU, Lat12, GroupAlone], (instregex "MAY(H|L)$")>; -def : InstRW<[VecBF2, VecBF2, LSU, Lat12, GroupAlone], (instregex "MAY$")>; -def : InstRW<[VecBF, GroupAlone], (instregex "MAY(H|L)R$")>; -def : InstRW<[VecBF2, VecBF2, GroupAlone], (instregex "MAYR$")>; +def : InstRW<[WLat7LSU, RegReadAdv, RegReadAdv, VecBF2, LSU, GroupAlone], + (instregex "M(A|S)(E|D)$")>; +def : InstRW<[WLat7, VecBF, GroupAlone], (instregex "M(A|S)(E|D)R$")>; +def : InstRW<[WLat8LSU, RegReadAdv, RegReadAdv, VecBF4, LSU, GroupAlone], + (instregex "MAY$")>; +def : InstRW<[WLat7LSU, RegReadAdv, RegReadAdv, VecBF2, LSU, GroupAlone], + (instregex "MAY(H|L)$")>; +def : InstRW<[WLat8, VecBF4, GroupAlone], (instregex "MAYR$")>; +def : InstRW<[WLat7, VecBF, GroupAlone], (instregex "MAY(H|L)R$")>; // Division -def : InstRW<[VecFPd, LSU], (instregex "D(E|D)$")>; -def : InstRW<[VecFPd], (instregex "D(E|D)R$")>; -def : InstRW<[VecFPd, VecFPd, GroupAlone], (instregex "DXR$")>; +def : InstRW<[WLat30, RegReadAdv, VecFPd, LSU, NormalGr], + (instregex "D(E|D)$")>; +def : InstRW<[WLat30, VecFPd, NormalGr], (instregex "D(E|D)R$")>; +def : InstRW<[WLat30, VecFPd, GroupAlone], (instregex "DXR$")>; //===----------------------------------------------------------------------===// // HFP: Comparisons //===----------------------------------------------------------------------===// // Compare -def : InstRW<[VecBF, LSU, Lat12], (instregex "C(E|D)$")>; -def : InstRW<[VecBF], (instregex "C(E|D)R$")>; -def : InstRW<[VecDF, VecDF, Lat20, GroupAlone], (instregex "CXR$")>; +def : InstRW<[WLat7LSU, RegReadAdv, VecBF, LSU, NormalGr], + (instregex "C(E|D)$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "C(E|D)R$")>; +def : InstRW<[WLat10, VecDF2, GroupAlone], (instregex "CXR$")>; // ------------------------ Decimal floating point -------------------------- // @@ -980,121 +1057,123 @@ //===----------------------------------------------------------------------===// // Load and Test -def : InstRW<[VecDF], (instregex "LTDTR$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "LTXTR$")>; +def : InstRW<[WLat8, WLat8, VecDF, NormalGr], (instregex "LTDTR$")>; +def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "LTXTR$")>; //===----------------------------------------------------------------------===// // DFP: Conversion instructions //===----------------------------------------------------------------------===// // Load rounded -def : InstRW<[VecDF, Lat15], (instregex "LEDTR$")>; -def : InstRW<[VecDF, VecDF, Lat20], (instregex "LDXTR$")>; +def : InstRW<[WLat15, VecDF, NormalGr], (instregex "LEDTR$")>; +def : InstRW<[WLat15, VecDF2, NormalGr], (instregex "LDXTR$")>; // Load lengthened -def : InstRW<[VecDF], (instregex "LDETR$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "LXDTR$")>; +def : InstRW<[WLat8, VecDF, NormalGr], (instregex "LDETR$")>; +def : InstRW<[WLat10, VecDF4, GroupAlone], (instregex "LXDTR$")>; // Convert from fixed / logical -def : InstRW<[FXb, VecDF, Lat30, BeginGroup], (instregex "CD(F|G)TR(A)?$")>; -def : InstRW<[FXb, VecDF2, VecDF2, Lat30, GroupAlone], (instregex "CX(F|G)TR(A)?$")>; -def : InstRW<[FXb, VecDF, Lat30, BeginGroup], (instregex "CDL(F|G)TR$")>; -def : InstRW<[FXb, VecDF2, VecDF2, Lat30, GroupAlone], (instregex "CXL(F|G)TR$")>; +def : InstRW<[WLat30, FXb, VecDF, Cracked], (instregex "CD(F|G)TR(A)?$")>; +def : InstRW<[WLat30, FXb, VecDF4, GroupAlone], (instregex "CX(F|G)TR(A)?$")>; +def : InstRW<[WLat30, FXb, VecDF, Cracked], (instregex "CDL(F|G)TR$")>; +def : InstRW<[WLat30, FXb, VecDF4, GroupAlone], (instregex "CXL(F|G)TR$")>; // Convert to fixed / logical -def : InstRW<[FXb, VecDF, Lat30, BeginGroup], (instregex "C(F|G)DTR(A)?$")>; -def : InstRW<[FXb, VecDF, VecDF, Lat30, BeginGroup], (instregex "C(F|G)XTR(A)?$")>; -def : InstRW<[FXb, VecDF, Lat30, BeginGroup], (instregex "CL(F|G)DTR$")>; -def : InstRW<[FXb, VecDF, VecDF, Lat30, BeginGroup], (instregex "CL(F|G)XTR$")>; +def : InstRW<[WLat30, WLat30, FXb, VecDF, Cracked], + (instregex "C(F|G)DTR(A)?$")>; +def : InstRW<[WLat30, WLat30, FXb, VecDF2, Cracked], + (instregex "C(F|G)XTR(A)?$")>; +def : InstRW<[WLat30, WLat30, FXb, VecDF, Cracked], (instregex "CL(F|G)DTR$")>; +def : InstRW<[WLat30, WLat30, FXb, VecDF2, Cracked], (instregex "CL(F|G)XTR$")>; // Convert from / to signed / unsigned packed -def : InstRW<[FXb, VecDF, Lat9, BeginGroup], (instregex "CD(S|U)TR$")>; -def : InstRW<[FXb, FXb, VecDF2, VecDF2, Lat15, GroupAlone], (instregex "CX(S|U)TR$")>; -def : InstRW<[FXb, VecDF, Lat12, BeginGroup], (instregex "C(S|U)DTR$")>; -def : InstRW<[FXb, FXb, VecDF2, VecDF2, Lat15, GroupAlone], (instregex "C(S|U)XTR$")>; +def : InstRW<[WLat9, FXb, VecDF, Cracked], (instregex "CD(S|U)TR$")>; +def : InstRW<[WLat12, FXb2, VecDF4, GroupAlone], (instregex "CX(S|U)TR$")>; +def : InstRW<[WLat11, FXb, VecDF, Cracked], (instregex "C(S|U)DTR$")>; +def : InstRW<[WLat15, FXb2, VecDF4, GroupAlone], (instregex "C(S|U)XTR$")>; // Convert from / to zoned -def : InstRW<[LSU, VecDF, Lat11, BeginGroup], (instregex "CDZT$")>; -def : InstRW<[LSU, LSU, VecDF2, VecDF2, Lat15, GroupAlone], (instregex "CXZT$")>; -def : InstRW<[FXb, LSU, VecDF, Lat11, BeginGroup], (instregex "CZDT$")>; -def : InstRW<[FXb, LSU, VecDF, VecDF, Lat15, GroupAlone], (instregex "CZXT$")>; +def : InstRW<[WLat8LSU, LSU, VecDF, Cracked], (instregex "CDZT$")>; +def : InstRW<[WLat16LSU, LSU2, VecDF4, GroupAlone], (instregex "CXZT$")>; +def : InstRW<[WLat1, FXb, LSU, VecDF, Cracked], (instregex "CZDT$")>; +def : InstRW<[WLat1, FXb, LSU, VecDF2, GroupAlone], (instregex "CZXT$")>; // Convert from / to packed -def : InstRW<[LSU, VecDF, Lat11, BeginGroup], (instregex "CDPT$")>; -def : InstRW<[LSU, LSU, VecDF2, VecDF2, Lat15, GroupAlone], (instregex "CXPT$")>; -def : InstRW<[FXb, LSU, VecDF, Lat11, BeginGroup], (instregex "CPDT$")>; -def : InstRW<[FXb, LSU, VecDF, VecDF, Lat15, GroupAlone], (instregex "CPXT$")>; +def : InstRW<[WLat8LSU, LSU, VecDF, Cracked], (instregex "CDPT$")>; +def : InstRW<[WLat16LSU, LSU2, VecDF4, GroupAlone], (instregex "CXPT$")>; +def : InstRW<[WLat1, FXb, LSU, VecDF, Cracked], (instregex "CPDT$")>; +def : InstRW<[WLat1, FXb, LSU, VecDF2, GroupAlone], (instregex "CPXT$")>; // Perform floating-point operation -def : InstRW<[FXb, Lat30], (instregex "PFPO$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "PFPO$")>; //===----------------------------------------------------------------------===// // DFP: Unary arithmetic //===----------------------------------------------------------------------===// // Load FP integer -def : InstRW<[VecDF], (instregex "FIDTR$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "FIXTR$")>; +def : InstRW<[WLat8, VecDF, NormalGr], (instregex "FIDTR$")>; +def : InstRW<[WLat10, VecDF4, GroupAlone], (instregex "FIXTR$")>; // Extract biased exponent -def : InstRW<[FXb, VecDF, Lat12, BeginGroup], (instregex "EEDTR$")>; -def : InstRW<[FXb, VecDF, Lat12, BeginGroup], (instregex "EEXTR$")>; +def : InstRW<[WLat11, FXb, VecDF, Cracked], (instregex "EEDTR$")>; +def : InstRW<[WLat11, FXb, VecDF, Cracked], (instregex "EEXTR$")>; // Extract significance -def : InstRW<[FXb, VecDF, Lat12, BeginGroup], (instregex "ESDTR$")>; -def : InstRW<[FXb, VecDF, VecDF, Lat15, BeginGroup], (instregex "ESXTR$")>; +def : InstRW<[WLat11, FXb, VecDF, Cracked], (instregex "ESDTR$")>; +def : InstRW<[WLat12, FXb, VecDF2, Cracked], (instregex "ESXTR$")>; //===----------------------------------------------------------------------===// // DFP: Binary arithmetic //===----------------------------------------------------------------------===// // Addition -def : InstRW<[VecDF], (instregex "ADTR(A)?$")>; -def : InstRW<[VecDF2, VecDF2, Lat10, GroupAlone], (instregex "AXTR(A)?$")>; +def : InstRW<[WLat8, WLat8, VecDF, NormalGr], (instregex "ADTR(A)?$")>; +def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "AXTR(A)?$")>; // Subtraction -def : InstRW<[VecDF], (instregex "SDTR(A)?$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "SXTR(A)?$")>; +def : InstRW<[WLat8, WLat8, VecDF, NormalGr], (instregex "SDTR(A)?$")>; +def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "SXTR(A)?$")>; // Multiply -def : InstRW<[VecDF, Lat30], (instregex "MDTR(A)?$")>; -def : InstRW<[VecDF2, VecDF2, Lat30, GroupAlone], (instregex "MXTR(A)?$")>; +def : InstRW<[WLat30, VecDF, NormalGr], (instregex "MDTR(A)?$")>; +def : InstRW<[WLat30, VecDF4, GroupAlone], (instregex "MXTR(A)?$")>; // Division -def : InstRW<[VecDF, Lat30], (instregex "DDTR(A)?$")>; -def : InstRW<[VecDF2, VecDF2, Lat30, GroupAlone], (instregex "DXTR(A)?$")>; +def : InstRW<[WLat30, VecDF, NormalGr], (instregex "DDTR(A)?$")>; +def : InstRW<[WLat30, VecDF4, GroupAlone], (instregex "DXTR(A)?$")>; // Quantize -def : InstRW<[VecDF], (instregex "QADTR$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "QAXTR$")>; +def : InstRW<[WLat8, WLat8, VecDF, NormalGr], (instregex "QADTR$")>; +def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "QAXTR$")>; // Reround -def : InstRW<[FXb, VecDF, Lat11, BeginGroup], (instregex "RRDTR$")>; -def : InstRW<[FXb, VecDF2, VecDF2, Lat15, GroupAlone], (instregex "RRXTR$")>; +def : InstRW<[WLat9, WLat9, FXb, VecDF, Cracked], (instregex "RRDTR$")>; +def : InstRW<[WLat11, WLat11, FXb, VecDF4, GroupAlone], (instregex "RRXTR$")>; // Shift significand left/right -def : InstRW<[LSU, VecDF, Lat11, GroupAlone], (instregex "S(L|R)DT$")>; -def : InstRW<[LSU, VecDF2, VecDF2, Lat15, GroupAlone], (instregex "S(L|R)XT$")>; +def : InstRW<[WLat11LSU, LSU, VecDF, GroupAlone], (instregex "S(L|R)DT$")>; +def : InstRW<[WLat11LSU, LSU, VecDF4, GroupAlone], (instregex "S(L|R)XT$")>; // Insert biased exponent -def : InstRW<[FXb, VecDF, Lat11, BeginGroup], (instregex "IEDTR$")>; -def : InstRW<[FXb, VecDF2, VecDF2, Lat15, GroupAlone], (instregex "IEXTR$")>; +def : InstRW<[WLat9, FXb, VecDF, Cracked], (instregex "IEDTR$")>; +def : InstRW<[WLat11, FXb, VecDF4, GroupAlone], (instregex "IEXTR$")>; //===----------------------------------------------------------------------===// // DFP: Comparisons //===----------------------------------------------------------------------===// // Compare -def : InstRW<[VecDF], (instregex "(K|C)DTR$")>; -def : InstRW<[VecDF, VecDF, Lat11, GroupAlone], (instregex "(K|C)XTR$")>; +def : InstRW<[WLat8, VecDF, NormalGr], (instregex "(K|C)DTR$")>; +def : InstRW<[WLat9, VecDF2, GroupAlone], (instregex "(K|C)XTR$")>; // Compare biased exponent -def : InstRW<[VecDF], (instregex "CEDTR$")>; -def : InstRW<[VecDF], (instregex "CEXTR$")>; +def : InstRW<[WLat8, VecDF, NormalGr], (instregex "CEDTR$")>; +def : InstRW<[WLat8, VecDF, NormalGr], (instregex "CEXTR$")>; // Test Data Class/Group -def : InstRW<[LSU, VecDF, Lat11], (instregex "TD(C|G)(E|D)T$")>; -def : InstRW<[LSU, VecDF, VecDF, Lat15, GroupAlone], (instregex "TD(C|G)XT$")>; +def : InstRW<[WLat15, LSU, VecDF, NormalGr], (instregex "TD(C|G)(E|D)T$")>; +def : InstRW<[WLat15, LSU, VecDF2, GroupAlone], (instregex "TD(C|G)XT$")>; // --------------------------------- Vector --------------------------------- // @@ -1103,234 +1182,236 @@ // Vector: Move instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb], (instregex "VLR(32|64)?$")>; -def : InstRW<[FXb, Lat4], (instregex "VLGV(B|F|G|H)?$")>; -def : InstRW<[FXb], (instregex "VLVG(B|F|G|H)?$")>; -def : InstRW<[FXb, Lat2], (instregex "VLVGP(32)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "VLR(32|64)?$")>; +def : InstRW<[WLat4, FXb, NormalGr], (instregex "VLGV(B|F|G|H)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "VLVG(B|F|G|H)?$")>; +def : InstRW<[WLat3, FXb, NormalGr], (instregex "VLVGP(32)?$")>; //===----------------------------------------------------------------------===// // Vector: Immediate instructions //===----------------------------------------------------------------------===// -def : InstRW<[VecXsPm], (instregex "VZERO$")>; -def : InstRW<[VecXsPm], (instregex "VONE$")>; -def : InstRW<[VecXsPm], (instregex "VGBM$")>; -def : InstRW<[VecXsPm], (instregex "VGM(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VREPI(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VLEI(B|F|G|H)$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VZERO$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VONE$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VGBM$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VGM(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VREPI(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VLEI(B|F|G|H)$")>; //===----------------------------------------------------------------------===// // Vector: Loads //===----------------------------------------------------------------------===// -def : InstRW<[LSU], (instregex "VL(L|BB)?$")>; -def : InstRW<[LSU], (instregex "VL(32|64)$")>; -def : InstRW<[LSU], (instregex "VLLEZ(B|F|G|H)?$")>; -def : InstRW<[LSU], (instregex "VLREP(B|F|G|H)?$")>; -def : InstRW<[VecXsPm, LSU, Lat7], (instregex "VLE(B|F|G|H)$")>; -def : InstRW<[FXb, LSU, VecXsPm, Lat11, BeginGroup], (instregex "VGE(F|G)$")>; -def : InstRW<[LSU, LSU, LSU, LSU, LSU, Lat10, GroupAlone], - (instregex "VLM$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "VL(BB)?$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "VLL$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "VL(32|64)$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "VLLEZ(B|F|G|H)?$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "VLREP(B|F|G|H)?$")>; +def : InstRW<[WLat2LSU, RegReadAdv, VecXsPm, LSU, NormalGr], + (instregex "VLE(B|F|G|H)$")>; +def : InstRW<[WLat6LSU, RegReadAdv, FXb, LSU, VecXsPm, Cracked], + (instregex "VGE(F|G)$")>; +def : InstRW<[WLat4LSU, WLat4LSU, LSU5, GroupAlone], (instregex "VLM$")>; //===----------------------------------------------------------------------===// // Vector: Stores //===----------------------------------------------------------------------===// -def : InstRW<[FXb, LSU, Lat8], (instregex "VST(L|32|64)?$")>; -def : InstRW<[FXb, LSU, Lat8], (instregex "VSTE(F|G)$")>; -def : InstRW<[FXb, LSU, VecXsPm, Lat11, BeginGroup], (instregex "VSTE(B|H)$")>; -def : InstRW<[LSU, LSU, FXb, FXb, FXb, FXb, FXb, Lat20, GroupAlone], - (instregex "VSTM$")>; -def : InstRW<[FXb, FXb, LSU, Lat12, BeginGroup], (instregex "VSCE(F|G)$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "VST(L|32|64)?$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "VSTE(F|G)$")>; +def : InstRW<[WLat1, FXb, LSU, VecXsPm, Cracked], (instregex "VSTE(B|H)$")>; +def : InstRW<[WLat1, LSU2, FXb3, GroupAlone], (instregex "VSTM$")>; +def : InstRW<[WLat1, FXb2, LSU, Cracked], (instregex "VSCE(F|G)$")>; //===----------------------------------------------------------------------===// // Vector: Selects and permutes //===----------------------------------------------------------------------===// -def : InstRW<[VecXsPm], (instregex "VMRH(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VMRL(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VPERM$")>; -def : InstRW<[VecXsPm], (instregex "VPDI$")>; -def : InstRW<[VecXsPm], (instregex "VREP(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VSEL$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VMRH(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VMRL(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VPERM$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VPDI$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VREP(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VSEL$")>; //===----------------------------------------------------------------------===// // Vector: Widening and narrowing //===----------------------------------------------------------------------===// -def : InstRW<[VecXsPm], (instregex "VPK(F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VPKS(F|G|H)?$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "VPKS(F|G|H)S$")>; -def : InstRW<[VecXsPm], (instregex "VPKLS(F|G|H)?$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "VPKLS(F|G|H)S$")>; -def : InstRW<[VecXsPm], (instregex "VSEG(B|F|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VUPH(B|F|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VUPL(B|F)?$")>; -def : InstRW<[VecXsPm], (instregex "VUPLH(B|F|H|W)?$")>; -def : InstRW<[VecXsPm], (instregex "VUPLL(B|F|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VPK(F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VPKS(F|G|H)?$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "VPKS(F|G|H)S$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VPKLS(F|G|H)?$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "VPKLS(F|G|H)S$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VSEG(B|F|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VUPH(B|F|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VUPL(B|F)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VUPLH(B|F|H|W)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VUPLL(B|F|H)?$")>; //===----------------------------------------------------------------------===// // Vector: Integer arithmetic //===----------------------------------------------------------------------===// -def : InstRW<[VecXsPm], (instregex "VA(B|F|G|H|Q|C|CQ)?$")>; -def : InstRW<[VecXsPm], (instregex "VACC(B|F|G|H|Q|C|CQ)?$")>; -def : InstRW<[VecXsPm], (instregex "VAVG(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VAVGL(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VN(C|O)?$")>; -def : InstRW<[VecXsPm], (instregex "VO$")>; -def : InstRW<[VecMul], (instregex "VCKSM$")>; -def : InstRW<[VecXsPm], (instregex "VCLZ(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VCTZ(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VX$")>; -def : InstRW<[VecMul], (instregex "VGFM?$")>; -def : InstRW<[VecMul], (instregex "VGFMA(B|F|G|H)?$")>; -def : InstRW<[VecMul], (instregex "VGFM(B|F|G|H)$")>; -def : InstRW<[VecXsPm], (instregex "VLC(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VLP(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VMX(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VMXL(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VMN(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VMNL(B|F|G|H)?$")>; -def : InstRW<[VecMul], (instregex "VMAL(B|F)?$")>; -def : InstRW<[VecMul], (instregex "VMALE(B|F|H)?$")>; -def : InstRW<[VecMul], (instregex "VMALH(B|F|H|W)?$")>; -def : InstRW<[VecMul], (instregex "VMALO(B|F|H)?$")>; -def : InstRW<[VecMul], (instregex "VMAO(B|F|H)?$")>; -def : InstRW<[VecMul], (instregex "VMAE(B|F|H)?$")>; -def : InstRW<[VecMul], (instregex "VMAH(B|F|H)?$")>; -def : InstRW<[VecMul], (instregex "VME(B|F|H)?$")>; -def : InstRW<[VecMul], (instregex "VMH(B|F|H)?$")>; -def : InstRW<[VecMul], (instregex "VML(B|F)?$")>; -def : InstRW<[VecMul], (instregex "VMLE(B|F|H)?$")>; -def : InstRW<[VecMul], (instregex "VMLH(B|F|H|W)?$")>; -def : InstRW<[VecMul], (instregex "VMLO(B|F|H)?$")>; -def : InstRW<[VecMul], (instregex "VMO(B|F|H)?$")>; - -def : InstRW<[VecXsPm], (instregex "VPOPCT$")>; - -def : InstRW<[VecXsPm], (instregex "VERLL(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VERLLV(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VERIM(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VESL(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VESLV(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VESRA(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VESRAV(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VESRL(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VESRLV(B|F|G|H)?$")>; - -def : InstRW<[VecXsPm], (instregex "VSL(DB)?$")>; -def : InstRW<[VecXsPm, VecXsPm, Lat8], (instregex "VSLB$")>; -def : InstRW<[VecXsPm], (instregex "VSR(A|L)$")>; -def : InstRW<[VecXsPm, VecXsPm, Lat8], (instregex "VSR(A|L)B$")>; - -def : InstRW<[VecXsPm], (instregex "VSB(I|IQ|CBI|CBIQ)?$")>; -def : InstRW<[VecXsPm], (instregex "VSCBI(B|F|G|H|Q)?$")>; -def : InstRW<[VecXsPm], (instregex "VS(F|G|H|Q)?$")>; - -def : InstRW<[VecMul], (instregex "VSUM(B|H)?$")>; -def : InstRW<[VecMul], (instregex "VSUMG(F|H)?$")>; -def : InstRW<[VecMul], (instregex "VSUMQ(F|G)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VA(B|F|G|H|Q|C|CQ)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VACC(B|F|G|H|Q|C|CQ)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VAVG(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VAVGL(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VN(C|O)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VO$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VCKSM$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VCLZ(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VCTZ(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VX$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VGFM?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VGFMA(B|F|G|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VGFM(B|F|G|H)$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VLC(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VLP(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VMX(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VMXL(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VMN(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VMNL(B|F|G|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VMAL(B|F)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VMALE(B|F|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VMALH(B|F|H|W)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VMALO(B|F|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VMAO(B|F|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VMAE(B|F|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VMAH(B|F|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VME(B|F|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VMH(B|F|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VML(B|F)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VMLE(B|F|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VMLH(B|F|H|W)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VMLO(B|F|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VMO(B|F|H)?$")>; + +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VPOPCT$")>; + +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VERLL(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VERLLV(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VERIM(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VESL(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VESLV(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VESRA(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VESRAV(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VESRL(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VESRLV(B|F|G|H)?$")>; + +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VSL(DB)?$")>; +def : InstRW<[WLat3, VecXsPm2, NormalGr], (instregex "VSLB$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VSR(A|L)$")>; +def : InstRW<[WLat3, VecXsPm2, NormalGr], (instregex "VSR(A|L)B$")>; + +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VSB(I|IQ|CBI|CBIQ)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VSCBI(B|F|G|H|Q)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VS(F|G|H|Q)?$")>; + +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VSUM(B|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VSUMG(F|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VSUMQ(F|G)?$")>; //===----------------------------------------------------------------------===// // Vector: Integer comparison //===----------------------------------------------------------------------===// -def : InstRW<[VecXsPm, Lat4], (instregex "VEC(B|F|G|H)?$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "VECL(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VCEQ(B|F|G|H)?$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "VCEQ(B|F|G|H)S$")>; -def : InstRW<[VecXsPm], (instregex "VCH(B|F|G|H)?$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "VCH(B|F|G|H)S$")>; -def : InstRW<[VecXsPm], (instregex "VCHL(B|F|G|H)?$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "VCHL(B|F|G|H)S$")>; -def : InstRW<[VecStr, Lat5], (instregex "VTM$")>; +def : InstRW<[WLat3, VecXsPm, NormalGr], (instregex "VEC(B|F|G|H)?$")>; +def : InstRW<[WLat3, VecXsPm, NormalGr], (instregex "VECL(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VCEQ(B|F|G|H)?$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "VCEQ(B|F|G|H)S$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VCH(B|F|G|H)?$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "VCH(B|F|G|H)S$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VCHL(B|F|G|H)?$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "VCHL(B|F|G|H)S$")>; +def : InstRW<[WLat4, VecStr, NormalGr], (instregex "VTM$")>; //===----------------------------------------------------------------------===// // Vector: Floating-point arithmetic //===----------------------------------------------------------------------===// // Conversion and rounding -def : InstRW<[VecBF2], (instregex "VCD(L)?G$")>; -def : InstRW<[VecBF2], (instregex "VCD(L)?GB$")>; -def : InstRW<[VecBF], (instregex "WCD(L)?GB$")>; -def : InstRW<[VecBF2], (instregex "VC(L)?GD$")>; -def : InstRW<[VecBF2], (instregex "VC(L)?GDB$")>; -def : InstRW<[VecBF], (instregex "WC(L)?GDB$")>; -def : InstRW<[VecBF2], (instregex "VL(DE|ED)$")>; -def : InstRW<[VecBF2], (instregex "VL(DE|ED)B$")>; -def : InstRW<[VecBF], (instregex "WL(DE|ED)B$")>; -def : InstRW<[VecBF2], (instregex "VFI$")>; -def : InstRW<[VecBF2], (instregex "VFIDB$")>; -def : InstRW<[VecBF], (instregex "WFIDB$")>; +def : InstRW<[WLat8, VecBF2, NormalGr], (instregex "VCD(L)?G$")>; +def : InstRW<[WLat8, VecBF2, NormalGr], (instregex "VCD(L)?GB$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "WCD(L)?GB$")>; +def : InstRW<[WLat8, VecBF2, NormalGr], (instregex "VC(L)?GD$")>; +def : InstRW<[WLat8, VecBF2, NormalGr], (instregex "VC(L)?GDB$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "WC(L)?GDB$")>; +def : InstRW<[WLat8, VecBF2, NormalGr], (instregex "VL(DE|ED)$")>; +def : InstRW<[WLat8, VecBF2, NormalGr], (instregex "VL(DE|ED)B$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "WL(DE|ED)B$")>; +def : InstRW<[WLat8, VecBF2, NormalGr], (instregex "VFI$")>; +def : InstRW<[WLat8, VecBF2, NormalGr], (instregex "VFIDB$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "WFIDB$")>; // Sign operations -def : InstRW<[VecXsPm], (instregex "VFPSO$")>; -def : InstRW<[VecXsPm], (instregex "(V|W)FPSODB$")>; -def : InstRW<[VecXsPm], (instregex "(V|W)FL(C|N|P)DB$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VFPSO$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "(V|W)FPSODB$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "(V|W)FL(C|N|P)DB$")>; // Test data class -def : InstRW<[VecXsPm, Lat4], (instregex "VFTCI$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "(V|W)FTCIDB$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "VFTCI$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "(V|W)FTCIDB$")>; // Add / subtract -def : InstRW<[VecBF2], (instregex "VF(A|S)$")>; -def : InstRW<[VecBF2], (instregex "VF(A|S)DB$")>; -def : InstRW<[VecBF], (instregex "WF(A|S)DB$")>; +def : InstRW<[WLat8, VecBF2, NormalGr], (instregex "VF(A|S)$")>; +def : InstRW<[WLat8, VecBF2, NormalGr], (instregex "VF(A|S)DB$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "WF(A|S)DB$")>; // Multiply / multiply-and-add/subtract -def : InstRW<[VecBF2], (instregex "VFM$")>; -def : InstRW<[VecBF2], (instregex "VFMDB$")>; -def : InstRW<[VecBF], (instregex "WFMDB$")>; -def : InstRW<[VecBF2], (instregex "VFM(A|S)$")>; -def : InstRW<[VecBF2], (instregex "VFM(A|S)DB$")>; -def : InstRW<[VecBF], (instregex "WFM(A|S)DB$")>; +def : InstRW<[WLat8, VecBF2, NormalGr], (instregex "VFM$")>; +def : InstRW<[WLat8, VecBF2, NormalGr], (instregex "VFMDB$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "WFMDB$")>; +def : InstRW<[WLat8, VecBF2, NormalGr], (instregex "VFM(A|S)$")>; +def : InstRW<[WLat8, VecBF2, NormalGr], (instregex "VFM(A|S)DB$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "WFM(A|S)DB$")>; // Divide / square root -def : InstRW<[VecFPd], (instregex "VFD$")>; -def : InstRW<[VecFPd], (instregex "(V|W)FDDB$")>; -def : InstRW<[VecFPd], (instregex "VFSQ$")>; -def : InstRW<[VecFPd], (instregex "(V|W)FSQDB$")>; +def : InstRW<[WLat30, VecFPd, NormalGr], (instregex "VFD$")>; +def : InstRW<[WLat30, VecFPd, NormalGr], (instregex "(V|W)FDDB$")>; +def : InstRW<[WLat30, VecFPd, NormalGr], (instregex "VFSQ$")>; +def : InstRW<[WLat30, VecFPd, NormalGr], (instregex "(V|W)FSQDB$")>; //===----------------------------------------------------------------------===// // Vector: Floating-point comparison //===----------------------------------------------------------------------===// -def : InstRW<[VecXsPm], (instregex "VFC(E|H|HE)$")>; -def : InstRW<[VecXsPm], (instregex "VFC(E|H|HE)DB$")>; -def : InstRW<[VecXsPm], (instregex "WFC(E|H|HE)DB$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "VFC(E|H|HE)DBS$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "WFC(E|H|HE)DBS$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "WF(C|K)$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "WF(C|K)DB$")>; +def : InstRW<[WLat2, WLat2, VecXsPm, NormalGr], (instregex "VFC(E|H|HE)$")>; +def : InstRW<[WLat2, WLat2, VecXsPm, NormalGr], (instregex "VFC(E|H|HE)DB$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "WFC(E|H|HE)DB$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "VFC(E|H|HE)DBS$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "WFC(E|H|HE)DBS$")>; +def : InstRW<[WLat3, VecXsPm, NormalGr], (instregex "WF(C|K)$")>; +def : InstRW<[WLat3, VecXsPm, NormalGr], (instregex "WF(C|K)DB$")>; //===----------------------------------------------------------------------===// // Vector: Floating-point insertion and extraction //===----------------------------------------------------------------------===// -def : InstRW<[FXb], (instregex "LEFR$")>; -def : InstRW<[FXb, Lat4], (instregex "LFER$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "LEFR$")>; +def : InstRW<[WLat4, FXb, NormalGr], (instregex "LFER$")>; //===----------------------------------------------------------------------===// // Vector: String instructions //===----------------------------------------------------------------------===// -def : InstRW<[VecStr], (instregex "VFAE(B)?$")>; -def : InstRW<[VecStr, Lat5], (instregex "VFAEBS$")>; -def : InstRW<[VecStr], (instregex "VFAE(F|H)$")>; -def : InstRW<[VecStr, Lat5], (instregex "VFAE(F|H)S$")>; -def : InstRW<[VecStr], (instregex "VFAEZ(B|F|H)$")>; -def : InstRW<[VecStr, Lat5], (instregex "VFAEZ(B|F|H)S$")>; -def : InstRW<[VecStr], (instregex "VFEE(B|F|H|ZB|ZF|ZH)?$")>; -def : InstRW<[VecStr, Lat5], (instregex "VFEE(B|F|H|ZB|ZF|ZH)S$")>; -def : InstRW<[VecStr], (instregex "VFENE(B|F|H|ZB|ZF|ZH)?$")>; -def : InstRW<[VecStr, Lat5], (instregex "VFENE(B|F|H|ZB|ZF|ZH)S$")>; -def : InstRW<[VecStr], (instregex "VISTR(B|F|H)?$")>; -def : InstRW<[VecStr, Lat5], (instregex "VISTR(B|F|H)S$")>; -def : InstRW<[VecStr], (instregex "VSTRC(B|F|H)?$")>; -def : InstRW<[VecStr, Lat5], (instregex "VSTRC(B|F|H)S$")>; -def : InstRW<[VecStr], (instregex "VSTRCZ(B|F|H)$")>; -def : InstRW<[VecStr, Lat5], (instregex "VSTRCZ(B|F|H)S$")>; +def : InstRW<[WLat3, VecStr, NormalGr], (instregex "VFAE(B)?$")>; +def : InstRW<[WLat3, VecStr, NormalGr], (instregex "VFAE(F|H)$")>; +def : InstRW<[WLat4, WLat4, VecStr, NormalGr], (instregex "VFAE(B|F|H)S$")>; +def : InstRW<[WLat3, VecStr, NormalGr], (instregex "VFAEZ(B|F|H)$")>; +def : InstRW<[WLat4, WLat4, VecStr, NormalGr], (instregex "VFAEZ(B|F|H)S$")>; +def : InstRW<[WLat3, VecStr, NormalGr], (instregex "VFEE(B|F|H|ZB|ZF|ZH)?$")>; +def : InstRW<[WLat4, WLat4, VecStr, NormalGr], + (instregex "VFEE(B|F|H|ZB|ZF|ZH)S$")>; +def : InstRW<[WLat3, VecStr, NormalGr], (instregex "VFENE(B|F|H|ZB|ZF|ZH)?$")>; +def : InstRW<[WLat4, WLat4, VecStr, NormalGr], + (instregex "VFENE(B|F|H|ZB|ZF|ZH)S$")>; +def : InstRW<[WLat3, VecStr, NormalGr], (instregex "VISTR(B|F|H)?$")>; +def : InstRW<[WLat4, WLat4, VecStr, NormalGr], (instregex "VISTR(B|F|H)S$")>; +def : InstRW<[WLat3, VecStr, NormalGr], (instregex "VSTRC(B|F|H)?$")>; +def : InstRW<[WLat4, WLat4, VecStr, NormalGr], (instregex "VSTRC(B|F|H)S$")>; +def : InstRW<[WLat3, VecStr, NormalGr], (instregex "VSTRCZ(B|F|H)$")>; +def : InstRW<[WLat4, WLat4, VecStr, NormalGr], (instregex "VSTRCZ(B|F|H)S$")>; // -------------------------------- System ---------------------------------- // @@ -1339,156 +1420,150 @@ // System: Program-Status Word Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb, Lat30], (instregex "EPSW$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "LPSW(E)?$")>; -def : InstRW<[FXa, Lat3, GroupAlone], (instregex "IPK$")>; -def : InstRW<[LSU, EndGroup], (instregex "SPKA$")>; -def : InstRW<[LSU, EndGroup], (instregex "SSM$")>; -def : InstRW<[FXb, LSU, GroupAlone], (instregex "ST(N|O)SM$")>; -def : InstRW<[FXa, Lat3], (instregex "IAC$")>; -def : InstRW<[LSU, EndGroup], (instregex "SAC(F)?$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "EPSW$")>; +def : InstRW<[WLat30, MCD], (instregex "LPSW(E)?$")>; +def : InstRW<[WLat3, FXa, GroupAlone], (instregex "IPK$")>; +def : InstRW<[WLat1, LSU, EndGroup], (instregex "SPKA$")>; +def : InstRW<[WLat1, LSU, EndGroup], (instregex "SSM$")>; +def : InstRW<[WLat1, FXb, LSU, GroupAlone], (instregex "ST(N|O)SM$")>; +def : InstRW<[WLat3, FXa, NormalGr], (instregex "IAC$")>; +def : InstRW<[WLat1, LSU, EndGroup], (instregex "SAC(F)?$")>; //===----------------------------------------------------------------------===// // System: Control Register Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb, LSU, Lat30], (instregex "LCTL(G)?$")>; -def : InstRW<[LSU, Lat30], (instregex "STCT(L|G)$")>; -def : InstRW<[LSU], (instregex "E(P|S)A(I)?R$")>; -def : InstRW<[FXb, Lat30], (instregex "SSA(I)?R$")>; -def : InstRW<[FXb, Lat30], (instregex "ESEA$")>; +def : InstRW<[WLat4LSU, WLat4LSU, LSU2, GroupAlone], (instregex "LCTL(G)?$")>; +def : InstRW<[WLat1, LSU5, GroupAlone], (instregex "STCT(L|G)$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "E(P|S)A(I)?R$")>; +def : InstRW<[WLat30, MCD], (instregex "SSA(I)?R$")>; +def : InstRW<[WLat30, MCD], (instregex "ESEA$")>; //===----------------------------------------------------------------------===// // System: Prefix-Register Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb, LSU, Lat30], (instregex "SPX$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "STPX$")>; +def : InstRW<[WLat30, MCD], (instregex "S(T)?PX$")>; //===----------------------------------------------------------------------===// // System: Storage-Key and Real Memory Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb, Lat30], (instregex "ISKE$")>; -def : InstRW<[FXb, Lat30], (instregex "IVSK$")>; -def : InstRW<[FXb, Lat30], (instregex "SSKE(Opt)?$")>; -def : InstRW<[FXb, Lat30], (instregex "RRB(E|M)$")>; -def : InstRW<[FXb, Lat30], (instregex "PFMF$")>; -def : InstRW<[FXb, Lat30], (instregex "TB$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "PGIN$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "PGOUT$")>; +def : InstRW<[WLat30, MCD], (instregex "ISKE$")>; +def : InstRW<[WLat30, MCD], (instregex "IVSK$")>; +def : InstRW<[WLat30, MCD], (instregex "SSKE(Opt)?$")>; +def : InstRW<[WLat30, MCD], (instregex "RRB(E|M)$")>; +def : InstRW<[WLat30, MCD], (instregex "PFMF$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "TB$")>; +def : InstRW<[WLat30, MCD], (instregex "PGIN$")>; +def : InstRW<[WLat30, MCD], (instregex "PGOUT$")>; //===----------------------------------------------------------------------===// // System: Dynamic-Address-Translation Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb, LSU, Lat30], (instregex "IPTE(Opt)?(Opt)?$")>; -def : InstRW<[FXb, Lat30], (instregex "IDTE(Opt)?$")>; -def : InstRW<[FXb, Lat30], (instregex "CRDTE(Opt)?$")>; -def : InstRW<[FXb, Lat30], (instregex "PTLB$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "CSP(G)?$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "LPTEA$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "LRA(Y|G)?$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "STRAG$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "LURA(G)?$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "STUR(A|G)$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "TPROT$")>; +def : InstRW<[WLat30, MCD], (instregex "IPTE(Opt)?(Opt)?$")>; +def : InstRW<[WLat30, MCD], (instregex "IDTE(Opt)?$")>; +def : InstRW<[WLat30, MCD], (instregex "CRDTE(Opt)?$")>; +def : InstRW<[WLat30, MCD], (instregex "PTLB$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "CSP(G)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "LPTEA$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "LRA(Y|G)?$")>; +def : InstRW<[WLat30, MCD], (instregex "STRAG$")>; +def : InstRW<[WLat30, MCD], (instregex "LURA(G)?$")>; +def : InstRW<[WLat30, MCD], (instregex "STUR(A|G)$")>; +def : InstRW<[WLat30, MCD], (instregex "TPROT$")>; //===----------------------------------------------------------------------===// // System: Memory-move Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXa, FXa, FXb, LSU, Lat8, GroupAlone], (instregex "MVC(K|P|S)$")>; -def : InstRW<[FXa, LSU, Lat6, GroupAlone], (instregex "MVC(S|D)K$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "MVCOS$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MVPG$")>; +def : InstRW<[WLat4LSU, FXa2, FXb, LSU5, GroupAlone], (instregex "MVC(K|P|S)$")>; +def : InstRW<[WLat1, FXa, LSU5, GroupAlone], (instregex "MVC(S|D)K$")>; +def : InstRW<[WLat30, MCD], (instregex "MVCOS$")>; +def : InstRW<[WLat30, MCD], (instregex "MVPG$")>; //===----------------------------------------------------------------------===// // System: Address-Space Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb, LSU, Lat30], (instregex "LASP$")>; -def : InstRW<[LSU, GroupAlone], (instregex "PALB$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "PC$")>; -def : InstRW<[FXb, Lat30], (instregex "PR$")>; -def : InstRW<[FXb, Lat30], (instregex "PT(I)?$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "RP$")>; -def : InstRW<[FXb, Lat30], (instregex "BS(G|A)$")>; -def : InstRW<[FXb, Lat20], (instregex "TAR$")>; +def : InstRW<[WLat30, MCD], (instregex "LASP$")>; +def : InstRW<[WLat1, LSU, GroupAlone], (instregex "PALB$")>; +def : InstRW<[WLat30, MCD], (instregex "PC$")>; +def : InstRW<[WLat30, MCD], (instregex "PR$")>; +def : InstRW<[WLat30, MCD], (instregex "PT(I)?$")>; +def : InstRW<[WLat30, MCD], (instregex "RP$")>; +def : InstRW<[WLat30, MCD], (instregex "BS(G|A)$")>; +def : InstRW<[WLat30, MCD], (instregex "TAR$")>; //===----------------------------------------------------------------------===// // System: Linkage-Stack Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb, Lat30, EndGroup], (instregex "BAKR$")>; -def : InstRW<[FXb, Lat30], (instregex "EREG(G)?$")>; -def : InstRW<[FXb, Lat30], (instregex "(E|M)STA$")>; +def : InstRW<[WLat30, MCD], (instregex "BAKR$")>; +def : InstRW<[WLat30, MCD], (instregex "EREG(G)?$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "(E|M)STA$")>; //===----------------------------------------------------------------------===// // System: Time-Related Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb, Lat30], (instregex "PTFF$")>; -def : InstRW<[FXb, LSU, Lat20], (instregex "SCK$")>; -def : InstRW<[FXb, Lat30], (instregex "SCKPF$")>; -def : InstRW<[FXb, LSU, Lat20], (instregex "SCKC$")>; -def : InstRW<[LSU, LSU, GroupAlone], (instregex "SPT$")>; -def : InstRW<[LSU, LSU, LSU, FXa, FXa, FXb, Lat9, GroupAlone], - (instregex "STCK(F)?$")>; -def : InstRW<[LSU, LSU, LSU, LSU, FXa, FXa, FXb, FXb, Lat11, GroupAlone], - (instregex "STCKE$")>; -def : InstRW<[FXb, LSU, Lat9], (instregex "STCKC$")>; -def : InstRW<[LSU, LSU, FXb, Lat5, BeginGroup], (instregex "STPT$")>; +def : InstRW<[WLat30, MCD], (instregex "PTFF$")>; +def : InstRW<[WLat30, MCD], (instregex "SCK(PF|C)?$")>; +def : InstRW<[WLat1, LSU2, GroupAlone], (instregex "SPT$")>; +def : InstRW<[WLat15, LSU3, FXa2, FXb, GroupAlone], (instregex "STCK(F)?$")>; +def : InstRW<[WLat20, LSU4, FXa2, FXb2, GroupAlone], (instregex "STCKE$")>; +def : InstRW<[WLat30, MCD], (instregex "STCKC$")>; +def : InstRW<[WLat1, LSU2, FXb, Cracked], (instregex "STPT$")>; //===----------------------------------------------------------------------===// // System: CPU-Related Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb, LSU, Lat30], (instregex "STAP$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "STIDP$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "STSI$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "STFL(E)?$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "ECAG$")>; -def : InstRW<[FXa, LSU, Lat30], (instregex "ECTG$")>; -def : InstRW<[FXb, Lat30], (instregex "PTF$")>; -def : InstRW<[FXb, Lat30], (instregex "PCKMO$")>; +def : InstRW<[WLat30, MCD], (instregex "STAP$")>; +def : InstRW<[WLat30, MCD], (instregex "STIDP$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "STSI$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "STFL(E)?$")>; +def : InstRW<[WLat30, MCD], (instregex "ECAG$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "ECTG$")>; +def : InstRW<[WLat30, MCD], (instregex "PTF$")>; +def : InstRW<[WLat30, MCD], (instregex "PCKMO$")>; //===----------------------------------------------------------------------===// // System: Miscellaneous Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb, Lat30], (instregex "SVC$")>; -def : InstRW<[FXb, GroupAlone], (instregex "MC$")>; -def : InstRW<[FXb, Lat30], (instregex "DIAG$")>; -def : InstRW<[FXb], (instregex "TRAC(E|G)$")>; -def : InstRW<[FXb, Lat30], (instregex "TRAP(2|4)$")>; -def : InstRW<[FXb, Lat30], (instregex "SIGP$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "SIGA$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "SIE$")>; +def : InstRW<[WLat30, MCD], (instregex "SVC$")>; +def : InstRW<[WLat1, FXb, GroupAlone], (instregex "MC$")>; +def : InstRW<[WLat30, MCD], (instregex "DIAG$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "TRAC(E|G)$")>; +def : InstRW<[WLat30, MCD], (instregex "TRAP(2|4)$")>; +def : InstRW<[WLat30, MCD], (instregex "SIG(P|A)$")>; +def : InstRW<[WLat30, MCD], (instregex "SIE$")>; //===----------------------------------------------------------------------===// // System: CPU-Measurement Facility Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb], (instregex "LPP$")>; -def : InstRW<[FXb, Lat30], (instregex "ECPGA$")>; -def : InstRW<[FXb, Lat30], (instregex "E(C|P)CTR$")>; -def : InstRW<[FXb, Lat30], (instregex "LCCTL$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "L(P|S)CTL$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "Q(S|CTR)I$")>; -def : InstRW<[FXb, Lat30], (instregex "S(C|P)CTR$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "LPP$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "ECPGA$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "E(C|P)CTR$")>; +def : InstRW<[WLat30, MCD], (instregex "LCCTL$")>; +def : InstRW<[WLat30, MCD], (instregex "L(P|S)CTL$")>; +def : InstRW<[WLat30, MCD], (instregex "Q(S|CTR)I$")>; +def : InstRW<[WLat30, MCD], (instregex "S(C|P)CTR$")>; //===----------------------------------------------------------------------===// // System: I/O Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb, Lat30], (instregex "(C|H|R|X)SCH$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "(M|S|ST|T)SCH$")>; -def : InstRW<[FXb, Lat30], (instregex "RCHP$")>; -def : InstRW<[FXb, Lat30], (instregex "SCHM$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "STC(PS|RW)$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "TPI$")>; -def : InstRW<[FXb, Lat30], (instregex "SAL$")>; +def : InstRW<[WLat30, MCD], (instregex "(C|H|R|X)SCH$")>; +def : InstRW<[WLat30, MCD], (instregex "(M|S|ST|T)SCH$")>; +def : InstRW<[WLat30, MCD], (instregex "RCHP$")>; +def : InstRW<[WLat30, MCD], (instregex "SCHM$")>; +def : InstRW<[WLat30, MCD], (instregex "STC(PS|RW)$")>; +def : InstRW<[WLat30, MCD], (instregex "TPI$")>; +def : InstRW<[WLat30, MCD], (instregex "SAL$")>; } Index: lib/Target/SystemZ/SystemZScheduleZ14.td =================================================================== --- lib/Target/SystemZ/SystemZScheduleZ14.td +++ lib/Target/SystemZ/SystemZScheduleZ14.td @@ -18,7 +18,7 @@ let UnsupportedFeatures = Arch12UnsupportedFeatures.List; - let IssueWidth = 8; + let IssueWidth = 6; // Number of instructions decoded per cycle. let MicroOpBufferSize = 60; // Issue queues let LoadLatency = 1; // Optimistic load latency. @@ -29,37 +29,53 @@ } let SchedModel = Z14Model in { - // These definitions need the SchedModel value. They could be put in a // subtarget common include file, but it seems the include system in Tablegen // currently (2016) rejects multiple includes of same file. -def : WriteRes { - let NumMicroOps = 0; - let BeginGroup = 1; - let EndGroup = 1; + +// Decoder grouping rules +let NumMicroOps = 1 in { + def : WriteRes; + def : WriteRes { let BeginGroup = 1; } + def : WriteRes { let EndGroup = 1; } } -def : WriteRes { - let NumMicroOps = 0; +def : WriteRes { + let NumMicroOps = 2; let BeginGroup = 1; } -def : WriteRes { - let NumMicroOps = 0; +def : WriteRes { + let NumMicroOps = 3; + let BeginGroup = 1; let EndGroup = 1; } -def : WriteRes { let Latency = 2; let NumMicroOps = 0;} -def : WriteRes { let Latency = 3; let NumMicroOps = 0;} -def : WriteRes { let Latency = 4; let NumMicroOps = 0;} -def : WriteRes { let Latency = 5; let NumMicroOps = 0;} -def : WriteRes { let Latency = 6; let NumMicroOps = 0;} -def : WriteRes { let Latency = 7; let NumMicroOps = 0;} -def : WriteRes { let Latency = 8; let NumMicroOps = 0;} -def : WriteRes { let Latency = 9; let NumMicroOps = 0;} -def : WriteRes { let Latency = 10; let NumMicroOps = 0;} -def : WriteRes { let Latency = 11; let NumMicroOps = 0;} -def : WriteRes { let Latency = 12; let NumMicroOps = 0;} -def : WriteRes { let Latency = 15; let NumMicroOps = 0;} -def : WriteRes { let Latency = 20; let NumMicroOps = 0;} -def : WriteRes { let Latency = 30; let NumMicroOps = 0;} + +// Incoming latency removed from the register operand which is used together +// with a memory operand by the instruction. +def : ReadAdvance; + +// LoadLatency (above) is not used for instructions in this file. This is +// instead the role of LSULatency, which is the latency value added to the +// result of loads and instructions with folded memory operands. +def : WriteRes { let Latency = 4; let NumMicroOps = 0; } + +let NumMicroOps = 0 in { + def : WriteRes { let Latency = 1; } + def : WriteRes { let Latency = 2; } + def : WriteRes { let Latency = 3; } + def : WriteRes { let Latency = 4; } + def : WriteRes { let Latency = 5; } + def : WriteRes { let Latency = 6; } + def : WriteRes { let Latency = 7; } + def : WriteRes { let Latency = 8; } + def : WriteRes { let Latency = 9; } + def : WriteRes { let Latency = 10; } + def : WriteRes { let Latency = 11; } + def : WriteRes { let Latency = 12; } + def : WriteRes { let Latency = 15; } + def : WriteRes { let Latency = 16; } + def : WriteRes { let Latency = 20; } + def : WriteRes { let Latency = 30; } +} // Execution units. def Z14_FXaUnit : ProcResource<2>; @@ -68,24 +84,45 @@ def Z14_VecUnit : ProcResource<2>; def Z14_VecFPdUnit : ProcResource<2> { let BufferSize = 1; /* blocking */ } def Z14_VBUnit : ProcResource<2>; +def Z14_MCD : ProcResource<1>; // Subtarget specific definitions of scheduling resources. -def : WriteRes { let Latency = 1; } -def : WriteRes { let Latency = 2; } -def : WriteRes { let Latency = 1; } -def : WriteRes { let Latency = 4; } -def : WriteRes { let Latency = 8; } -def : WriteRes { let Latency = 9; } -def : WriteRes { let Latency = 8; } -def : WriteRes { let Latency = 9; } -def : WriteRes { let Latency = 1; } -def : WriteRes { let Latency = 2; } -def : WriteRes { let Latency = 30; - let ResourceCycles = [30]; } -def : WriteRes { let Latency = 5; } -def : WriteRes { let Latency = 4; } -def : WriteRes { let Latency = 3; } -def : WriteRes; // Virtual Branching Unit +let NumMicroOps = 0 in { + def : WriteRes; + def : WriteRes { let ResourceCycles = [2]; } + def : WriteRes { let ResourceCycles = [3]; } + def : WriteRes { let ResourceCycles = [4]; } + def : WriteRes; + def : WriteRes { let ResourceCycles = [2]; } + def : WriteRes { let ResourceCycles = [3]; } + def : WriteRes { let ResourceCycles = [4]; } + def : WriteRes { let ResourceCycles = [5]; } + def : WriteRes; + def : WriteRes { let ResourceCycles = [2]; } + def : WriteRes { let ResourceCycles = [3]; } + def : WriteRes { let ResourceCycles = [4]; } + def : WriteRes { let ResourceCycles = [5]; } + def : WriteRes; + def : WriteRes { let ResourceCycles = [2]; } + def : WriteRes { let ResourceCycles = [4]; } + def : WriteRes; + def : WriteRes { let ResourceCycles = [2]; } + def : WriteRes { let ResourceCycles = [4]; } + def : WriteRes; + def : WriteRes { let ResourceCycles = [2]; } + def : WriteRes { let ResourceCycles = [4]; } + def : WriteRes { let ResourceCycles = [30]; } + def : WriteRes; + def : WriteRes; + def : WriteRes; + def : WriteRes { let ResourceCycles = [2]; } + // Virtual Branching Unit + def : WriteRes; +} + +def : WriteRes { let NumMicroOps = 3; + let BeginGroup = 1; + let EndGroup = 1; } // -------------------------- INSTRUCTIONS ---------------------------------- // @@ -99,27 +136,28 @@ // Stack allocation //===----------------------------------------------------------------------===// -def : InstRW<[FXa], (instregex "ADJDYNALLOC$")>; // Pseudo -> LA / LAY +// Pseudo -> LA / LAY +def : InstRW<[WLat1, FXa, NormalGr], (instregex "ADJDYNALLOC$")>; //===----------------------------------------------------------------------===// // Branch instructions //===----------------------------------------------------------------------===// // Branch -def : InstRW<[VBU], (instregex "(Call)?BRC(L)?(Asm.*)?$")>; -def : InstRW<[VBU], (instregex "(Call)?J(G)?(Asm.*)?$")>; -def : InstRW<[FXb], (instregex "(Call)?BC(R)?(Asm.*)?$")>; -def : InstRW<[FXb], (instregex "(Call)?B(R)?(Asm.*)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "BI(C)?(Asm.*)?$")>; -def : InstRW<[FXa, EndGroup], (instregex "BRCT(G)?$")>; -def : InstRW<[FXb, FXa, Lat2, GroupAlone], (instregex "BRCTH$")>; -def : InstRW<[FXb, FXa, Lat2, GroupAlone], (instregex "BCT(G)?(R)?$")>; -def : InstRW<[FXa, FXa, FXb, FXb, Lat4, GroupAlone], +def : InstRW<[WLat1, VBU, NormalGr], (instregex "(Call)?BRC(L)?(Asm.*)?$")>; +def : InstRW<[WLat1, VBU, NormalGr], (instregex "(Call)?J(G)?(Asm.*)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "(Call)?BC(R)?(Asm.*)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "(Call)?B(R)?(Asm.*)?$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "BI(C)?(Asm.*)?$")>; +def : InstRW<[WLat1, FXa, EndGroup], (instregex "BRCT(G)?$")>; +def : InstRW<[WLat1, FXa, FXb, GroupAlone], (instregex "BRCTH$")>; +def : InstRW<[WLat1, FXa, FXb, GroupAlone], (instregex "BCT(G)?(R)?$")>; +def : InstRW<[WLat1, FXa2, FXb2, GroupAlone], (instregex "B(R)?X(H|L).*$")>; // Compare and branch -def : InstRW<[FXb], (instregex "C(L)?(G)?(I|R)J(Asm.*)?$")>; -def : InstRW<[FXb, FXb, Lat2, GroupAlone], +def : InstRW<[WLat1, FXb, NormalGr], (instregex "C(L)?(G)?(I|R)J(Asm.*)?$")>; +def : InstRW<[WLat1, FXb2, GroupAlone], (instregex "C(L)?(G)?(I|R)B(Call|Return|Asm.*)?$")>; //===----------------------------------------------------------------------===// @@ -127,590 +165,627 @@ //===----------------------------------------------------------------------===// // Trap -def : InstRW<[VBU], (instregex "(Cond)?Trap$")>; +def : InstRW<[WLat1, VBU, NormalGr], (instregex "(Cond)?Trap$")>; // Compare and trap -def : InstRW<[FXb], (instregex "C(G)?(I|R)T(Asm.*)?$")>; -def : InstRW<[FXb], (instregex "CL(G)?RT(Asm.*)?$")>; -def : InstRW<[FXb], (instregex "CL(F|G)IT(Asm.*)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "CL(G)?T(Asm.*)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "C(G)?(I|R)T(Asm.*)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "CL(G)?RT(Asm.*)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "CL(F|G)IT(Asm.*)?$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "CL(G)?T(Asm.*)?$")>; //===----------------------------------------------------------------------===// // Call and return instructions //===----------------------------------------------------------------------===// // Call -def : InstRW<[VBU, FXa, FXa, Lat3, GroupAlone], (instregex "(Call)?BRAS$")>; -def : InstRW<[FXa, FXa, FXb, Lat3, GroupAlone], (instregex "(Call)?BRASL$")>; -def : InstRW<[FXa, FXa, FXb, Lat3, GroupAlone], (instregex "(Call)?BAS(R)?$")>; -def : InstRW<[FXa, FXa, FXb, Lat3, GroupAlone], (instregex "TLS_(G|L)DCALL$")>; +def : InstRW<[WLat1, VBU, FXa2, GroupAlone], (instregex "(Call)?BRAS$")>; +def : InstRW<[WLat1, FXa2, FXb, GroupAlone], (instregex "(Call)?BRASL$")>; +def : InstRW<[WLat1, FXa2, FXb, GroupAlone], (instregex "(Call)?BAS(R)?$")>; +def : InstRW<[WLat1, FXa2, FXb, GroupAlone], (instregex "TLS_(G|L)DCALL$")>; // Return -def : InstRW<[FXb, EndGroup], (instregex "Return$")>; -def : InstRW<[FXb], (instregex "CondReturn$")>; +def : InstRW<[WLat1, FXb, EndGroup], (instregex "Return$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "CondReturn$")>; //===----------------------------------------------------------------------===// // Move instructions //===----------------------------------------------------------------------===// // Moves -def : InstRW<[FXb, LSU, Lat5], (instregex "MV(G|H)?HI$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "MVI(Y)?$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "MV(G|H)?HI$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "MVI(Y)?$")>; // Move character -def : InstRW<[FXb, LSU, LSU, LSU, Lat8, GroupAlone], (instregex "MVC$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MVCL(E|U)?$")>; +def : InstRW<[WLat1, FXb, LSU3, GroupAlone], (instregex "MVC$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "MVCL(E|U)?$")>; // Pseudo -> reg move -def : InstRW<[FXa], (instregex "COPY(_TO_REGCLASS)?$")>; -def : InstRW<[FXa], (instregex "EXTRACT_SUBREG$")>; -def : InstRW<[FXa], (instregex "INSERT_SUBREG$")>; -def : InstRW<[FXa], (instregex "REG_SEQUENCE$")>; -def : InstRW<[FXa], (instregex "SUBREG_TO_REG$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "COPY(_TO_REGCLASS)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "EXTRACT_SUBREG$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "INSERT_SUBREG$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "REG_SEQUENCE$")>; // Loads -def : InstRW<[LSU], (instregex "L(Y|FH|RL|Mux|CBB)?$")>; -def : InstRW<[LSU], (instregex "LG(RL)?$")>; -def : InstRW<[LSU], (instregex "L128$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "L(Y|FH|RL|Mux)?$")>; +def : InstRW<[LSULatency, LSULatency, LSU, NormalGr], (instregex "LCBB$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LG(RL)?$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "L128$")>; -def : InstRW<[FXa], (instregex "LLIH(F|H|L)$")>; -def : InstRW<[FXa], (instregex "LLIL(F|H|L)$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LLIH(F|H|L)$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LLIL(F|H|L)$")>; -def : InstRW<[FXa], (instregex "LG(F|H)I$")>; -def : InstRW<[FXa], (instregex "LHI(Mux)?$")>; -def : InstRW<[FXa], (instregex "LR(Mux)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LG(F|H)I$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LHI(Mux)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LR(Mux)?$")>; // Load and zero rightmost byte -def : InstRW<[LSU], (instregex "LZR(F|G)$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LZR(F|G)$")>; // Load and trap -def : InstRW<[FXb, LSU, Lat5], (instregex "L(FH|G)?AT$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "L(FH|G)?AT$")>; // Load and test -def : InstRW<[FXa, LSU, Lat5], (instregex "LT(G)?$")>; -def : InstRW<[FXa], (instregex "LT(G)?R$")>; +def : InstRW<[WLat1LSU, WLat1LSU, LSU, FXa, NormalGr], (instregex "LT(G)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LT(G)?R$")>; // Stores -def : InstRW<[FXb, LSU, Lat5], (instregex "STG(RL)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "ST128$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "ST(Y|FH|RL|Mux)?$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "STG(RL)?$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "ST128$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "ST(Y|FH|RL|Mux)?$")>; // String moves. -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MVST$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "MVST$")>; //===----------------------------------------------------------------------===// // Conditional move instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXa, Lat2], (instregex "LOCRMux$")>; -def : InstRW<[FXa, Lat2], (instregex "LOC(G|FH)?R(Asm.*)?$")>; -def : InstRW<[FXa, Lat2], (instregex "LOC(G|H)?HI(Mux|(Asm.*))?$")>; -def : InstRW<[FXa, LSU, Lat6], (instregex "LOC(G|FH|Mux)?(Asm.*)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "STOC(G|FH|Mux)?(Asm.*)?$")>; +def : InstRW<[WLat2, FXa, NormalGr], (instregex "LOCRMux$")>; +def : InstRW<[WLat2, FXa, NormalGr], (instregex "LOC(G|FH)?R(Asm.*)?$")>; +def : InstRW<[WLat2, FXa, NormalGr], (instregex "LOC(G|H)?HI(Mux|(Asm.*))?$")>; +def : InstRW<[WLat2LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "LOC(G|FH|Mux)?(Asm.*)?$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], + (instregex "STOC(G|FH|Mux)?(Asm.*)?$")>; //===----------------------------------------------------------------------===// // Sign extensions //===----------------------------------------------------------------------===// -def : InstRW<[FXa], (instregex "L(B|H|G)R$")>; -def : InstRW<[FXa], (instregex "LG(B|H|F)R$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "L(B|H|G)R$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LG(B|H|F)R$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "LTGF$")>; -def : InstRW<[FXa], (instregex "LTGFR$")>; +def : InstRW<[WLat1LSU, WLat1LSU, FXa, LSU, NormalGr], (instregex "LTGF$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LTGFR$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "LB(H|Mux)?$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "LH(Y)?$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "LH(H|Mux|RL)$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "LG(B|H|F)$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "LG(H|F)RL$")>; +def : InstRW<[WLat1LSU, FXa, LSU, NormalGr], (instregex "LB(H|Mux)?$")>; +def : InstRW<[WLat1LSU, FXa, LSU, NormalGr], (instregex "LH(Y)?$")>; +def : InstRW<[WLat1LSU, FXa, LSU, NormalGr], (instregex "LH(H|Mux|RL)$")>; +def : InstRW<[WLat1LSU, FXa, LSU, NormalGr], (instregex "LG(B|H|F)$")>; +def : InstRW<[WLat1LSU, FXa, LSU, NormalGr], (instregex "LG(H|F)RL$")>; //===----------------------------------------------------------------------===// // Zero extensions //===----------------------------------------------------------------------===// -def : InstRW<[FXa], (instregex "LLCR(Mux)?$")>; -def : InstRW<[FXa], (instregex "LLHR(Mux)?$")>; -def : InstRW<[FXa], (instregex "LLG(C|H|F|T)R$")>; -def : InstRW<[LSU], (instregex "LLC(Mux)?$")>; -def : InstRW<[LSU], (instregex "LLH(Mux)?$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "LL(C|H)H$")>; -def : InstRW<[LSU], (instregex "LLHRL$")>; -def : InstRW<[LSU], (instregex "LLG(C|H|F|T|HRL|FRL)$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LLCR(Mux)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LLHR(Mux)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LLG(C|H|F|T)R$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLC(Mux)?$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLH(Mux)?$")>; +def : InstRW<[WLat1LSU, FXa, LSU, NormalGr], (instregex "LL(C|H)H$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLHRL$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLG(C|H|F|T|HRL|FRL)$")>; // Load and zero rightmost byte -def : InstRW<[LSU], (instregex "LLZRGF$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLZRGF$")>; // Load and trap -def : InstRW<[FXb, LSU, Lat5], (instregex "LLG(F|T)?AT$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "LLG(F|T)?AT$")>; //===----------------------------------------------------------------------===// // Truncations //===----------------------------------------------------------------------===// -def : InstRW<[FXb, LSU, Lat5], (instregex "STC(H|Y|Mux)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "STH(H|Y|RL|Mux)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "STCM(H|Y)?$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "STC(H|Y|Mux)?$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "STH(H|Y|RL|Mux)?$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "STCM(H|Y)?$")>; //===----------------------------------------------------------------------===// // Multi-register moves //===----------------------------------------------------------------------===// // Load multiple (estimated average of 5 ops) -def : InstRW<[LSU, LSU, LSU, LSU, LSU, Lat10, GroupAlone], - (instregex "LM(H|Y|G)?$")>; +def : InstRW<[WLat10, WLat10, LSU5, GroupAlone], (instregex "LM(H|Y|G)?$")>; // Load multiple disjoint -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "LMD$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "LMD$")>; -// Store multiple (estimated average of ceil(5/2) FXb ops) -def : InstRW<[LSU, LSU, FXb, FXb, FXb, Lat10, - GroupAlone], (instregex "STM(G|H|Y)?$")>; +// Store multiple +def : InstRW<[WLat1, LSU2, FXb3, GroupAlone], (instregex "STM(G|H|Y)?$")>; //===----------------------------------------------------------------------===// // Byte swaps //===----------------------------------------------------------------------===// -def : InstRW<[FXa], (instregex "LRV(G)?R$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "LRV(G|H)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "STRV(G|H)?$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MVCIN$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LRV(G)?R$")>; +def : InstRW<[WLat1LSU, FXa, LSU, NormalGr], (instregex "LRV(G|H)?$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "STRV(G|H)?$")>; +def : InstRW<[WLat30, MCD], (instregex "MVCIN$")>; //===----------------------------------------------------------------------===// // Load address instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXa], (instregex "LA(Y|RL)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LA(Y|RL)?$")>; // Load the Global Offset Table address ( -> larl ) -def : InstRW<[FXa], (instregex "GOT$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "GOT$")>; //===----------------------------------------------------------------------===// // Absolute and Negation //===----------------------------------------------------------------------===// -def : InstRW<[FXa], (instregex "LP(G)?R$")>; -def : InstRW<[FXa, FXa, Lat2, BeginGroup], (instregex "L(N|P)GFR$")>; -def : InstRW<[FXa], (instregex "LN(R|GR)$")>; -def : InstRW<[FXa], (instregex "LC(R|GR)$")>; -def : InstRW<[FXa, FXa, Lat2, BeginGroup], (instregex "LCGFR$")>; +def : InstRW<[WLat1, WLat1, FXa, NormalGr], (instregex "LP(G)?R$")>; +def : InstRW<[WLat2, WLat2, FXa2, Cracked], (instregex "L(N|P)GFR$")>; +def : InstRW<[WLat1, WLat1, FXa, NormalGr], (instregex "LN(R|GR)$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "LC(R|GR)$")>; +def : InstRW<[WLat2, WLat2, FXa2, Cracked], (instregex "LCGFR$")>; //===----------------------------------------------------------------------===// // Insertion //===----------------------------------------------------------------------===// -def : InstRW<[FXa, LSU, Lat5], (instregex "IC(Y)?$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "IC32(Y)?$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "ICM(H|Y)?$")>; -def : InstRW<[FXa], (instregex "II(F|H|L)Mux$")>; -def : InstRW<[FXa], (instregex "IIHF(64)?$")>; -def : InstRW<[FXa], (instregex "IIHH(64)?$")>; -def : InstRW<[FXa], (instregex "IIHL(64)?$")>; -def : InstRW<[FXa], (instregex "IILF(64)?$")>; -def : InstRW<[FXa], (instregex "IILH(64)?$")>; -def : InstRW<[FXa], (instregex "IILL(64)?$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXa, LSU, NormalGr], (instregex "IC(Y)?$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "IC32(Y)?$")>; +def : InstRW<[WLat1LSU, RegReadAdv, WLat1LSU, FXa, LSU, NormalGr], + (instregex "ICM(H|Y)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "II(F|H|L)Mux$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "IIHF(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "IIHH(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "IIHL(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "IILF(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "IILH(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "IILL(64)?$")>; //===----------------------------------------------------------------------===// // Addition //===----------------------------------------------------------------------===// -def : InstRW<[FXa, LSU, Lat5], (instregex "A(Y)?$")>; -def : InstRW<[FXa, LSU, Lat6], (instregex "AH(Y)?$")>; -def : InstRW<[FXa], (instregex "AIH$")>; -def : InstRW<[FXa], (instregex "AFI(Mux)?$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "AG$")>; -def : InstRW<[FXa], (instregex "AGFI$")>; -def : InstRW<[FXa], (instregex "AGHI(K)?$")>; -def : InstRW<[FXa], (instregex "AGR(K)?$")>; -def : InstRW<[FXa], (instregex "AHI(K)?$")>; -def : InstRW<[FXa], (instregex "AHIMux(K)?$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "AL(Y)?$")>; -def : InstRW<[FXa], (instregex "AL(FI|HSIK)$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "ALG(F)?$")>; -def : InstRW<[FXa], (instregex "ALGHSIK$")>; -def : InstRW<[FXa], (instregex "ALGF(I|R)$")>; -def : InstRW<[FXa], (instregex "ALGR(K)?$")>; -def : InstRW<[FXa], (instregex "ALR(K)?$")>; -def : InstRW<[FXa], (instregex "AR(K)?$")>; -def : InstRW<[FXa], (instregex "A(L)?HHHR$")>; -def : InstRW<[FXa, Lat2], (instregex "A(L)?HHLR$")>; -def : InstRW<[FXa], (instregex "ALSIH(N)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "A(L)?(G)?SI$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "A(Y)?$")>; +def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "AH(Y)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "AIH$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "AFI(Mux)?$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "AG$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "AGFI$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "AGHI(K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "AGR(K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "AHI(K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "AHIMux(K)?$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "AL(Y)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "AL(FI|HSIK)$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "ALG(F)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "ALGHSIK$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "ALGF(I|R)$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "ALGR(K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "ALR(K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "AR(K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "A(L)?HHHR$")>; +def : InstRW<[WLat2, WLat2, FXa, NormalGr], (instregex "A(L)?HHLR$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "ALSIH(N)?$")>; +def : InstRW<[WLat2LSU, FXb, LSU, NormalGr], (instregex "A(L)?(G)?SI$")>; // Logical addition with carry -def : InstRW<[FXa, LSU, Lat6, GroupAlone], (instregex "ALC(G)?$")>; -def : InstRW<[FXa, Lat2, GroupAlone], (instregex "ALC(G)?R$")>; +def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXa, LSU, GroupAlone], + (instregex "ALC(G)?$")>; +def : InstRW<[WLat2, WLat2, FXa, GroupAlone], (instregex "ALC(G)?R$")>; // Add with sign extension (16/32 -> 64) -def : InstRW<[FXa, LSU, Lat6], (instregex "AG(F|H)$")>; -def : InstRW<[FXa, Lat2], (instregex "AGFR$")>; +def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "AG(F|H)$")>; +def : InstRW<[WLat2, WLat2, FXa, NormalGr], (instregex "AGFR$")>; //===----------------------------------------------------------------------===// // Subtraction //===----------------------------------------------------------------------===// -def : InstRW<[FXa, LSU, Lat5], (instregex "S(G|Y)?$")>; -def : InstRW<[FXa, LSU, Lat6], (instregex "SH(Y)?$")>; -def : InstRW<[FXa], (instregex "SGR(K)?$")>; -def : InstRW<[FXa], (instregex "SLFI$")>; -def : InstRW<[FXa, LSU, Lat5], (instregex "SL(G|GF|Y)?$")>; -def : InstRW<[FXa], (instregex "SLGF(I|R)$")>; -def : InstRW<[FXa], (instregex "SLGR(K)?$")>; -def : InstRW<[FXa], (instregex "SLR(K)?$")>; -def : InstRW<[FXa], (instregex "SR(K)?$")>; -def : InstRW<[FXa], (instregex "S(L)?HHHR$")>; -def : InstRW<[FXa, Lat2], (instregex "S(L)?HHLR$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "S(G|Y)?$")>; +def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "SH(Y)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "SGR(K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "SLFI$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "SL(G|GF|Y)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "SLGF(I|R)$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "SLGR(K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "SLR(K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "SR(K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "S(L)?HHHR$")>; +def : InstRW<[WLat2, WLat2, FXa, NormalGr], (instregex "S(L)?HHLR$")>; // Subtraction with borrow -def : InstRW<[FXa, LSU, Lat6, GroupAlone], (instregex "SLB(G)?$")>; -def : InstRW<[FXa, Lat2, GroupAlone], (instregex "SLB(G)?R$")>; +def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXa, LSU, GroupAlone], + (instregex "SLB(G)?$")>; +def : InstRW<[WLat2, WLat2, FXa, GroupAlone], (instregex "SLB(G)?R$")>; // Subtraction with sign extension (16/32 -> 64) -def : InstRW<[FXa, LSU, Lat6], (instregex "SG(F|H)$")>; -def : InstRW<[FXa, Lat2], (instregex "SGFR$")>; +def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "SG(F|H)$")>; +def : InstRW<[WLat2, WLat2, FXa, NormalGr], (instregex "SGFR$")>; //===----------------------------------------------------------------------===// // AND //===----------------------------------------------------------------------===// -def : InstRW<[FXa, LSU, Lat5], (instregex "N(G|Y)?$")>; -def : InstRW<[FXa], (instregex "NGR(K)?$")>; -def : InstRW<[FXa], (instregex "NI(FMux|HMux|LMux)$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "NI(Y)?$")>; -def : InstRW<[FXa], (instregex "NIHF(64)?$")>; -def : InstRW<[FXa], (instregex "NIHH(64)?$")>; -def : InstRW<[FXa], (instregex "NIHL(64)?$")>; -def : InstRW<[FXa], (instregex "NILF(64)?$")>; -def : InstRW<[FXa], (instregex "NILH(64)?$")>; -def : InstRW<[FXa], (instregex "NILL(64)?$")>; -def : InstRW<[FXa], (instregex "NR(K)?$")>; -def : InstRW<[LSU, LSU, FXb, Lat9, BeginGroup], (instregex "NC$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "N(G|Y)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "NGR(K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "NI(FMux|HMux|LMux)$")>; +def : InstRW<[WLat2LSU, FXb, LSU, NormalGr], (instregex "NI(Y)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "NIHF(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "NIHH(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "NIHL(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "NILF(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "NILH(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "NILL(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "NR(K)?$")>; +def : InstRW<[WLat3LSU, LSU2, FXb, Cracked], (instregex "NC$")>; //===----------------------------------------------------------------------===// // OR //===----------------------------------------------------------------------===// -def : InstRW<[FXa, LSU, Lat5], (instregex "O(G|Y)?$")>; -def : InstRW<[FXa], (instregex "OGR(K)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "OI(Y)?$")>; -def : InstRW<[FXa], (instregex "OI(FMux|HMux|LMux)$")>; -def : InstRW<[FXa], (instregex "OIHF(64)?$")>; -def : InstRW<[FXa], (instregex "OIHH(64)?$")>; -def : InstRW<[FXa], (instregex "OIHL(64)?$")>; -def : InstRW<[FXa], (instregex "OILF(64)?$")>; -def : InstRW<[FXa], (instregex "OILH(64)?$")>; -def : InstRW<[FXa], (instregex "OILL(64)?$")>; -def : InstRW<[FXa], (instregex "OR(K)?$")>; -def : InstRW<[LSU, LSU, FXb, Lat9, BeginGroup], (instregex "OC$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "O(G|Y)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "OGR(K)?$")>; +def : InstRW<[WLat2LSU, FXb, LSU, NormalGr], (instregex "OI(Y)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "OI(FMux|HMux|LMux)$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "OIHF(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "OIHH(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "OIHL(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "OILF(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "OILH(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "OILL(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "OR(K)?$")>; +def : InstRW<[WLat3LSU, LSU2, FXb, Cracked], (instregex "OC$")>; //===----------------------------------------------------------------------===// // XOR //===----------------------------------------------------------------------===// -def : InstRW<[FXa, LSU, Lat5], (instregex "X(G|Y)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "XI(Y)?$")>; -def : InstRW<[FXa], (instregex "XIFMux$")>; -def : InstRW<[FXa], (instregex "XGR(K)?$")>; -def : InstRW<[FXa], (instregex "XIHF(64)?$")>; -def : InstRW<[FXa], (instregex "XILF(64)?$")>; -def : InstRW<[FXa], (instregex "XR(K)?$")>; -def : InstRW<[LSU, LSU, FXb, Lat9, BeginGroup], (instregex "XC$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "X(G|Y)?$")>; +def : InstRW<[WLat2LSU, FXb, LSU, NormalGr], (instregex "XI(Y)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "XIFMux$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "XGR(K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "XIHF(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "XILF(64)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "XR(K)?$")>; +def : InstRW<[WLat3LSU, LSU2, FXb, Cracked], (instregex "XC$")>; //===----------------------------------------------------------------------===// // Multiplication //===----------------------------------------------------------------------===// -def : InstRW<[FXa, LSU, Lat9], (instregex "MS(GF|Y)?$")>; -def : InstRW<[FXa, Lat5], (instregex "MS(R|FI)$")>; -def : InstRW<[FXa, LSU, Lat11], (instregex "MSG$")>; -def : InstRW<[FXa, Lat7], (instregex "MSGR$")>; -def : InstRW<[FXa, Lat5], (instregex "MSGF(I|R)$")>; -def : InstRW<[FXa2, LSU, Lat12, GroupAlone], (instregex "MLG$")>; -def : InstRW<[FXa2, Lat8, GroupAlone], (instregex "MLGR$")>; -def : InstRW<[FXa, Lat4], (instregex "MGHI$")>; -def : InstRW<[FXa, Lat4], (instregex "MHI$")>; -def : InstRW<[FXa, LSU, Lat8], (instregex "MH(Y)?$")>; -def : InstRW<[FXa2, Lat6, GroupAlone], (instregex "M(L)?R$")>; -def : InstRW<[FXa2, LSU, Lat10, GroupAlone], (instregex "M(FY|L)?$")>; -def : InstRW<[FXa, LSU, Lat8], (instregex "MGH$")>; -def : InstRW<[FXa, FXa, LSU, Lat12, GroupAlone], (instregex "MG$")>; -def : InstRW<[FXa, FXa, Lat8, GroupAlone], (instregex "MGRK$")>; -def : InstRW<[FXa, LSU, Lat9], (instregex "MSC$")>; -def : InstRW<[FXa, LSU, Lat11], (instregex "MSGC$")>; -def : InstRW<[FXa, Lat5], (instregex "MSRKC$")>; -def : InstRW<[FXa, Lat7], (instregex "MSGRKC$")>; +def : InstRW<[WLat5LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "MS(GF|Y)?$")>; +def : InstRW<[WLat5, FXa, NormalGr], (instregex "MS(R|FI)$")>; +def : InstRW<[WLat7LSU, RegReadAdv, FXa, LSU, NormalGr], (instregex "MSG$")>; +def : InstRW<[WLat7, FXa, NormalGr], (instregex "MSGR$")>; +def : InstRW<[WLat5, FXa, NormalGr], (instregex "MSGF(I|R)$")>; +def : InstRW<[WLat8LSU, RegReadAdv, FXa2, LSU, GroupAlone], (instregex "MLG$")>; +def : InstRW<[WLat8, FXa2, GroupAlone], (instregex "MLGR$")>; +def : InstRW<[WLat4, FXa, NormalGr], (instregex "MGHI$")>; +def : InstRW<[WLat4, FXa, NormalGr], (instregex "MHI$")>; +def : InstRW<[WLat4LSU, RegReadAdv, FXa, LSU, NormalGr], (instregex "MH(Y)?$")>; +def : InstRW<[WLat6, FXa2, GroupAlone], (instregex "M(L)?R$")>; +def : InstRW<[WLat6LSU, RegReadAdv, FXa2, LSU, GroupAlone], + (instregex "M(FY|L)?$")>; +def : InstRW<[WLat8, RegReadAdv, FXa, LSU, NormalGr], (instregex "MGH$")>; +def : InstRW<[WLat12, RegReadAdv, FXa2, LSU, GroupAlone], (instregex "MG$")>; +def : InstRW<[WLat8, FXa2, GroupAlone], (instregex "MGRK$")>; +def : InstRW<[WLat6LSU, WLat6LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "MSC$")>; +def : InstRW<[WLat8LSU, WLat8LSU, RegReadAdv, FXa, LSU, NormalGr], + (instregex "MSGC$")>; +def : InstRW<[WLat6, WLat6, FXa, NormalGr], (instregex "MSRKC$")>; +def : InstRW<[WLat8, WLat8, FXa, NormalGr], (instregex "MSGRKC$")>; //===----------------------------------------------------------------------===// // Division and remainder //===----------------------------------------------------------------------===// -def : InstRW<[FXa2, FXa2, Lat20, GroupAlone], (instregex "DR$")>; -def : InstRW<[FXa2, FXa2, LSU, Lat30, GroupAlone], (instregex "D$")>; -def : InstRW<[FXa2, Lat30, GroupAlone], (instregex "DSG(F)?R$")>; -def : InstRW<[LSU, FXa2, Lat30, GroupAlone], (instregex "DSG(F)?$")>; -def : InstRW<[FXa2, FXa2, Lat20, GroupAlone], (instregex "DLR$")>; -def : InstRW<[FXa2, FXa2, Lat30, GroupAlone], (instregex "DLGR$")>; -def : InstRW<[FXa2, FXa2, LSU, Lat30, GroupAlone], (instregex "DL(G)?$")>; +def : InstRW<[WLat20, FXa4, GroupAlone], (instregex "DR$")>; +def : InstRW<[WLat30, RegReadAdv, FXa4, LSU, GroupAlone], (instregex "D$")>; +def : InstRW<[WLat30, FXa2, GroupAlone], (instregex "DSG(F)?R$")>; +def : InstRW<[WLat30, RegReadAdv, FXa2, LSU, GroupAlone], + (instregex "DSG(F)?$")>; +def : InstRW<[WLat20, FXa4, GroupAlone], (instregex "DLR$")>; +def : InstRW<[WLat30, FXa4, GroupAlone], (instregex "DLGR$")>; +def : InstRW<[WLat30, RegReadAdv, FXa4, LSU, GroupAlone], (instregex "DL(G)?$")>; //===----------------------------------------------------------------------===// // Shifts //===----------------------------------------------------------------------===// -def : InstRW<[FXa], (instregex "SLL(G|K)?$")>; -def : InstRW<[FXa], (instregex "SRL(G|K)?$")>; -def : InstRW<[FXa], (instregex "SRA(G|K)?$")>; -def : InstRW<[FXa], (instregex "SLA(G|K)?$")>; -def : InstRW<[FXa, FXa, FXa, FXa, LSU, Lat8, GroupAlone], +def : InstRW<[WLat1, FXa, NormalGr], (instregex "SLL(G|K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "SRL(G|K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "SRA(G|K)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "SLA(G|K)?$")>; +def : InstRW<[WLat5LSU, WLat5LSU, FXa4, LSU, GroupAlone], (instregex "S(L|R)D(A|L)$")>; // Rotate -def : InstRW<[FXa, LSU, Lat6], (instregex "RLL(G)?$")>; +def : InstRW<[WLat2LSU, FXa, LSU, NormalGr], (instregex "RLL(G)?$")>; // Rotate and insert -def : InstRW<[FXa], (instregex "RISBG(N|32)?$")>; -def : InstRW<[FXa], (instregex "RISBH(G|H|L)$")>; -def : InstRW<[FXa], (instregex "RISBL(G|H|L)$")>; -def : InstRW<[FXa], (instregex "RISBMux$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "RISBG(N|32)?$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "RISBH(G|H|L)$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "RISBL(G|H|L)$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "RISBMux$")>; // Rotate and Select -def : InstRW<[FXa, FXa, Lat2, BeginGroup], (instregex "R(N|O|X)SBG$")>; +def : InstRW<[WLat2, WLat2, FXa2, Cracked], (instregex "R(N|O|X)SBG$")>; //===----------------------------------------------------------------------===// // Comparison //===----------------------------------------------------------------------===// -def : InstRW<[FXb, LSU, Lat5], (instregex "C(G|Y|Mux|RL)?$")>; -def : InstRW<[FXb], (instregex "C(F|H)I(Mux)?$")>; -def : InstRW<[FXb], (instregex "CG(F|H)I$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "CG(HSI|RL)$")>; -def : InstRW<[FXb], (instregex "C(G)?R$")>; -def : InstRW<[FXb], (instregex "CIH$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "CH(F|SI)$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "CL(Y|Mux|FHSI)?$")>; -def : InstRW<[FXb], (instregex "CLFI(Mux)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "CLG(HRL|HSI)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "CLGF(RL)?$")>; -def : InstRW<[FXb], (instregex "CLGF(I|R)$")>; -def : InstRW<[FXb], (instregex "CLGR$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "CLGRL$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "CLH(F|RL|HSI)$")>; -def : InstRW<[FXb], (instregex "CLIH$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "CLI(Y)?$")>; -def : InstRW<[FXb], (instregex "CLR$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "CLRL$")>; -def : InstRW<[FXb], (instregex "C(L)?HHR$")>; -def : InstRW<[FXb, Lat2], (instregex "C(L)?HLR$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXb, LSU, NormalGr], + (instregex "C(G|Y|Mux)?$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "CRL$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "C(F|H)I(Mux)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "CG(F|H)I$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "CG(HSI|RL)$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "C(G)?R$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "CIH$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXb, LSU, NormalGr], (instregex "CHF$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "CHSI$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXb, LSU, NormalGr], + (instregex "CL(Y|Mux)?$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "CLFHSI$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "CLFI(Mux)?$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXb, LSU, NormalGr], (instregex "CLG$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "CLG(HRL|HSI)$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXb, LSU, NormalGr], (instregex "CLGF$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "CLGFRL$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "CLGF(I|R)$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "CLGR$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "CLGRL$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXb, LSU, NormalGr], (instregex "CLHF$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "CLH(RL|HSI)$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "CLIH$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "CLI(Y)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "CLR$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "CLRL$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "C(L)?HHR$")>; +def : InstRW<[WLat2, FXb, NormalGr], (instregex "C(L)?HLR$")>; // Compare halfword -def : InstRW<[FXb, LSU, Lat6], (instregex "CH(Y|RL)?$")>; -def : InstRW<[FXb, LSU, Lat6], (instregex "CGH(RL)?$")>; -def : InstRW<[FXa, FXb, LSU, Lat6, BeginGroup], (instregex "CHHSI$")>; +def : InstRW<[WLat2LSU, RegReadAdv, FXb, LSU, NormalGr], (instregex "CH(Y)?$")>; +def : InstRW<[WLat2LSU, FXb, LSU, NormalGr], (instregex "CHRL$")>; +def : InstRW<[WLat2LSU, RegReadAdv, FXb, LSU, NormalGr], (instregex "CGH$")>; +def : InstRW<[WLat2LSU, FXb, LSU, NormalGr], (instregex "CGHRL$")>; +def : InstRW<[WLat2LSU, FXa, FXb, LSU, Cracked], (instregex "CHHSI$")>; // Compare with sign extension (32 -> 64) -def : InstRW<[FXb, LSU, Lat6], (instregex "CGF(RL)?$")>; -def : InstRW<[FXb, Lat2], (instregex "CGFR$")>; +def : InstRW<[WLat2LSU, RegReadAdv, FXb, LSU, NormalGr], (instregex "CGF$")>; +def : InstRW<[WLat2LSU, FXb, LSU, NormalGr], (instregex "CGFRL$")>; +def : InstRW<[WLat2, FXb, NormalGr], (instregex "CGFR$")>; // Compare logical character -def : InstRW<[FXb, LSU, LSU, Lat9, BeginGroup], (instregex "CLC$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "CLCL(E|U)?$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "CLST$")>; +def : InstRW<[WLat6, FXb, LSU2, Cracked], (instregex "CLC$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CLCL(E|U)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CLST$")>; // Test under mask -def : InstRW<[FXb, LSU, Lat5], (instregex "TM(Y)?$")>; -def : InstRW<[FXb], (instregex "TM(H|L)Mux$")>; -def : InstRW<[FXb], (instregex "TMHH(64)?$")>; -def : InstRW<[FXb], (instregex "TMHL(64)?$")>; -def : InstRW<[FXb], (instregex "TMLH(64)?$")>; -def : InstRW<[FXb], (instregex "TMLL(64)?$")>; +def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "TM(Y)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "TM(H|L)Mux$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "TMHH(64)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "TMHL(64)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "TMLH(64)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "TMLL(64)?$")>; // Compare logical characters under mask -def : InstRW<[FXb, LSU, Lat6], (instregex "CLM(H|Y)?$")>; +def : InstRW<[WLat2LSU, RegReadAdv, FXb, LSU, NormalGr], + (instregex "CLM(H|Y)?$")>; //===----------------------------------------------------------------------===// // Prefetch and execution hint //===----------------------------------------------------------------------===// -def : InstRW<[LSU], (instregex "PFD(RL)?$")>; -def : InstRW<[FXb, Lat2], (instregex "BPP$")>; +def : InstRW<[WLat1, LSU, NormalGr], (instregex "PFD(RL)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "BPP$")>; def : InstRW<[FXb, EndGroup], (instregex "BPRP$")>; -def : InstRW<[FXb], (instregex "NIAI$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "NIAI$")>; //===----------------------------------------------------------------------===// // Atomic operations //===----------------------------------------------------------------------===// -def : InstRW<[FXb, EndGroup], (instregex "Serialize$")>; +def : InstRW<[WLat1, FXb, EndGroup], (instregex "Serialize$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "LAA(G)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "LAAL(G)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "LAN(G)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "LAO(G)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "LAX(G)?$")>; +def : InstRW<[WLat2LSU, WLat2LSU, FXb, LSU, NormalGr], (instregex "LAA(G)?$")>; +def : InstRW<[WLat2LSU, WLat2LSU, FXb, LSU, NormalGr], (instregex "LAAL(G)?$")>; +def : InstRW<[WLat2LSU, WLat2LSU, FXb, LSU, NormalGr], (instregex "LAN(G)?$")>; +def : InstRW<[WLat2LSU, WLat2LSU, FXb, LSU, NormalGr], (instregex "LAO(G)?$")>; +def : InstRW<[WLat2LSU, WLat2LSU, FXb, LSU, NormalGr], (instregex "LAX(G)?$")>; // Test and set -def : InstRW<[FXb, LSU, Lat5, EndGroup], (instregex "TS$")>; +def : InstRW<[WLat2LSU, FXb, LSU, EndGroup], (instregex "TS$")>; // Compare and swap -def : InstRW<[FXa, FXb, LSU, Lat6, GroupAlone], (instregex "CS(G|Y)?$")>; +def : InstRW<[WLat3LSU, WLat3LSU, FXa, FXb, LSU, GroupAlone], + (instregex "CS(G|Y)?$")>; // Compare double and swap -def : InstRW<[FXa, FXa, FXb, FXb, FXa, LSU, Lat10, GroupAlone], +def : InstRW<[WLat6LSU, WLat6LSU, FXa3, FXb2, LSU, GroupAlone], (instregex "CDS(Y)?$")>; -def : InstRW<[FXa, FXa, FXb, FXb, LSU, FXb, FXb, LSU, LSU, Lat20, GroupAlone], - (instregex "CDSG$")>; +def : InstRW<[WLat15, WLat15, FXa2, FXb4, LSU3, + GroupAlone], (instregex "CDSG$")>; // Compare and swap and store -def : InstRW<[FXa, LSU, Lat30], (instregex "CSST$")>; +def : InstRW<[WLat30, MCD], (instregex "CSST$")>; // Perform locked operation -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "PLO$")>; +def : InstRW<[WLat30, MCD], (instregex "PLO$")>; // Load/store pair from/to quadword -def : InstRW<[LSU, LSU, Lat5, GroupAlone], (instregex "LPQ$")>; -def : InstRW<[FXb, FXb, LSU, Lat6, GroupAlone], (instregex "STPQ$")>; +def : InstRW<[WLat4LSU, LSU2, GroupAlone], (instregex "LPQ$")>; +def : InstRW<[WLat1, FXb2, LSU, GroupAlone], (instregex "STPQ$")>; // Load pair disjoint -def : InstRW<[LSU, LSU, Lat5, GroupAlone], (instregex "LPD(G)?$")>; +def : InstRW<[WLat1LSU, WLat1LSU, LSU2, GroupAlone], (instregex "LPD(G)?$")>; //===----------------------------------------------------------------------===// // Translate and convert //===----------------------------------------------------------------------===// -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "TR$")>; -def : InstRW<[FXa, FXa, FXa, LSU, LSU, Lat30, GroupAlone], (instregex "TRT$")>; -def : InstRW<[FXa, LSU, Lat30], (instregex "TRTR$")>; -def : InstRW<[FXa, Lat30], (instregex "TRE$")>; -def : InstRW<[FXa, Lat30], (instregex "TRT(R)?E(Opt)?$")>; -def : InstRW<[LSU, Lat30], (instregex "TR(T|O)(T|O)(Opt)?$")>; -def : InstRW<[FXa, Lat30], (instregex "CU(12|14|21|24|41|42)(Opt)?$")>; -def : InstRW<[FXa, Lat30], (instregex "(CUUTF|CUTFU)(Opt)?$")>; +def : InstRW<[WLat1, LSU5, GroupAlone], (instregex "TR$")>; +def : InstRW<[WLat30, WLat30, WLat30, FXa3, LSU2, GroupAlone], + (instregex "TRT$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "TRTR$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "TRE$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "TRT(R)?E(Opt)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "TR(T|O)(T|O)(Opt)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], + (instregex "CU(12|14|21|24|41|42)(Opt)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "(CUUTF|CUTFU)(Opt)?$")>; //===----------------------------------------------------------------------===// // Message-security assist //===----------------------------------------------------------------------===// -def : InstRW<[FXa, Lat30], (instregex "KM(C|F|O|CTR|A)?$")>; -def : InstRW<[FXa, Lat30], (instregex "(KIMD|KLMD|KMAC)$")>; -def : InstRW<[FXa, Lat30], (instregex "(PCC|PPNO|PRNO)$")>; +def : InstRW<[WLat30, WLat30, WLat30, WLat30, MCD], + (instregex "KM(C|F|O|CTR|A)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], + (instregex "(KIMD|KLMD|KMAC)$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], + (instregex "(PCC|PPNO|PRNO)$")>; //===----------------------------------------------------------------------===// // Guarded storage //===----------------------------------------------------------------------===// -def : InstRW<[LSU], (instregex "LGG$")>; -def : InstRW<[LSU, Lat5], (instregex "LLGFSG$")>; -def : InstRW<[LSU, Lat30], (instregex "(L|ST)GSC$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LGG$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLGFSG$")>; +def : InstRW<[WLat30, MCD], (instregex "(L|ST)GSC$")>; //===----------------------------------------------------------------------===// // Decimal arithmetic //===----------------------------------------------------------------------===// -def : InstRW<[FXb, VecDF, VecDF, LSU, LSU, Lat30, GroupAlone], +def : InstRW<[WLat30, RegReadAdv, FXb, VecDF2, LSU2, GroupAlone], (instregex "CVBG$")>; -def : InstRW<[FXb, VecDF, LSU, Lat30, GroupAlone], (instregex "CVB(Y)?$")>; -def : InstRW<[FXb, FXb, FXb, VecDF2, VecDF2, LSU, Lat30, GroupAlone], - (instregex "CVDG$")>; -def : InstRW<[FXb, VecDF, FXb, LSU, Lat30, GroupAlone], (instregex "CVD(Y)?$")>; -def : InstRW<[LSU, Lat10, GroupAlone], (instregex "MVO$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MV(N|Z)$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "(PACK|PKA|PKU)$")>; -def : InstRW<[LSU, Lat12, GroupAlone], (instregex "UNPK(A|U)$")>; -def : InstRW<[FXb, LSU, LSU, Lat9, BeginGroup], (instregex "UNPK$")>; - -def : InstRW<[FXb, VecDFX, LSU, LSU, LSU, Lat9, GroupAlone], +def : InstRW<[WLat30, RegReadAdv, FXb, VecDF, LSU, GroupAlone], + (instregex "CVB(Y)?$")>; +def : InstRW<[WLat1, FXb3, VecDF4, LSU, GroupAlone], (instregex "CVDG$")>; +def : InstRW<[WLat1, FXb2, VecDF, LSU, GroupAlone], (instregex "CVD(Y)?$")>; +def : InstRW<[WLat1, LSU5, GroupAlone], (instregex "MV(N|O|Z)$")>; +def : InstRW<[WLat1, LSU5, GroupAlone], (instregex "(PACK|PKA|PKU)$")>; +def : InstRW<[WLat12, LSU5, GroupAlone], (instregex "UNPK(A|U)$")>; +def : InstRW<[WLat1, FXb, LSU2, Cracked], (instregex "UNPK$")>; + +def : InstRW<[WLat5LSU, FXb, VecDFX, LSU3, GroupAlone], (instregex "(A|S|ZA)P$")>; -def : InstRW<[FXb, VecDFX2, VecDFX2, LSU, LSU, LSU, Lat30, GroupAlone], - (instregex "(M|D)P$")>; -def : InstRW<[FXb, VecDFX, VecDFX, LSU, LSU, Lat15, GroupAlone], - (instregex "SRP$")>; -def : InstRW<[VecDFX, LSU, LSU, Lat5, GroupAlone], (instregex "CP$")>; -def : InstRW<[VecDFX, LSU, Lat4, BeginGroup], (instregex "TP$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "ED(MK)?$")>; +def : InstRW<[WLat1, FXb, VecDFX4, LSU3, GroupAlone], (instregex "(M|D)P$")>; +def : InstRW<[WLat15, FXb, VecDFX2, LSU2, GroupAlone], (instregex "SRP$")>; +def : InstRW<[WLat8, VecDFX, LSU, LSU, GroupAlone], (instregex "CP$")>; +def : InstRW<[WLat3LSU, VecDFX, LSU, Cracked], (instregex "TP$")>; +def : InstRW<[WLat30, MCD], (instregex "ED(MK)?$")>; //===----------------------------------------------------------------------===// // Access registers //===----------------------------------------------------------------------===// // Extract/set/copy access register -def : InstRW<[LSU], (instregex "(EAR|SAR|CPYA)$")>; +def : InstRW<[WLat3, LSU, NormalGr], (instregex "(EAR|SAR|CPYA)$")>; // Load address extended -def : InstRW<[LSU, FXa, Lat5, BeginGroup], (instregex "LAE(Y)?$")>; +def : InstRW<[WLat5, LSU, FXa, Cracked], (instregex "LAE(Y)?$")>; // Load/store access multiple (not modeled precisely) -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "(L|ST)AM(Y)?$")>; +def : InstRW<[WLat20, WLat20, LSU5, GroupAlone], (instregex "LAM(Y)?$")>; +def : InstRW<[WLat1, LSU5, GroupAlone], (instregex "STAM(Y)?$")>; //===----------------------------------------------------------------------===// // Program mask and addressing mode //===----------------------------------------------------------------------===// // Insert Program Mask -def : InstRW<[FXa, Lat3, EndGroup], (instregex "IPM$")>; +def : InstRW<[WLat3, FXa, EndGroup], (instregex "IPM$")>; // Set Program Mask -def : InstRW<[LSU, EndGroup], (instregex "SPM$")>; +def : InstRW<[WLat3, LSU, EndGroup], (instregex "SPM$")>; // Branch and link -def : InstRW<[FXa, FXa, FXb, Lat5, GroupAlone], (instregex "BAL(R)?$")>; +def : InstRW<[WLat1, FXa2, FXb, GroupAlone], (instregex "BAL(R)?$")>; // Test addressing mode -def : InstRW<[FXb], (instregex "TAM$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "TAM$")>; // Set addressing mode -def : InstRW<[FXb, Lat2, EndGroup], (instregex "SAM(24|31|64)$")>; +def : InstRW<[WLat1, FXb, EndGroup], (instregex "SAM(24|31|64)$")>; // Branch (and save) and set mode. -def : InstRW<[FXa, FXb, Lat2, GroupAlone], (instregex "BSM$")>; -def : InstRW<[FXa, FXa, FXb, Lat3, GroupAlone], (instregex "BASSM$")>; +def : InstRW<[WLat1, FXa, FXb, GroupAlone], (instregex "BSM$")>; +def : InstRW<[WLat1, FXa2, FXb, GroupAlone], (instregex "BASSM$")>; //===----------------------------------------------------------------------===// // Transactional execution //===----------------------------------------------------------------------===// // Transaction begin -def : InstRW<[LSU, LSU, FXb, FXb, FXb, FXb, FXb, Lat15, GroupAlone], - (instregex "TBEGIN(C)?$")>; +def : InstRW<[WLat9, LSU2, FXb5, GroupAlone], (instregex "TBEGIN(C)?$")>; // Transaction end -def : InstRW<[FXb, GroupAlone], (instregex "TEND$")>; +def : InstRW<[WLat1, FXb, GroupAlone], (instregex "TEND$")>; // Transaction abort -def : InstRW<[LSU, GroupAlone], (instregex "TABORT$")>; +def : InstRW<[WLat30, MCD], (instregex "TABORT$")>; // Extract Transaction Nesting Depth -def : InstRW<[FXa], (instregex "ETND$")>; +def : InstRW<[WLat1, FXa, NormalGr], (instregex "ETND$")>; // Nontransactional store -def : InstRW<[FXb, LSU, Lat5], (instregex "NTSTG$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "NTSTG$")>; //===----------------------------------------------------------------------===// // Processor assist //===----------------------------------------------------------------------===// -def : InstRW<[FXb, GroupAlone], (instregex "PPA$")>; +def : InstRW<[WLat1, FXb, GroupAlone], (instregex "PPA$")>; //===----------------------------------------------------------------------===// // Miscellaneous Instructions. //===----------------------------------------------------------------------===// // Find leftmost one -def : InstRW<[FXa, FXa, Lat4, GroupAlone], (instregex "FLOGR$")>; +def : InstRW<[WLat5, WLat5, FXa2, GroupAlone], (instregex "FLOGR$")>; // Population count -def : InstRW<[FXa, Lat3], (instregex "POPCNT$")>; +def : InstRW<[WLat3, WLat3, FXa, NormalGr], (instregex "POPCNT$")>; // String instructions -def : InstRW<[FXa, LSU, Lat30], (instregex "SRST$")>; -def : InstRW<[FXa, Lat30], (instregex "SRSTU$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "CUSE$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "SRST(U)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CUSE$")>; // Various complex instructions -def : InstRW<[LSU, Lat30], (instregex "CFC$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "UPT$")>; -def : InstRW<[LSU, Lat30], (instregex "CKSM$")>; -def : InstRW<[FXa, Lat30], (instregex "CMPSC$")>; +def : InstRW<[WLat30, WLat30, WLat30, WLat30, MCD], (instregex "CFC$")>; +def : InstRW<[WLat30, WLat30, WLat30, WLat30, WLat30, WLat30, MCD], + (instregex "UPT$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CKSM$")>; +def : InstRW<[WLat30, WLat30, WLat30, WLat30, MCD], (instregex "CMPSC$")>; // Execute -def : InstRW<[FXb, GroupAlone], (instregex "EX(RL)?$")>; +def : InstRW<[WLat1, FXb, GroupAlone], (instregex "EX(RL)?$")>; //===----------------------------------------------------------------------===// // .insn directive instructions @@ -728,155 +803,154 @@ //===----------------------------------------------------------------------===// // Load zero -def : InstRW<[FXb], (instregex "LZ(DR|ER)$")>; -def : InstRW<[FXb, FXb, Lat2, BeginGroup], (instregex "LZXR$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "LZ(DR|ER)$")>; +def : InstRW<[WLat2, FXb2, Cracked], (instregex "LZXR$")>; // Load -def : InstRW<[VecXsPm], (instregex "LER$")>; -def : InstRW<[FXb], (instregex "LD(R|R32|GR)$")>; -def : InstRW<[FXb, Lat3], (instregex "LGDR$")>; -def : InstRW<[FXb, FXb, Lat2, GroupAlone], (instregex "LXR$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "LER$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "LD(R|R32|GR)$")>; +def : InstRW<[WLat3, FXb, NormalGr], (instregex "LGDR$")>; +def : InstRW<[WLat2, FXb2, GroupAlone], (instregex "LXR$")>; // Load and Test -def : InstRW<[VecXsPm, Lat4], (instregex "LT(D|E)BR$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "LTEBRCompare$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "LTDBRCompare$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "LTXBR$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "LTXBRCompare$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "LT(E|D)BR$")>; +def : InstRW<[WLat3, VecXsPm, NormalGr], (instregex "LT(E|D)BRCompare$")>; +def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], + (instregex "LTXBR(Compare)?$")>; // Copy sign -def : InstRW<[VecXsPm], (instregex "CPSDRd(d|s)$")>; -def : InstRW<[VecXsPm], (instregex "CPSDRs(d|s)$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "CPSDR(d|s)(d|s)$")>; //===----------------------------------------------------------------------===// // FP: Load instructions //===----------------------------------------------------------------------===// -def : InstRW<[VecXsPm, LSU, Lat7], (instregex "LE(Y)?$")>; -def : InstRW<[LSU], (instregex "LD(Y|E32)?$")>; -def : InstRW<[LSU], (instregex "LX$")>; +def : InstRW<[WLat2LSU, VecXsPm, LSU, NormalGr], (instregex "LE(Y)?$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LD(Y|E32)?$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LX$")>; //===----------------------------------------------------------------------===// // FP: Store instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb, LSU, Lat7], (instregex "STD(Y)?$")>; -def : InstRW<[FXb, LSU, Lat7], (instregex "STE(Y)?$")>; -def : InstRW<[FXb, LSU, Lat5], (instregex "STX$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "ST(E|D)(Y)?$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "STX$")>; //===----------------------------------------------------------------------===// // FP: Conversion instructions //===----------------------------------------------------------------------===// // Load rounded -def : InstRW<[VecBF], (instregex "LEDBR(A)?$")>; -def : InstRW<[VecDF, VecDF, Lat20], (instregex "LEXBR(A)?$")>; -def : InstRW<[VecDF, VecDF, Lat20], (instregex "LDXBR(A)?$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "LEDBR(A)?$")>; +def : InstRW<[WLat9, VecDF2, NormalGr], (instregex "L(E|D)XBR(A)?$")>; // Load lengthened -def : InstRW<[VecBF, LSU, Lat12], (instregex "LDEB$")>; -def : InstRW<[VecBF], (instregex "LDEBR$")>; -def : InstRW<[VecBF2, VecBF2, LSU, Lat12 , GroupAlone], (instregex "LX(D|E)B$")>; -def : InstRW<[VecBF2, VecBF2, GroupAlone], (instregex "LX(D|E)BR$")>; +def : InstRW<[WLat7LSU, VecBF, LSU, NormalGr], (instregex "LDEB$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "LDEBR$")>; +def : InstRW<[WLat8LSU, VecBF4, LSU, GroupAlone], (instregex "LX(E|D)B$")>; +def : InstRW<[WLat8, VecBF4, GroupAlone], (instregex "LX(E|D)BR$")>; // Convert from fixed / logical -def : InstRW<[FXb, VecBF, Lat9, BeginGroup], (instregex "CE(F|G)BR(A)?$")>; -def : InstRW<[FXb, VecBF, Lat9, BeginGroup], (instregex "CD(F|G)BR(A)?$")>; -def : InstRW<[FXb, VecDF2, VecDF2, Lat12, GroupAlone], (instregex "CX(F|G)BR(A)?$")>; -def : InstRW<[FXb, VecBF, Lat9, BeginGroup], (instregex "CEL(F|G)BR$")>; -def : InstRW<[FXb, VecBF, Lat9, BeginGroup], (instregex "CDL(F|G)BR$")>; -def : InstRW<[FXb, VecDF2, VecDF2, Lat12, GroupAlone], (instregex "CXL(F|G)BR$")>; +def : InstRW<[WLat8, FXb, VecBF, Cracked], (instregex "C(E|D)(F|G)BR(A)?$")>; +def : InstRW<[WLat11, FXb, VecDF4, GroupAlone], (instregex "CX(F|G)BR(A)?$")>; +def : InstRW<[WLat8, FXb, VecBF, Cracked], (instregex "C(E|D)L(F|G)BR$")>; +def : InstRW<[WLat11, FXb, VecDF4, GroupAlone], (instregex "CXL(F|G)BR$")>; // Convert to fixed / logical -def : InstRW<[FXb, VecBF, Lat11, BeginGroup], (instregex "CF(E|D)BR(A)?$")>; -def : InstRW<[FXb, VecBF, Lat11, BeginGroup], (instregex "CG(E|D)BR(A)?$")>; -def : InstRW<[FXb, VecDF, VecDF, Lat20, BeginGroup], (instregex "C(F|G)XBR(A)?$")>; -def : InstRW<[FXb, VecBF, Lat11, GroupAlone], (instregex "CLFEBR$")>; -def : InstRW<[FXb, VecBF, Lat11, BeginGroup], (instregex "CLFDBR$")>; -def : InstRW<[FXb, VecBF, Lat11, BeginGroup], (instregex "CLG(E|D)BR$")>; -def : InstRW<[FXb, VecDF, VecDF, Lat20, BeginGroup], (instregex "CL(F|G)XBR$")>; +def : InstRW<[WLat10, WLat10, FXb, VecBF, Cracked], + (instregex "C(F|G)(E|D)BR(A)?$")>; +def : InstRW<[WLat12, WLat12, FXb, VecDF2, Cracked], + (instregex "C(F|G)XBR(A)?$")>; +def : InstRW<[WLat10, WLat10, FXb, VecBF, GroupAlone], (instregex "CLFEBR$")>; +def : InstRW<[WLat10, WLat10, FXb, VecBF, Cracked], (instregex "CLFDBR$")>; +def : InstRW<[WLat10, WLat10, FXb, VecBF, Cracked], (instregex "CLG(E|D)BR$")>; +def : InstRW<[WLat12, WLat12, FXb, VecDF2, Cracked], (instregex "CL(F|G)XBR$")>; //===----------------------------------------------------------------------===// // FP: Unary arithmetic //===----------------------------------------------------------------------===// // Load Complement / Negative / Positive -def : InstRW<[VecXsPm, Lat4], (instregex "L(C|N|P)DBR$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "L(C|N|P)EBR$")>; -def : InstRW<[FXb], (instregex "LCDFR(_32)?$")>; -def : InstRW<[FXb], (instregex "LNDFR(_32)?$")>; -def : InstRW<[FXb], (instregex "LPDFR(_32)?$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "L(C|N|P)XBR$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "L(C|N|P)(E|D)BR$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "L(C|N|P)DFR(_32)?$")>; +def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "L(C|N|P)XBR$")>; // Square root -def : InstRW<[VecFPd, LSU], (instregex "SQ(E|D)B$")>; -def : InstRW<[VecFPd], (instregex "SQ(E|D)BR$")>; -def : InstRW<[VecFPd, VecFPd, GroupAlone], (instregex "SQXBR$")>; +def : InstRW<[WLat30, VecFPd, LSU, NormalGr], (instregex "SQ(E|D)B$")>; +def : InstRW<[WLat30, VecFPd, NormalGr], (instregex "SQ(E|D)BR$")>; +def : InstRW<[WLat30, VecFPd, GroupAlone], (instregex "SQXBR$")>; // Load FP integer -def : InstRW<[VecBF], (instregex "FIEBR(A)?$")>; -def : InstRW<[VecBF], (instregex "FIDBR(A)?$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "FIXBR(A)?$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "FI(E|D)BR(A)?$")>; +def : InstRW<[WLat10, VecDF4, GroupAlone], (instregex "FIXBR(A)?$")>; //===----------------------------------------------------------------------===// // FP: Binary arithmetic //===----------------------------------------------------------------------===// // Addition -def : InstRW<[VecBF, LSU, Lat12], (instregex "A(E|D)B$")>; -def : InstRW<[VecBF], (instregex "A(E|D)BR$")>; -def : InstRW<[VecDF2, VecDF2, Lat10, GroupAlone], (instregex "AXBR$")>; +def : InstRW<[WLat7LSU, WLat7LSU, RegReadAdv, VecBF, LSU, NormalGr], + (instregex "A(E|D)B$")>; +def : InstRW<[WLat7, WLat7, VecBF, NormalGr], (instregex "A(E|D)BR$")>; +def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "AXBR$")>; // Subtraction -def : InstRW<[VecBF, LSU, Lat12], (instregex "S(E|D)B$")>; -def : InstRW<[VecBF], (instregex "S(E|D)BR$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "SXBR$")>; +def : InstRW<[WLat7LSU, WLat7LSU, RegReadAdv, VecBF, LSU, NormalGr], + (instregex "S(E|D)B$")>; +def : InstRW<[WLat7, WLat7, VecBF, NormalGr], (instregex "S(E|D)BR$")>; +def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "SXBR$")>; // Multiply -def : InstRW<[VecBF, LSU, Lat12], (instregex "M(D|DE|EE)B$")>; -def : InstRW<[VecBF], (instregex "M(D|DE|EE)BR$")>; -def : InstRW<[VecBF2, VecBF2, LSU, Lat12, GroupAlone], (instregex "MXDB$")>; -def : InstRW<[VecBF2, VecBF2, GroupAlone], (instregex "MXDBR$")>; -def : InstRW<[VecDF2, VecDF2, Lat20, GroupAlone], (instregex "MXBR$")>; +def : InstRW<[WLat7LSU, RegReadAdv, VecBF, LSU, NormalGr], + (instregex "M(D|DE|EE)B$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "M(D|DE|EE)BR$")>; +def : InstRW<[WLat8LSU, RegReadAdv, VecBF4, LSU, GroupAlone], + (instregex "MXDB$")>; +def : InstRW<[WLat8, VecBF4, GroupAlone], (instregex "MXDBR$")>; +def : InstRW<[WLat20, VecDF4, GroupAlone], (instregex "MXBR$")>; // Multiply and add / subtract -def : InstRW<[VecBF2, LSU, Lat12, GroupAlone], (instregex "M(A|S)EB$")>; -def : InstRW<[VecBF, GroupAlone], (instregex "M(A|S)EBR$")>; -def : InstRW<[VecBF2, LSU, Lat12, GroupAlone], (instregex "M(A|S)DB$")>; -def : InstRW<[VecBF], (instregex "M(A|S)DBR$")>; +def : InstRW<[WLat7LSU, RegReadAdv, RegReadAdv, VecBF2, LSU, GroupAlone], + (instregex "M(A|S)EB$")>; +def : InstRW<[WLat7, VecBF, GroupAlone], (instregex "M(A|S)EBR$")>; +def : InstRW<[WLat7LSU, RegReadAdv, RegReadAdv, VecBF2, LSU, GroupAlone], + (instregex "M(A|S)DB$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "M(A|S)DBR$")>; // Division -def : InstRW<[VecFPd, LSU], (instregex "D(E|D)B$")>; -def : InstRW<[VecFPd], (instregex "D(E|D)BR$")>; -def : InstRW<[VecFPd, VecFPd, GroupAlone], (instregex "DXBR$")>; +def : InstRW<[WLat30, RegReadAdv, VecFPd, LSU, NormalGr], + (instregex "D(E|D)B$")>; +def : InstRW<[WLat30, VecFPd, NormalGr], (instregex "D(E|D)BR$")>; +def : InstRW<[WLat30, VecFPd, GroupAlone], (instregex "DXBR$")>; // Divide to integer -def : InstRW<[VecFPd, Lat30], (instregex "DI(E|D)BR$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "DI(E|D)BR$")>; //===----------------------------------------------------------------------===// // FP: Comparisons //===----------------------------------------------------------------------===// // Compare -def : InstRW<[VecXsPm, LSU, Lat8], (instregex "(K|C)(E|D)B$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "(K|C)(E|D)BR$")>; -def : InstRW<[VecDF, VecDF, Lat20, GroupAlone], (instregex "(K|C)XBR$")>; +def : InstRW<[WLat3LSU, RegReadAdv, VecXsPm, LSU, NormalGr], + (instregex "(K|C)(E|D)B$")>; +def : InstRW<[WLat3, VecXsPm, NormalGr], (instregex "(K|C)(E|D)BR$")>; +def : InstRW<[WLat9, VecDF2, GroupAlone], (instregex "(K|C)XBR$")>; // Test Data Class -def : InstRW<[LSU, VecXsPm, Lat9], (instregex "TC(E|D)B$")>; -def : InstRW<[LSU, VecDF2, VecDF2, Lat15, GroupAlone], (instregex "TCXB$")>; +def : InstRW<[WLat5, LSU, VecXsPm, NormalGr], (instregex "TC(E|D)B$")>; +def : InstRW<[WLat10, LSU2, VecDF4, GroupAlone], (instregex "TCXB$")>; //===----------------------------------------------------------------------===// // FP: Floating-point control register instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXa, LSU, Lat4, GroupAlone], (instregex "EFPC$")>; -def : InstRW<[FXb, LSU, Lat5, GroupAlone], (instregex "STFPC$")>; -def : InstRW<[LSU, Lat3, GroupAlone], (instregex "SFPC$")>; -def : InstRW<[LSU, LSU, Lat6, GroupAlone], (instregex "LFPC$")>; -def : InstRW<[FXa, Lat30], (instregex "SFASR$")>; -def : InstRW<[FXa, LSU, Lat30], (instregex "LFAS$")>; -def : InstRW<[FXb, Lat3, GroupAlone], (instregex "SRNM(B|T)?$")>; +def : InstRW<[WLat4, FXa, LSU, GroupAlone], (instregex "EFPC$")>; +def : InstRW<[WLat1, FXb, LSU, GroupAlone], (instregex "STFPC$")>; +def : InstRW<[WLat3, LSU, GroupAlone], (instregex "SFPC$")>; +def : InstRW<[WLat3LSU, LSU2, GroupAlone], (instregex "LFPC$")>; +def : InstRW<[WLat30, MCD], (instregex "SFASR$")>; +def : InstRW<[WLat30, MCD], (instregex "LFAS$")>; +def : InstRW<[WLat3, FXb, GroupAlone], (instregex "SRNM(B|T)?$")>; // --------------------- Hexadecimal floating point ------------------------- // @@ -886,108 +960,111 @@ //===----------------------------------------------------------------------===// // Load and Test -def : InstRW<[VecXsPm, Lat4], (instregex "LT(D|E)R$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "LTXR$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "LT(E|D)R$")>; +def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "LTXR$")>; //===----------------------------------------------------------------------===// // HFP: Conversion instructions //===----------------------------------------------------------------------===// // Load rounded -def : InstRW<[VecBF], (instregex "(LEDR|LRER)$")>; -def : InstRW<[VecBF], (instregex "LEXR$")>; -def : InstRW<[VecDF2], (instregex "(LDXR|LRDR)$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "(LEDR|LRER)$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "LEXR$")>; +def : InstRW<[WLat9, VecDF2, NormalGr], (instregex "(LDXR|LRDR)$")>; // Load lengthened -def : InstRW<[LSU], (instregex "LDE$")>; -def : InstRW<[FXb], (instregex "LDER$")>; -def : InstRW<[VecBF2, VecBF2, LSU, Lat12, GroupAlone], (instregex "LX(D|E)$")>; -def : InstRW<[VecBF2, VecBF2, GroupAlone], (instregex "LX(D|E)R$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LDE$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "LDER$")>; +def : InstRW<[WLat8LSU, VecBF4, LSU, GroupAlone], (instregex "LX(E|D)$")>; +def : InstRW<[WLat8, VecBF4, GroupAlone], (instregex "LX(E|D)R$")>; // Convert from fixed -def : InstRW<[FXb, VecBF, Lat9, BeginGroup], (instregex "CE(F|G)R$")>; -def : InstRW<[FXb, VecBF, Lat9, BeginGroup], (instregex "CD(F|G)R$")>; -def : InstRW<[FXb, VecDF2, VecDF2, Lat12, GroupAlone], (instregex "CX(F|G)R$")>; +def : InstRW<[WLat8, FXb, VecBF, Cracked], (instregex "C(E|D)(F|G)R$")>; +def : InstRW<[WLat11, FXb, VecDF4, GroupAlone], (instregex "CX(F|G)R$")>; // Convert to fixed -def : InstRW<[FXb, VecBF, Lat11, BeginGroup], (instregex "CF(E|D)R$")>; -def : InstRW<[FXb, VecBF, Lat11, BeginGroup], (instregex "CG(E|D)R$")>; -def : InstRW<[FXb, VecDF, VecDF, Lat20, BeginGroup], (instregex "C(F|G)XR$")>; +def : InstRW<[WLat10, WLat10, FXb, VecBF, Cracked], (instregex "C(F|G)(E|D)R$")>; +def : InstRW<[WLat12, WLat12, FXb, VecDF2, Cracked], (instregex "C(F|G)XR$")>; // Convert BFP to HFP / HFP to BFP. -def : InstRW<[VecBF], (instregex "THD(E)?R$")>; -def : InstRW<[VecBF], (instregex "TB(E)?DR$")>; +def : InstRW<[WLat7, WLat7, VecBF, NormalGr], (instregex "THD(E)?R$")>; +def : InstRW<[WLat7, WLat7, VecBF, NormalGr], (instregex "TB(E)?DR$")>; //===----------------------------------------------------------------------===// // HFP: Unary arithmetic //===----------------------------------------------------------------------===// // Load Complement / Negative / Positive -def : InstRW<[VecXsPm, Lat4], (instregex "L(C|N|P)DR$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "L(C|N|P)ER$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "L(C|N|P)XR$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "L(C|N|P)(E|D)R$")>; +def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "L(C|N|P)XR$")>; // Halve -def : InstRW<[VecBF], (instregex "H(E|D)R$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "H(E|D)R$")>; // Square root -def : InstRW<[VecFPd, LSU], (instregex "SQ(E|D)$")>; -def : InstRW<[VecFPd], (instregex "SQ(E|D)R$")>; -def : InstRW<[VecFPd, VecFPd, GroupAlone], (instregex "SQXR$")>; +def : InstRW<[WLat30, VecFPd, LSU, NormalGr], (instregex "SQ(E|D)$")>; +def : InstRW<[WLat30, VecFPd, NormalGr], (instregex "SQ(E|D)R$")>; +def : InstRW<[WLat30, VecFPd, GroupAlone], (instregex "SQXR$")>; // Load FP integer -def : InstRW<[VecBF], (instregex "FIER$")>; -def : InstRW<[VecBF], (instregex "FIDR$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "FIXR$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "FI(E|D)R$")>; +def : InstRW<[WLat10, VecDF4, GroupAlone], (instregex "FIXR$")>; //===----------------------------------------------------------------------===// // HFP: Binary arithmetic //===----------------------------------------------------------------------===// // Addition -def : InstRW<[VecBF, LSU, Lat12], (instregex "A(E|D|U|W)$")>; -def : InstRW<[VecBF], (instregex "A(E|D|U|W)R$")>; -def : InstRW<[VecDF2, VecDF2, Lat10, GroupAlone], (instregex "AXR$")>; +def : InstRW<[WLat7LSU, WLat7LSU, RegReadAdv, VecBF, LSU, NormalGr], + (instregex "A(E|D|U|W)$")>; +def : InstRW<[WLat7, WLat7, VecBF, NormalGr], (instregex "A(E|D|U|W)R$")>; +def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "AXR$")>; // Subtraction -def : InstRW<[VecBF, LSU, Lat12], (instregex "S(E|D|U|W)$")>; -def : InstRW<[VecBF], (instregex "S(E|D|U|W)R$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "SXR$")>; +def : InstRW<[WLat7LSU, WLat7LSU, RegReadAdv, VecBF, LSU, NormalGr], + (instregex "S(E|D|U|W)$")>; +def : InstRW<[WLat7, WLat7, VecBF, NormalGr], (instregex "S(E|D|U|W)R$")>; +def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "SXR$")>; // Multiply -def : InstRW<[VecBF, LSU, Lat12], (instregex "M(D|DE|E|EE)$")>; -def : InstRW<[VecBF], (instregex "M(D|DE|E|EE)R$")>; -def : InstRW<[VecBF2, VecBF2, LSU, Lat12, GroupAlone], (instregex "MXD$")>; -def : InstRW<[VecBF2, VecBF2, GroupAlone], (instregex "MXDR$")>; -def : InstRW<[VecDF2, VecDF2, Lat20, GroupAlone], (instregex "MXR$")>; -def : InstRW<[VecBF2, VecBF2, LSU, Lat12, GroupAlone], (instregex "MY$")>; -def : InstRW<[VecBF2, LSU, Lat12, GroupAlone], (instregex "MY(H|L)$")>; -def : InstRW<[VecBF2, VecBF2, GroupAlone], (instregex "MYR$")>; -def : InstRW<[VecBF, GroupAlone], (instregex "MY(H|L)R$")>; +def : InstRW<[WLat7LSU, RegReadAdv, VecBF, LSU, NormalGr], + (instregex "M(D|DE|E|EE)$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "M(D|DE|E|EE)R$")>; +def : InstRW<[WLat8LSU, RegReadAdv, VecBF4, LSU, GroupAlone], + (instregex "MXD$")>; +def : InstRW<[WLat8, VecBF4, GroupAlone], (instregex "MXDR$")>; +def : InstRW<[WLat30, VecDF4, GroupAlone], (instregex "MXR$")>; +def : InstRW<[WLat8LSU, RegReadAdv, VecBF4, LSU, GroupAlone], (instregex "MY$")>; +def : InstRW<[WLat7LSU, RegReadAdv, VecBF2, LSU, GroupAlone], + (instregex "MY(H|L)$")>; +def : InstRW<[WLat8, VecBF4, GroupAlone], (instregex "MYR$")>; +def : InstRW<[WLat7, VecBF, GroupAlone], (instregex "MY(H|L)R$")>; // Multiply and add / subtract -def : InstRW<[VecBF2, LSU, Lat12, GroupAlone], (instregex "M(A|S)E$")>; -def : InstRW<[VecBF, GroupAlone], (instregex "M(A|S)ER$")>; -def : InstRW<[VecBF2, LSU, Lat12, GroupAlone], (instregex "M(A|S)D$")>; -def : InstRW<[VecBF, GroupAlone], (instregex "M(A|S)DR$")>; -def : InstRW<[VecBF2, LSU, Lat12, GroupAlone], (instregex "MAY(H|L)$")>; -def : InstRW<[VecBF2, VecBF2, LSU, Lat12, GroupAlone], (instregex "MAY$")>; -def : InstRW<[VecBF, GroupAlone], (instregex "MAY(H|L)R$")>; -def : InstRW<[VecBF2, VecBF2, GroupAlone], (instregex "MAYR$")>; +def : InstRW<[WLat7LSU, RegReadAdv, RegReadAdv, VecBF2, LSU, GroupAlone], + (instregex "M(A|S)(E|D)$")>; +def : InstRW<[WLat7, VecBF, GroupAlone], (instregex "M(A|S)(E|D)R$")>; +def : InstRW<[WLat8LSU, RegReadAdv, RegReadAdv, VecBF4, LSU, GroupAlone], + (instregex "MAY$")>; +def : InstRW<[WLat7LSU, RegReadAdv, RegReadAdv, VecBF2, LSU, GroupAlone], + (instregex "MAY(H|L)$")>; +def : InstRW<[WLat8, VecBF4, GroupAlone], (instregex "MAYR$")>; +def : InstRW<[WLat7, VecBF, GroupAlone], (instregex "MAY(H|L)R$")>; // Division -def : InstRW<[VecFPd, LSU], (instregex "D(E|D)$")>; -def : InstRW<[VecFPd], (instregex "D(E|D)R$")>; -def : InstRW<[VecFPd, VecFPd, GroupAlone], (instregex "DXR$")>; +def : InstRW<[WLat30, RegReadAdv, VecFPd, LSU, NormalGr], (instregex "D(E|D)$")>; +def : InstRW<[WLat30, VecFPd, NormalGr], (instregex "D(E|D)R$")>; +def : InstRW<[WLat30, VecFPd, GroupAlone], (instregex "DXR$")>; //===----------------------------------------------------------------------===// // HFP: Comparisons //===----------------------------------------------------------------------===// // Compare -def : InstRW<[VecBF, LSU, Lat12], (instregex "C(E|D)$")>; -def : InstRW<[VecBF], (instregex "C(E|D)R$")>; -def : InstRW<[VecDF, VecDF, Lat20, GroupAlone], (instregex "CXR$")>; +def : InstRW<[WLat7LSU, RegReadAdv, VecBF, LSU, NormalGr], + (instregex "C(E|D)$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "C(E|D)R$")>; +def : InstRW<[WLat10, VecDF2, GroupAlone], (instregex "CXR$")>; // ------------------------ Decimal floating point -------------------------- // @@ -997,121 +1074,123 @@ //===----------------------------------------------------------------------===// // Load and Test -def : InstRW<[VecDF], (instregex "LTDTR$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "LTXTR$")>; +def : InstRW<[WLat8, WLat8, VecDF, NormalGr], (instregex "LTDTR$")>; +def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "LTXTR$")>; //===----------------------------------------------------------------------===// // DFP: Conversion instructions //===----------------------------------------------------------------------===// // Load rounded -def : InstRW<[VecDF, Lat15], (instregex "LEDTR$")>; -def : InstRW<[VecDF, VecDF, Lat20], (instregex "LDXTR$")>; +def : InstRW<[WLat15, VecDF, NormalGr], (instregex "LEDTR$")>; +def : InstRW<[WLat15, VecDF2, NormalGr], (instregex "LDXTR$")>; // Load lengthened -def : InstRW<[VecDF], (instregex "LDETR$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "LXDTR$")>; +def : InstRW<[WLat8, VecDF, NormalGr], (instregex "LDETR$")>; +def : InstRW<[WLat10, VecDF4, GroupAlone], (instregex "LXDTR$")>; // Convert from fixed / logical -def : InstRW<[FXb, VecDF, Lat30, BeginGroup], (instregex "CD(F|G)TR(A)?$")>; -def : InstRW<[FXb, VecDF2, VecDF2, Lat30, GroupAlone], (instregex "CX(F|G)TR(A)?$")>; -def : InstRW<[FXb, VecDF, Lat30, BeginGroup], (instregex "CDL(F|G)TR$")>; -def : InstRW<[FXb, VecDF2, VecDF2, Lat30, GroupAlone], (instregex "CXL(F|G)TR$")>; +def : InstRW<[WLat30, FXb, VecDF, Cracked], (instregex "CD(F|G)TR(A)?$")>; +def : InstRW<[WLat30, FXb, VecDF4, GroupAlone], (instregex "CX(F|G)TR(A)?$")>; +def : InstRW<[WLat30, FXb, VecDF, Cracked], (instregex "CDL(F|G)TR$")>; +def : InstRW<[WLat30, FXb, VecDF4, GroupAlone], (instregex "CXL(F|G)TR$")>; // Convert to fixed / logical -def : InstRW<[FXb, VecDF, Lat30, BeginGroup], (instregex "C(F|G)DTR(A)?$")>; -def : InstRW<[FXb, VecDF, VecDF, Lat30, BeginGroup], (instregex "C(F|G)XTR(A)?$")>; -def : InstRW<[FXb, VecDF, Lat30, BeginGroup], (instregex "CL(F|G)DTR$")>; -def : InstRW<[FXb, VecDF, VecDF, Lat30, BeginGroup], (instregex "CL(F|G)XTR$")>; +def : InstRW<[WLat30, WLat30, FXb, VecDF, Cracked], + (instregex "C(F|G)DTR(A)?$")>; +def : InstRW<[WLat30, WLat30, FXb, VecDF2, Cracked], + (instregex "C(F|G)XTR(A)?$")>; +def : InstRW<[WLat30, WLat30, FXb, VecDF, Cracked], (instregex "CL(F|G)DTR$")>; +def : InstRW<[WLat30, WLat30, FXb, VecDF2, Cracked], (instregex "CL(F|G)XTR$")>; // Convert from / to signed / unsigned packed -def : InstRW<[FXb, VecDF, Lat9, BeginGroup], (instregex "CD(S|U)TR$")>; -def : InstRW<[FXb, FXb, VecDF2, VecDF2, Lat15, GroupAlone], (instregex "CX(S|U)TR$")>; -def : InstRW<[FXb, VecDF, Lat12, BeginGroup], (instregex "C(S|U)DTR$")>; -def : InstRW<[FXb, FXb, VecDF2, VecDF2, Lat15, GroupAlone], (instregex "C(S|U)XTR$")>; +def : InstRW<[WLat9, FXb, VecDF, Cracked], (instregex "CD(S|U)TR$")>; +def : InstRW<[WLat12, FXb2, VecDF4, GroupAlone], (instregex "CX(S|U)TR$")>; +def : InstRW<[WLat11, FXb, VecDF, Cracked], (instregex "C(S|U)DTR$")>; +def : InstRW<[WLat15, FXb2, VecDF4, GroupAlone], (instregex "C(S|U)XTR$")>; // Convert from / to zoned -def : InstRW<[LSU, VecDF, Lat11, BeginGroup], (instregex "CDZT$")>; -def : InstRW<[LSU, LSU, VecDF2, VecDF2, Lat15, GroupAlone], (instregex "CXZT$")>; -def : InstRW<[FXb, LSU, VecDF, Lat11, BeginGroup], (instregex "CZDT$")>; -def : InstRW<[FXb, LSU, VecDF, VecDF, Lat15, GroupAlone], (instregex "CZXT$")>; +def : InstRW<[WLat8LSU, LSU, VecDF, Cracked], (instregex "CDZT$")>; +def : InstRW<[WLat16LSU, LSU2, VecDF4, GroupAlone], (instregex "CXZT$")>; +def : InstRW<[WLat1, FXb, LSU, VecDF, Cracked], (instregex "CZDT$")>; +def : InstRW<[WLat1, FXb, LSU, VecDF2, GroupAlone], (instregex "CZXT$")>; // Convert from / to packed -def : InstRW<[LSU, VecDF, Lat11, BeginGroup], (instregex "CDPT$")>; -def : InstRW<[LSU, LSU, VecDF2, VecDF2, Lat15, GroupAlone], (instregex "CXPT$")>; -def : InstRW<[FXb, LSU, VecDF, Lat11, BeginGroup], (instregex "CPDT$")>; -def : InstRW<[FXb, LSU, VecDF, VecDF, Lat15, GroupAlone], (instregex "CPXT$")>; +def : InstRW<[WLat8LSU, LSU, VecDF, Cracked], (instregex "CDPT$")>; +def : InstRW<[WLat16LSU, LSU2, VecDF4, GroupAlone], (instregex "CXPT$")>; +def : InstRW<[WLat1, FXb, LSU, VecDF, Cracked], (instregex "CPDT$")>; +def : InstRW<[WLat1, FXb, LSU, VecDF2, GroupAlone], (instregex "CPXT$")>; // Perform floating-point operation -def : InstRW<[FXb, Lat30], (instregex "PFPO$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "PFPO$")>; //===----------------------------------------------------------------------===// // DFP: Unary arithmetic //===----------------------------------------------------------------------===// // Load FP integer -def : InstRW<[VecDF], (instregex "FIDTR$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "FIXTR$")>; +def : InstRW<[WLat8, VecDF, NormalGr], (instregex "FIDTR$")>; +def : InstRW<[WLat10, VecDF4, GroupAlone], (instregex "FIXTR$")>; // Extract biased exponent -def : InstRW<[FXb, VecDF, Lat12, BeginGroup], (instregex "EEDTR$")>; -def : InstRW<[FXb, VecDF, Lat12, BeginGroup], (instregex "EEXTR$")>; +def : InstRW<[WLat11, FXb, VecDF, Cracked], (instregex "EEDTR$")>; +def : InstRW<[WLat11, FXb, VecDF, Cracked], (instregex "EEXTR$")>; // Extract significance -def : InstRW<[FXb, VecDF, Lat12, BeginGroup], (instregex "ESDTR$")>; -def : InstRW<[FXb, VecDF, VecDF, Lat15, BeginGroup], (instregex "ESXTR$")>; +def : InstRW<[WLat11, FXb, VecDF, Cracked], (instregex "ESDTR$")>; +def : InstRW<[WLat12, FXb, VecDF2, Cracked], (instregex "ESXTR$")>; //===----------------------------------------------------------------------===// // DFP: Binary arithmetic //===----------------------------------------------------------------------===// // Addition -def : InstRW<[VecDF], (instregex "ADTR(A)?$")>; -def : InstRW<[VecDF2, VecDF2, Lat10, GroupAlone], (instregex "AXTR(A)?$")>; +def : InstRW<[WLat8, WLat8, VecDF, NormalGr], (instregex "ADTR(A)?$")>; +def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "AXTR(A)?$")>; // Subtraction -def : InstRW<[VecDF], (instregex "SDTR(A)?$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "SXTR(A)?$")>; +def : InstRW<[WLat8, WLat8, VecDF, NormalGr], (instregex "SDTR(A)?$")>; +def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "SXTR(A)?$")>; // Multiply -def : InstRW<[VecDF, Lat30], (instregex "MDTR(A)?$")>; -def : InstRW<[VecDF2, VecDF2, Lat30, GroupAlone], (instregex "MXTR(A)?$")>; +def : InstRW<[WLat30, VecDF, NormalGr], (instregex "MDTR(A)?$")>; +def : InstRW<[WLat30, VecDF4, GroupAlone], (instregex "MXTR(A)?$")>; // Division -def : InstRW<[VecDF, Lat30], (instregex "DDTR(A)?$")>; -def : InstRW<[VecDF2, VecDF2, Lat30, GroupAlone], (instregex "DXTR(A)?$")>; +def : InstRW<[WLat30, VecDF, NormalGr], (instregex "DDTR(A)?$")>; +def : InstRW<[WLat30, VecDF4, GroupAlone], (instregex "DXTR(A)?$")>; // Quantize -def : InstRW<[VecDF], (instregex "QADTR$")>; -def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "QAXTR$")>; +def : InstRW<[WLat8, WLat8, VecDF, NormalGr], (instregex "QADTR$")>; +def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "QAXTR$")>; // Reround -def : InstRW<[FXb, VecDF, Lat11, BeginGroup], (instregex "RRDTR$")>; -def : InstRW<[FXb, VecDF2, VecDF2, Lat15, GroupAlone], (instregex "RRXTR$")>; +def : InstRW<[WLat9, WLat9, FXb, VecDF, Cracked], (instregex "RRDTR$")>; +def : InstRW<[WLat11, WLat11, FXb, VecDF4, GroupAlone], (instregex "RRXTR$")>; // Shift significand left/right -def : InstRW<[LSU, VecDF, Lat11, GroupAlone], (instregex "S(L|R)DT$")>; -def : InstRW<[LSU, VecDF2, VecDF2, Lat15, GroupAlone], (instregex "S(L|R)XT$")>; +def : InstRW<[WLat11LSU, LSU, VecDF, GroupAlone], (instregex "S(L|R)DT$")>; +def : InstRW<[WLat11LSU, LSU, VecDF4, GroupAlone], (instregex "S(L|R)XT$")>; // Insert biased exponent -def : InstRW<[FXb, VecDF, Lat11, BeginGroup], (instregex "IEDTR$")>; -def : InstRW<[FXb, VecDF2, VecDF2, Lat15, GroupAlone], (instregex "IEXTR$")>; +def : InstRW<[WLat9, FXb, VecDF, Cracked], (instregex "IEDTR$")>; +def : InstRW<[WLat11, FXb, VecDF4, GroupAlone], (instregex "IEXTR$")>; //===----------------------------------------------------------------------===// // DFP: Comparisons //===----------------------------------------------------------------------===// // Compare -def : InstRW<[VecDF], (instregex "(K|C)DTR$")>; -def : InstRW<[VecDF, VecDF, Lat11, GroupAlone], (instregex "(K|C)XTR$")>; +def : InstRW<[WLat8, VecDF, NormalGr], (instregex "(K|C)DTR$")>; +def : InstRW<[WLat9, VecDF2, GroupAlone], (instregex "(K|C)XTR$")>; // Compare biased exponent -def : InstRW<[VecDF], (instregex "CEDTR$")>; -def : InstRW<[VecDF], (instregex "CEXTR$")>; +def : InstRW<[WLat8, VecDF, NormalGr], (instregex "CEDTR$")>; +def : InstRW<[WLat8, VecDF, NormalGr], (instregex "CEXTR$")>; // Test Data Class/Group -def : InstRW<[LSU, VecDF, Lat11], (instregex "TD(C|G)(E|D)T$")>; -def : InstRW<[LSU, VecDF, VecDF, Lat15, GroupAlone], (instregex "TD(C|G)XT$")>; +def : InstRW<[WLat15, LSU, VecDF, NormalGr], (instregex "TD(C|G)(E|D)T$")>; +def : InstRW<[WLat15, LSU, VecDF2, GroupAlone], (instregex "TD(C|G)XT$")>; // --------------------------------- Vector --------------------------------- // @@ -1120,298 +1199,307 @@ // Vector: Move instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb], (instregex "VLR(32|64)?$")>; -def : InstRW<[FXb, Lat4], (instregex "VLGV(B|F|G|H)?$")>; -def : InstRW<[FXb], (instregex "VLVG(B|F|G|H)?$")>; -def : InstRW<[FXb, Lat2], (instregex "VLVGP(32)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "VLR(32|64)?$")>; +def : InstRW<[WLat3, FXb, NormalGr], (instregex "VLGV(B|F|G|H)?$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "VLVG(B|F|G|H)?$")>; +def : InstRW<[WLat3, FXb, NormalGr], (instregex "VLVGP(32)?$")>; //===----------------------------------------------------------------------===// // Vector: Immediate instructions //===----------------------------------------------------------------------===// -def : InstRW<[VecXsPm], (instregex "VZERO$")>; -def : InstRW<[VecXsPm], (instregex "VONE$")>; -def : InstRW<[VecXsPm], (instregex "VGBM$")>; -def : InstRW<[VecXsPm], (instregex "VGM(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VREPI(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VLEI(B|F|G|H)$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VZERO$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VONE$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VGBM$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VGM(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VREPI(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VLEI(B|F|G|H)$")>; //===----------------------------------------------------------------------===// // Vector: Loads //===----------------------------------------------------------------------===// -def : InstRW<[LSU], (instregex "VL(L|BB)?$")>; -def : InstRW<[LSU], (instregex "VL(32|64)$")>; -def : InstRW<[LSU], (instregex "VLLEZ(B|F|G|H|LF)?$")>; -def : InstRW<[LSU], (instregex "VLREP(B|F|G|H)?$")>; -def : InstRW<[VecXsPm, LSU, Lat7], (instregex "VLE(B|F|G|H)$")>; -def : InstRW<[FXb, LSU, VecXsPm, Lat11, BeginGroup], (instregex "VGE(F|G)$")>; -def : InstRW<[LSU, LSU, LSU, LSU, LSU, Lat10, GroupAlone], - (instregex "VLM$")>; -def : InstRW<[LSU, Lat5], (instregex "VLRL(R)?$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "VL(BB)?$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "VLL$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "VL(32|64)$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "VLLEZ(B|F|G|H|LF)?$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "VLREP(B|F|G|H)?$")>; +def : InstRW<[WLat2LSU, RegReadAdv, VecXsPm, LSU, NormalGr], + (instregex "VLE(B|F|G|H)$")>; +def : InstRW<[WLat5LSU, RegReadAdv, FXb, LSU, VecXsPm, Cracked], + (instregex "VGE(F|G)$")>; +def : InstRW<[WLat4LSU, WLat4LSU, LSU5, GroupAlone], (instregex "VLM$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "VLRL(R)?$")>; //===----------------------------------------------------------------------===// // Vector: Stores //===----------------------------------------------------------------------===// -def : InstRW<[FXb, LSU, Lat8], (instregex "VST(L|32|64)?$")>; -def : InstRW<[FXb, LSU, Lat8], (instregex "VSTE(F|G)$")>; -def : InstRW<[FXb, LSU, VecXsPm, Lat11, BeginGroup], (instregex "VSTE(B|H)$")>; -def : InstRW<[LSU, LSU, FXb, FXb, FXb, FXb, FXb, Lat20, GroupAlone], - (instregex "VSTM$")>; -def : InstRW<[FXb, FXb, LSU, Lat12, BeginGroup], (instregex "VSCE(F|G)$")>; -def : InstRW<[FXb, LSU, Lat8], (instregex "VSTRL(R)?$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "VST(L|32|64)?$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "VSTE(F|G)$")>; +def : InstRW<[WLat1, FXb, LSU, VecXsPm, Cracked], (instregex "VSTE(B|H)$")>; +def : InstRW<[WLat1, LSU2, FXb3, GroupAlone], (instregex "VSTM$")>; +def : InstRW<[WLat1, FXb2, LSU, Cracked], (instregex "VSCE(F|G)$")>; +def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "VSTRL(R)?$")>; //===----------------------------------------------------------------------===// // Vector: Selects and permutes //===----------------------------------------------------------------------===// -def : InstRW<[VecXsPm], (instregex "VMRH(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VMRL(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VPERM$")>; -def : InstRW<[VecXsPm], (instregex "VPDI$")>; -def : InstRW<[VecXsPm], (instregex "VBPERM$")>; -def : InstRW<[VecXsPm], (instregex "VREP(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VSEL$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VMRH(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VMRL(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VPERM$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VPDI$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VBPERM$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VREP(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VSEL$")>; //===----------------------------------------------------------------------===// // Vector: Widening and narrowing //===----------------------------------------------------------------------===// -def : InstRW<[VecXsPm], (instregex "VPK(F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VPKS(F|G|H)?$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "VPKS(F|G|H)S$")>; -def : InstRW<[VecXsPm], (instregex "VPKLS(F|G|H)?$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "VPKLS(F|G|H)S$")>; -def : InstRW<[VecXsPm], (instregex "VSEG(B|F|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VUPH(B|F|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VUPL(B|F)?$")>; -def : InstRW<[VecXsPm], (instregex "VUPLH(B|F|H|W)?$")>; -def : InstRW<[VecXsPm], (instregex "VUPLL(B|F|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VPK(F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VPKS(F|G|H)?$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "VPKS(F|G|H)S$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VPKLS(F|G|H)?$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "VPKLS(F|G|H)S$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VSEG(B|F|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VUPH(B|F|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VUPL(B|F)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VUPLH(B|F|H|W)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VUPLL(B|F|H)?$")>; //===----------------------------------------------------------------------===// // Vector: Integer arithmetic //===----------------------------------------------------------------------===// -def : InstRW<[VecXsPm], (instregex "VA(B|F|G|H|Q|C|CQ)?$")>; -def : InstRW<[VecXsPm], (instregex "VACC(B|F|G|H|Q|C|CQ)?$")>; -def : InstRW<[VecXsPm], (instregex "VAVG(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VAVGL(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VN(C|O|N|X)?$")>; -def : InstRW<[VecXsPm], (instregex "VO(C)?$")>; -def : InstRW<[VecMul], (instregex "VCKSM$")>; -def : InstRW<[VecXsPm], (instregex "VCLZ(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VCTZ(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VX$")>; -def : InstRW<[VecMul], (instregex "VGFM?$")>; -def : InstRW<[VecMul], (instregex "VGFMA(B|F|G|H)?$")>; -def : InstRW<[VecMul], (instregex "VGFM(B|F|G|H)$")>; -def : InstRW<[VecXsPm], (instregex "VLC(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VLP(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VMX(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VMXL(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VMN(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VMNL(B|F|G|H)?$")>; -def : InstRW<[VecMul], (instregex "VMAL(B|F)?$")>; -def : InstRW<[VecMul], (instregex "VMALE(B|F|H)?$")>; -def : InstRW<[VecMul], (instregex "VMALH(B|F|H|W)?$")>; -def : InstRW<[VecMul], (instregex "VMALO(B|F|H)?$")>; -def : InstRW<[VecMul], (instregex "VMAO(B|F|H)?$")>; -def : InstRW<[VecMul], (instregex "VMAE(B|F|H)?$")>; -def : InstRW<[VecMul], (instregex "VMAH(B|F|H)?$")>; -def : InstRW<[VecMul], (instregex "VME(B|F|H)?$")>; -def : InstRW<[VecMul], (instregex "VMH(B|F|H)?$")>; -def : InstRW<[VecMul], (instregex "VML(B|F)?$")>; -def : InstRW<[VecMul], (instregex "VMLE(B|F|H)?$")>; -def : InstRW<[VecMul], (instregex "VMLH(B|F|H|W)?$")>; -def : InstRW<[VecMul], (instregex "VMLO(B|F|H)?$")>; -def : InstRW<[VecMul], (instregex "VMO(B|F|H)?$")>; -def : InstRW<[VecBF2], (instregex "VMSL(G)?$")>; - -def : InstRW<[VecXsPm], (instregex "VPOPCT(B|F|G|H)?$")>; - -def : InstRW<[VecXsPm], (instregex "VERLL(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VERLLV(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VERIM(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VESL(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VESLV(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VESRA(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VESRAV(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VESRL(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VESRLV(B|F|G|H)?$")>; - -def : InstRW<[VecXsPm], (instregex "VSL(DB)?$")>; -def : InstRW<[VecXsPm], (instregex "VSLB$")>; -def : InstRW<[VecXsPm], (instregex "VSR(A|L)$")>; -def : InstRW<[VecXsPm], (instregex "VSR(A|L)B$")>; - -def : InstRW<[VecXsPm], (instregex "VSB(I|IQ|CBI|CBIQ)?$")>; -def : InstRW<[VecXsPm], (instregex "VSCBI(B|F|G|H|Q)?$")>; -def : InstRW<[VecXsPm], (instregex "VS(F|G|H|Q)?$")>; - -def : InstRW<[VecMul], (instregex "VSUM(B|H)?$")>; -def : InstRW<[VecMul], (instregex "VSUMG(F|H)?$")>; -def : InstRW<[VecMul], (instregex "VSUMQ(F|G)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VA(B|F|G|H|Q|C|CQ)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VACC(B|F|G|H|Q|C|CQ)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VAVG(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VAVGL(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VN(C|O|N|X)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VO(C)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VCKSM$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VCLZ(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VCTZ(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VX$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VGFM?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VGFMA(B|F|G|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VGFM(B|F|G|H)$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VLC(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VLP(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VMX(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VMXL(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VMN(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VMNL(B|F|G|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VMAL(B|F)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VMALE(B|F|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VMALH(B|F|H|W)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VMALO(B|F|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VMAO(B|F|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VMAE(B|F|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VMAH(B|F|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VME(B|F|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VMH(B|F|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VML(B|F)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VMLE(B|F|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VMLH(B|F|H|W)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VMLO(B|F|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VMO(B|F|H)?$")>; +def : InstRW<[WLat8, VecBF2, NormalGr], (instregex "VMSL(G)?$")>; + +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VPOPCT(B|F|G|H)?$")>; + +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VERLL(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VERLLV(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VERIM(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VESL(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VESLV(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VESRA(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VESRAV(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VESRL(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VESRLV(B|F|G|H)?$")>; + +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VSL(DB)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VSLB$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VSR(A|L)$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VSR(A|L)B$")>; + +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VSB(I|IQ|CBI|CBIQ)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VSCBI(B|F|G|H|Q)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VS(F|G|H|Q)?$")>; + +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VSUM(B|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VSUMG(F|H)?$")>; +def : InstRW<[WLat4, VecMul, NormalGr], (instregex "VSUMQ(F|G)?$")>; //===----------------------------------------------------------------------===// // Vector: Integer comparison //===----------------------------------------------------------------------===// -def : InstRW<[VecXsPm, Lat4], (instregex "VEC(B|F|G|H)?$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "VECL(B|F|G|H)?$")>; -def : InstRW<[VecXsPm], (instregex "VCEQ(B|F|G|H)?$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "VCEQ(B|F|G|H)S$")>; -def : InstRW<[VecXsPm], (instregex "VCH(B|F|G|H)?$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "VCH(B|F|G|H)S$")>; -def : InstRW<[VecXsPm], (instregex "VCHL(B|F|G|H)?$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "VCHL(B|F|G|H)S$")>; -def : InstRW<[VecStr, Lat5], (instregex "VTM$")>; +def : InstRW<[WLat3, VecXsPm, NormalGr], (instregex "VEC(B|F|G|H)?$")>; +def : InstRW<[WLat3, VecXsPm, NormalGr], (instregex "VECL(B|F|G|H)?$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VCEQ(B|F|G|H)?$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "VCEQ(B|F|G|H)S$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VCH(B|F|G|H)?$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "VCH(B|F|G|H)S$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VCHL(B|F|G|H)?$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "VCHL(B|F|G|H)S$")>; +def : InstRW<[WLat4, VecStr, NormalGr], (instregex "VTM$")>; //===----------------------------------------------------------------------===// // Vector: Floating-point arithmetic //===----------------------------------------------------------------------===// // Conversion and rounding -def : InstRW<[VecBF], (instregex "VCD(L)?G$")>; -def : InstRW<[VecBF], (instregex "VCD(L)?GB$")>; -def : InstRW<[VecBF], (instregex "WCD(L)?GB$")>; -def : InstRW<[VecBF], (instregex "VC(L)?GD$")>; -def : InstRW<[VecBF], (instregex "VC(L)?GDB$")>; -def : InstRW<[VecBF], (instregex "WC(L)?GDB$")>; -def : InstRW<[VecBF], (instregex "VL(DE|ED)$")>; -def : InstRW<[VecBF], (instregex "VL(DE|ED)B$")>; -def : InstRW<[VecBF], (instregex "WL(DE|ED)B$")>; -def : InstRW<[VecBF], (instregex "VFL(L|R)$")>; -def : InstRW<[VecBF], (instregex "VFL(LS|RD)$")>; -def : InstRW<[VecBF], (instregex "WFL(LS|RD)$")>; -def : InstRW<[VecBF2], (instregex "WFLLD$")>; -def : InstRW<[VecDF2, Lat10], (instregex "WFLRX$")>; -def : InstRW<[VecBF2], (instregex "VFI$")>; -def : InstRW<[VecBF], (instregex "VFIDB$")>; -def : InstRW<[VecBF], (instregex "WFIDB$")>; -def : InstRW<[VecBF2], (instregex "VFISB$")>; -def : InstRW<[VecBF], (instregex "WFISB$")>; -def : InstRW<[VecDF2, Lat10], (instregex "WFIXB$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "VCD(L)?G$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "VCD(L)?GB$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "WCD(L)?GB$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "VC(L)?GD$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "VC(L)?GDB$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "WC(L)?GDB$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "VL(DE|ED)$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "VL(DE|ED)B$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "WL(DE|ED)B$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "VFL(L|R)$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "VFL(LS|RD)$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "WFL(LS|RD)$")>; +def : InstRW<[WLat8, VecBF2, NormalGr], (instregex "WFLLD$")>; +def : InstRW<[WLat10, VecDF2, NormalGr], (instregex "WFLRX$")>; +def : InstRW<[WLat8, VecBF2, NormalGr], (instregex "VFI$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "VFIDB$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "WFIDB$")>; +def : InstRW<[WLat8, VecBF2, NormalGr], (instregex "VFISB$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "WFISB$")>; +def : InstRW<[WLat10, VecDF2, NormalGr], (instregex "WFIXB$")>; // Sign operations -def : InstRW<[VecXsPm], (instregex "VFPSO$")>; -def : InstRW<[VecXsPm], (instregex "(V|W)FPSODB$")>; -def : InstRW<[VecXsPm], (instregex "(V|W)FPSOSB$")>; -def : InstRW<[VecXsPm], (instregex "WFPSOXB$")>; -def : InstRW<[VecXsPm], (instregex "(V|W)FL(C|N|P)DB$")>; -def : InstRW<[VecXsPm], (instregex "(V|W)FL(C|N|P)SB$")>; -def : InstRW<[VecXsPm], (instregex "WFL(C|N|P)XB$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VFPSO$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "(V|W)FPSODB$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "(V|W)FPSOSB$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "WFPSOXB$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "(V|W)FL(C|N|P)DB$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "(V|W)FL(C|N|P)SB$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "WFL(C|N|P)XB$")>; // Minimum / maximum -def : InstRW<[VecXsPm], (instregex "VF(MAX|MIN)$")>; -def : InstRW<[VecXsPm], (instregex "VF(MAX|MIN)DB$")>; -def : InstRW<[VecXsPm], (instregex "WF(MAX|MIN)DB$")>; -def : InstRW<[VecXsPm], (instregex "VF(MAX|MIN)SB$")>; -def : InstRW<[VecXsPm], (instregex "WF(MAX|MIN)SB$")>; -def : InstRW<[VecDFX], (instregex "WF(MAX|MIN)XB$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VF(MAX|MIN)$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VF(MAX|MIN)DB$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "WF(MAX|MIN)DB$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VF(MAX|MIN)SB$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "WF(MAX|MIN)SB$")>; +def : InstRW<[WLat2, VecDFX, NormalGr], (instregex "WF(MAX|MIN)XB$")>; // Test data class -def : InstRW<[VecXsPm, Lat4], (instregex "VFTCI$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "(V|W)FTCIDB$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "(V|W)FTCISB$")>; -def : InstRW<[VecDFX, Lat4], (instregex "WFTCIXB$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "VFTCI$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "(V|W)FTCIDB$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "(V|W)FTCISB$")>; +def : InstRW<[WLat3, WLat3, VecDFX, NormalGr], (instregex "WFTCIXB$")>; // Add / subtract -def : InstRW<[VecBF2], (instregex "VF(A|S)$")>; -def : InstRW<[VecBF], (instregex "VF(A|S)DB$")>; -def : InstRW<[VecBF], (instregex "WF(A|S)DB$")>; -def : InstRW<[VecBF2], (instregex "VF(A|S)SB$")>; -def : InstRW<[VecBF], (instregex "WF(A|S)SB$")>; -def : InstRW<[VecDF2, Lat10], (instregex "WF(A|S)XB$")>; +def : InstRW<[WLat8, VecBF2, NormalGr], (instregex "VF(A|S)$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "VF(A|S)DB$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "WF(A|S)DB$")>; +def : InstRW<[WLat8, VecBF2, NormalGr], (instregex "VF(A|S)SB$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "WF(A|S)SB$")>; +def : InstRW<[WLat10, VecDF2, NormalGr], (instregex "WF(A|S)XB$")>; // Multiply / multiply-and-add/subtract -def : InstRW<[VecBF2], (instregex "VFM$")>; -def : InstRW<[VecBF], (instregex "VFMDB$")>; -def : InstRW<[VecBF], (instregex "WFMDB$")>; -def : InstRW<[VecBF2], (instregex "VFMSB$")>; -def : InstRW<[VecBF], (instregex "WFMSB$")>; -def : InstRW<[VecDF2, Lat20], (instregex "WFMXB$")>; -def : InstRW<[VecBF2], (instregex "VF(N)?M(A|S)$")>; -def : InstRW<[VecBF], (instregex "VF(N)?M(A|S)DB$")>; -def : InstRW<[VecBF], (instregex "WF(N)?M(A|S)DB$")>; -def : InstRW<[VecBF2], (instregex "VF(N)?M(A|S)SB$")>; -def : InstRW<[VecBF], (instregex "WF(N)?M(A|S)SB$")>; -def : InstRW<[VecDF2, Lat20], (instregex "WF(N)?M(A|S)XB$")>; +def : InstRW<[WLat8, VecBF2, NormalGr], (instregex "VFM$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "VFMDB$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "WFM(D|S)B$")>; +def : InstRW<[WLat8, VecBF2, NormalGr], (instregex "VFMSB$")>; +def : InstRW<[WLat20, VecDF2, NormalGr], (instregex "WFMXB$")>; +def : InstRW<[WLat8, VecBF2, NormalGr], (instregex "VF(N)?M(A|S)$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "VF(N)?M(A|S)DB$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "WF(N)?M(A|S)DB$")>; +def : InstRW<[WLat8, VecBF2, NormalGr], (instregex "VF(N)?M(A|S)SB$")>; +def : InstRW<[WLat7, VecBF, NormalGr], (instregex "WF(N)?M(A|S)SB$")>; +def : InstRW<[WLat30, VecDF2, NormalGr], (instregex "WF(N)?M(A|S)XB$")>; // Divide / square root -def : InstRW<[VecFPd], (instregex "VFD$")>; -def : InstRW<[VecFPd], (instregex "(V|W)FDDB$")>; -def : InstRW<[VecFPd], (instregex "(V|W)FDSB$")>; -def : InstRW<[VecFPd], (instregex "WFDXB$")>; -def : InstRW<[VecFPd], (instregex "VFSQ$")>; -def : InstRW<[VecFPd], (instregex "(V|W)FSQDB$")>; -def : InstRW<[VecFPd], (instregex "(V|W)FSQSB$")>; -def : InstRW<[VecFPd], (instregex "WFSQXB$")>; +def : InstRW<[WLat30, VecFPd, NormalGr], (instregex "VFD$")>; +def : InstRW<[WLat30, VecFPd, NormalGr], (instregex "(V|W)FDDB$")>; +def : InstRW<[WLat30, VecFPd, NormalGr], (instregex "(V|W)FDSB$")>; +def : InstRW<[WLat30, VecFPd, NormalGr], (instregex "WFDXB$")>; +def : InstRW<[WLat30, VecFPd, NormalGr], (instregex "VFSQ$")>; +def : InstRW<[WLat30, VecFPd, NormalGr], (instregex "(V|W)FSQDB$")>; +def : InstRW<[WLat30, VecFPd, NormalGr], (instregex "(V|W)FSQSB$")>; +def : InstRW<[WLat30, VecFPd, NormalGr], (instregex "WFSQXB$")>; //===----------------------------------------------------------------------===// // Vector: Floating-point comparison //===----------------------------------------------------------------------===// -def : InstRW<[VecXsPm], (instregex "VF(C|K)(E|H|HE)$")>; -def : InstRW<[VecXsPm], (instregex "VF(C|K)(E|H|HE)DB$")>; -def : InstRW<[VecXsPm], (instregex "WF(C|K)(E|H|HE)DB$")>; -def : InstRW<[VecXsPm], (instregex "VF(C|K)(E|H|HE)SB$")>; -def : InstRW<[VecXsPm], (instregex "WF(C|K)(E|H|HE)SB$")>; -def : InstRW<[VecDFX], (instregex "WF(C|K)(E|H|HE)XB$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "VF(C|K)(E|H|HE)DBS$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "WF(C|K)(E|H|HE)DBS$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "VF(C|K)(E|H|HE)SBS$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "WF(C|K)(E|H|HE)SBS$")>; -def : InstRW<[VecDFX, Lat4], (instregex "WF(C|K)(E|H|HE)XBS$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "WF(C|K)$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "WF(C|K)DB$")>; -def : InstRW<[VecXsPm, Lat4], (instregex "WF(C|K)SB$")>; -def : InstRW<[VecDFX, Lat4], (instregex "WF(C|K)XB$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VF(C|K)(E|H|HE)$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VF(C|K)(E|H|HE)DB$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "WFC(E|H|HE)DB$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "WFK(E|H|HE)DB$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "VF(C|K)(E|H|HE)SB$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "WFC(E|H|HE)SB$")>; +def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "WFK(E|H|HE)SB$")>; +def : InstRW<[WLat2, VecDFX, NormalGr], (instregex "WFC(E|H|HE)XB$")>; +def : InstRW<[WLat2, VecDFX, NormalGr], (instregex "WFK(E|H|HE)XB$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "VFC(E|H|HE)DBS$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "VFK(E|H|HE)DBS$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], + (instregex "WF(C|K)(E|H|HE)DBS$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], + (instregex "VF(C|K)(E|H|HE)SBS$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "WFC(E|H|HE)SBS$")>; +def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "WFK(E|H|HE)SBS$")>; +def : InstRW<[WLat3, WLat3, VecDFX, NormalGr], (instregex "WFC(E|H|HE)XBS$")>; +def : InstRW<[WLat3, WLat3, VecDFX, NormalGr], (instregex "WFK(E|H|HE)XBS$")>; +def : InstRW<[WLat3, VecXsPm, NormalGr], (instregex "WF(C|K)$")>; +def : InstRW<[WLat3, VecXsPm, NormalGr], (instregex "WF(C|K)DB$")>; +def : InstRW<[WLat3, VecXsPm, NormalGr], (instregex "WF(C|K)SB$")>; +def : InstRW<[WLat3, VecDFX, NormalGr], (instregex "WF(C|K)XB$")>; //===----------------------------------------------------------------------===// // Vector: Floating-point insertion and extraction //===----------------------------------------------------------------------===// -def : InstRW<[FXb], (instregex "LEFR$")>; -def : InstRW<[FXb, Lat4], (instregex "LFER$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "LEFR$")>; +def : InstRW<[WLat3, FXb, NormalGr], (instregex "LFER$")>; //===----------------------------------------------------------------------===// // Vector: String instructions //===----------------------------------------------------------------------===// -def : InstRW<[VecStr], (instregex "VFAE(B)?$")>; -def : InstRW<[VecStr, Lat5], (instregex "VFAEBS$")>; -def : InstRW<[VecStr], (instregex "VFAE(F|H)$")>; -def : InstRW<[VecStr, Lat5], (instregex "VFAE(F|H)S$")>; -def : InstRW<[VecStr], (instregex "VFAEZ(B|F|H)$")>; -def : InstRW<[VecStr, Lat5], (instregex "VFAEZ(B|F|H)S$")>; -def : InstRW<[VecStr], (instregex "VFEE(B|F|H|ZB|ZF|ZH)?$")>; -def : InstRW<[VecStr, Lat5], (instregex "VFEE(B|F|H|ZB|ZF|ZH)S$")>; -def : InstRW<[VecStr], (instregex "VFENE(B|F|H|ZB|ZF|ZH)?$")>; -def : InstRW<[VecStr, Lat5], (instregex "VFENE(B|F|H|ZB|ZF|ZH)S$")>; -def : InstRW<[VecStr], (instregex "VISTR(B|F|H)?$")>; -def : InstRW<[VecStr, Lat5], (instregex "VISTR(B|F|H)S$")>; -def : InstRW<[VecStr], (instregex "VSTRC(B|F|H)?$")>; -def : InstRW<[VecStr, Lat5], (instregex "VSTRC(B|F|H)S$")>; -def : InstRW<[VecStr], (instregex "VSTRCZ(B|F|H)$")>; -def : InstRW<[VecStr, Lat5], (instregex "VSTRCZ(B|F|H)S$")>; +def : InstRW<[WLat3, VecStr, NormalGr], (instregex "VFAE(B)?$")>; +def : InstRW<[WLat3, VecStr, NormalGr], (instregex "VFAE(F|H)$")>; +def : InstRW<[WLat4, WLat4, VecStr, NormalGr], (instregex "VFAE(B|F|H)S$")>; +def : InstRW<[WLat3, VecStr, NormalGr], (instregex "VFAEZ(B|F|H)$")>; +def : InstRW<[WLat4, WLat4, VecStr, NormalGr], (instregex "VFAEZ(B|F|H)S$")>; +def : InstRW<[WLat3, VecStr, NormalGr], (instregex "VFEE(B|F|H|ZB|ZF|ZH)?$")>; +def : InstRW<[WLat4, WLat4, VecStr, NormalGr], + (instregex "VFEE(B|F|H|ZB|ZF|ZH)S$")>; +def : InstRW<[WLat3, VecStr, NormalGr], (instregex "VFENE(B|F|H|ZB|ZF|ZH)?$")>; +def : InstRW<[WLat4, WLat4, VecStr, NormalGr], + (instregex "VFENE(B|F|H|ZB|ZF|ZH)S$")>; +def : InstRW<[WLat3, VecStr, NormalGr], (instregex "VISTR(B|F|H)?$")>; +def : InstRW<[WLat4, WLat4, VecStr, NormalGr], (instregex "VISTR(B|F|H)S$")>; +def : InstRW<[WLat3, VecStr, NormalGr], (instregex "VSTRC(B|F|H)?$")>; +def : InstRW<[WLat4, WLat4, VecStr, NormalGr], (instregex "VSTRC(B|F|H)S$")>; +def : InstRW<[WLat3, VecStr, NormalGr], (instregex "VSTRCZ(B|F|H)$")>; +def : InstRW<[WLat4, WLat4, VecStr, NormalGr], (instregex "VSTRCZ(B|F|H)S$")>; //===----------------------------------------------------------------------===// // Vector: Packed-decimal instructions //===----------------------------------------------------------------------===// -def : InstRW<[VecDF, VecDF, Lat10], (instregex "VLIP$")>; -def : InstRW<[VecDFX, LSU, GroupAlone], (instregex "VPKZ$")>; -def : InstRW<[VecDFX, FXb, LSU, Lat12, BeginGroup], (instregex "VUPKZ$")>; -def : InstRW<[VecDF, VecDF, FXb, Lat20, GroupAlone], (instregex "VCVB(G)?$")>; -def : InstRW<[VecDF, VecDF, FXb, Lat20, GroupAlone], (instregex "VCVD(G)?$")>; -def : InstRW<[VecDFX], (instregex "V(A|S)P$")>; -def : InstRW<[VecDF, VecDF, Lat30, GroupAlone], (instregex "VM(S)?P$")>; -def : InstRW<[VecDF, VecDF, Lat30, GroupAlone], (instregex "V(D|R)P$")>; -def : InstRW<[VecDFX, Lat30, GroupAlone], (instregex "VSDP$")>; -def : InstRW<[VecDF, VecDF, Lat11], (instregex "VSRP$")>; -def : InstRW<[VecDFX], (instregex "VPSOP$")>; -def : InstRW<[VecDFX], (instregex "V(T|C)P$")>; +def : InstRW<[WLat10, VecDF2, NormalGr], (instregex "VLIP$")>; +def : InstRW<[WLat6, VecDFX, LSU, GroupAlone], (instregex "VPKZ$")>; +def : InstRW<[WLat1, VecDFX, FXb, LSU, Cracked], (instregex "VUPKZ$")>; +def : InstRW<[WLat20, WLat20, VecDF2, FXb, GroupAlone], (instregex "VCVB(G)?$")>; +def : InstRW<[WLat20, WLat20, VecDF2, FXb, GroupAlone], (instregex "VCVD(G)?$")>; +def : InstRW<[WLat4, WLat4, VecDFX, NormalGr], (instregex "V(A|S)P$")>; +def : InstRW<[WLat30, WLat30, VecDF2, GroupAlone], (instregex "VM(S)?P$")>; +def : InstRW<[WLat30, WLat30, VecDF2, GroupAlone], (instregex "V(D|R)P$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "VSDP$")>; +def : InstRW<[WLat10, WLat10, VecDF2, NormalGr], (instregex "VSRP$")>; +def : InstRW<[WLat4, WLat4, VecDFX, NormalGr], (instregex "VPSOP$")>; +def : InstRW<[WLat2, VecDFX, NormalGr], (instregex "V(T|C)P$")>; // -------------------------------- System ---------------------------------- // @@ -1420,157 +1508,151 @@ // System: Program-Status Word Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb, Lat30], (instregex "EPSW$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "LPSW(E)?$")>; -def : InstRW<[FXa, Lat3, GroupAlone], (instregex "IPK$")>; -def : InstRW<[LSU, EndGroup], (instregex "SPKA$")>; -def : InstRW<[LSU, EndGroup], (instregex "SSM$")>; -def : InstRW<[FXb, LSU, GroupAlone], (instregex "ST(N|O)SM$")>; -def : InstRW<[FXa, Lat3], (instregex "IAC$")>; -def : InstRW<[LSU, EndGroup], (instregex "SAC(F)?$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "EPSW$")>; +def : InstRW<[WLat20, GroupAlone], (instregex "LPSW(E)?$")>; +def : InstRW<[WLat3, FXa, GroupAlone], (instregex "IPK$")>; +def : InstRW<[WLat1, LSU, EndGroup], (instregex "SPKA$")>; +def : InstRW<[WLat1, LSU, EndGroup], (instregex "SSM$")>; +def : InstRW<[WLat1, FXb, LSU, GroupAlone], (instregex "ST(N|O)SM$")>; +def : InstRW<[WLat3, FXa, NormalGr], (instregex "IAC$")>; +def : InstRW<[WLat1, LSU, EndGroup], (instregex "SAC(F)?$")>; //===----------------------------------------------------------------------===// // System: Control Register Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb, LSU, Lat30], (instregex "LCTL(G)?$")>; -def : InstRW<[LSU, Lat30], (instregex "STCT(L|G)$")>; -def : InstRW<[LSU], (instregex "E(P|S)A(I)?R$")>; -def : InstRW<[FXb, Lat30], (instregex "SSA(I)?R$")>; -def : InstRW<[FXb, Lat30], (instregex "ESEA$")>; +def : InstRW<[WLat4LSU, WLat4LSU, LSU2, GroupAlone], (instregex "LCTL(G)?$")>; +def : InstRW<[WLat1, LSU5, GroupAlone], (instregex "STCT(L|G)$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "E(P|S)A(I)?R$")>; +def : InstRW<[WLat30, MCD], (instregex "SSA(I)?R$")>; +def : InstRW<[WLat30, MCD], (instregex "ESEA$")>; //===----------------------------------------------------------------------===// // System: Prefix-Register Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb, LSU, Lat30], (instregex "SPX$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "STPX$")>; +def : InstRW<[WLat30, MCD], (instregex "S(T)?PX$")>; //===----------------------------------------------------------------------===// // System: Storage-Key and Real Memory Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb, Lat30], (instregex "ISKE$")>; -def : InstRW<[FXb, Lat30], (instregex "IVSK$")>; -def : InstRW<[FXb, Lat30], (instregex "SSKE(Opt)?$")>; -def : InstRW<[FXb, Lat30], (instregex "RRB(E|M)$")>; -def : InstRW<[FXb, Lat30], (instregex "IRBM$")>; -def : InstRW<[FXb, Lat30], (instregex "PFMF$")>; -def : InstRW<[FXb, Lat30], (instregex "TB$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "PGIN$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "PGOUT$")>; +def : InstRW<[WLat30, MCD], (instregex "ISKE$")>; +def : InstRW<[WLat30, MCD], (instregex "IVSK$")>; +def : InstRW<[WLat30, MCD], (instregex "SSKE(Opt)?$")>; +def : InstRW<[WLat30, MCD], (instregex "RRB(E|M)$")>; +def : InstRW<[WLat30, MCD], (instregex "IRBM$")>; +def : InstRW<[WLat30, MCD], (instregex "PFMF$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "TB$")>; +def : InstRW<[WLat30, MCD], (instregex "PGIN$")>; +def : InstRW<[WLat30, MCD], (instregex "PGOUT$")>; //===----------------------------------------------------------------------===// // System: Dynamic-Address-Translation Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb, LSU, Lat30], (instregex "IPTE(Opt)?(Opt)?$")>; -def : InstRW<[FXb, Lat30], (instregex "IDTE(Opt)?$")>; -def : InstRW<[FXb, Lat30], (instregex "CRDTE(Opt)?$")>; -def : InstRW<[FXb, Lat30], (instregex "PTLB$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "CSP(G)?$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "LPTEA$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "LRA(Y|G)?$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "STRAG$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "LURA(G)?$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "STUR(A|G)$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "TPROT$")>; +def : InstRW<[WLat30, MCD], (instregex "IPTE(Opt)?(Opt)?$")>; +def : InstRW<[WLat30, MCD], (instregex "IDTE(Opt)?$")>; +def : InstRW<[WLat30, MCD], (instregex "CRDTE(Opt)?$")>; +def : InstRW<[WLat30, MCD], (instregex "PTLB$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "CSP(G)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "LPTEA$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "LRA(Y|G)?$")>; +def : InstRW<[WLat30, MCD], (instregex "STRAG$")>; +def : InstRW<[WLat30, MCD], (instregex "LURA(G)?$")>; +def : InstRW<[WLat30, MCD], (instregex "STUR(A|G)$")>; +def : InstRW<[WLat30, MCD], (instregex "TPROT$")>; //===----------------------------------------------------------------------===// // System: Memory-move Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXa, FXa, FXb, LSU, Lat8, GroupAlone], (instregex "MVC(K|P|S)$")>; -def : InstRW<[FXa, LSU, Lat6, GroupAlone], (instregex "MVC(S|D)K$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "MVCOS$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MVPG$")>; +def : InstRW<[WLat4LSU, FXa2, FXb, LSU5, GroupAlone], (instregex "MVC(K|P|S)$")>; +def : InstRW<[WLat1, FXa, LSU5, GroupAlone], (instregex "MVC(S|D)K$")>; +def : InstRW<[WLat30, MCD], (instregex "MVCOS$")>; +def : InstRW<[WLat30, MCD], (instregex "MVPG$")>; //===----------------------------------------------------------------------===// // System: Address-Space Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb, LSU, Lat30], (instregex "LASP$")>; -def : InstRW<[LSU, GroupAlone], (instregex "PALB$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "PC$")>; -def : InstRW<[FXb, Lat30], (instregex "PR$")>; -def : InstRW<[FXb, Lat30], (instregex "PT(I)?$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "RP$")>; -def : InstRW<[FXb, Lat30], (instregex "BS(G|A)$")>; -def : InstRW<[FXb, Lat20], (instregex "TAR$")>; +def : InstRW<[WLat30, MCD], (instregex "LASP$")>; +def : InstRW<[WLat1, LSU, GroupAlone], (instregex "PALB$")>; +def : InstRW<[WLat30, MCD], (instregex "PC$")>; +def : InstRW<[WLat30, MCD], (instregex "PR$")>; +def : InstRW<[WLat30, MCD], (instregex "PT(I)?$")>; +def : InstRW<[WLat30, MCD], (instregex "RP$")>; +def : InstRW<[WLat30, MCD], (instregex "BS(G|A)$")>; +def : InstRW<[WLat30, MCD], (instregex "TAR$")>; //===----------------------------------------------------------------------===// // System: Linkage-Stack Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb, Lat30, EndGroup], (instregex "BAKR$")>; -def : InstRW<[FXb, Lat30], (instregex "EREG(G)?$")>; -def : InstRW<[FXb, Lat30], (instregex "(E|M)STA$")>; +def : InstRW<[WLat30, MCD], (instregex "BAKR$")>; +def : InstRW<[WLat30, MCD], (instregex "EREG(G)?$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "(E|M)STA$")>; //===----------------------------------------------------------------------===// // System: Time-Related Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb, Lat30], (instregex "PTFF$")>; -def : InstRW<[FXb, LSU, Lat20], (instregex "SCK$")>; -def : InstRW<[FXb, Lat30], (instregex "SCKPF$")>; -def : InstRW<[FXb, LSU, Lat20], (instregex "SCKC$")>; -def : InstRW<[LSU, LSU, GroupAlone], (instregex "SPT$")>; -def : InstRW<[LSU, LSU, LSU, FXa, FXa, FXb, Lat9, GroupAlone], - (instregex "STCK(F)?$")>; -def : InstRW<[LSU, LSU, LSU, LSU, FXa, FXa, FXb, FXb, Lat11, GroupAlone], - (instregex "STCKE$")>; -def : InstRW<[FXb, LSU, Lat9], (instregex "STCKC$")>; -def : InstRW<[LSU, LSU, FXb, Lat5, BeginGroup], (instregex "STPT$")>; +def : InstRW<[WLat30, MCD], (instregex "PTFF$")>; +def : InstRW<[WLat30, MCD], (instregex "SCK(PF|C)?$")>; +def : InstRW<[WLat1, LSU2, GroupAlone], (instregex "SPT$")>; +def : InstRW<[WLat15, LSU3, FXa2, FXb, GroupAlone], (instregex "STCK(F)?$")>; +def : InstRW<[WLat20, LSU4, FXa2, FXb2, GroupAlone], (instregex "STCKE$")>; +def : InstRW<[WLat30, MCD], (instregex "STCKC$")>; +def : InstRW<[WLat1, LSU2, FXb, Cracked], (instregex "STPT$")>; //===----------------------------------------------------------------------===// // System: CPU-Related Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb, LSU, Lat30], (instregex "STAP$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "STIDP$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "STSI$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "STFL(E)?$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "ECAG$")>; -def : InstRW<[FXa, LSU, Lat30], (instregex "ECTG$")>; -def : InstRW<[FXb, Lat30], (instregex "PTF$")>; -def : InstRW<[FXb, Lat30], (instregex "PCKMO$")>; +def : InstRW<[WLat30, MCD], (instregex "STAP$")>; +def : InstRW<[WLat30, MCD], (instregex "STIDP$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "STSI$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "STFL(E)?$")>; +def : InstRW<[WLat30, MCD], (instregex "ECAG$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "ECTG$")>; +def : InstRW<[WLat30, MCD], (instregex "PTF$")>; +def : InstRW<[WLat30, MCD], (instregex "PCKMO$")>; //===----------------------------------------------------------------------===// // System: Miscellaneous Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb, Lat30], (instregex "SVC$")>; -def : InstRW<[FXb, GroupAlone], (instregex "MC$")>; -def : InstRW<[FXb, Lat30], (instregex "DIAG$")>; -def : InstRW<[FXb], (instregex "TRAC(E|G)$")>; -def : InstRW<[FXb, Lat30], (instregex "TRAP(2|4)$")>; -def : InstRW<[FXb, Lat30], (instregex "SIGP$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "SIGA$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "SIE$")>; +def : InstRW<[WLat30, MCD], (instregex "SVC$")>; +def : InstRW<[WLat1, FXb, GroupAlone], (instregex "MC$")>; +def : InstRW<[WLat30, MCD], (instregex "DIAG$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "TRAC(E|G)$")>; +def : InstRW<[WLat30, MCD], (instregex "TRAP(2|4)$")>; +def : InstRW<[WLat30, MCD], (instregex "SIG(P|A)$")>; +def : InstRW<[WLat30, MCD], (instregex "SIE$")>; //===----------------------------------------------------------------------===// // System: CPU-Measurement Facility Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb], (instregex "LPP$")>; -def : InstRW<[FXb, Lat30], (instregex "ECPGA$")>; -def : InstRW<[FXb, Lat30], (instregex "E(C|P)CTR$")>; -def : InstRW<[FXb, Lat30], (instregex "LCCTL$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "L(P|S)CTL$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "Q(S|CTR)I$")>; -def : InstRW<[FXb, Lat30], (instregex "S(C|P)CTR$")>; +def : InstRW<[WLat1, FXb, NormalGr], (instregex "LPP$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "ECPGA$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "E(C|P)CTR$")>; +def : InstRW<[WLat30, MCD], (instregex "LCCTL$")>; +def : InstRW<[WLat30, MCD], (instregex "L(P|S)CTL$")>; +def : InstRW<[WLat30, MCD], (instregex "Q(S|CTR)I$")>; +def : InstRW<[WLat30, MCD], (instregex "S(C|P)CTR$")>; //===----------------------------------------------------------------------===// // System: I/O Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXb, Lat30], (instregex "(C|H|R|X)SCH$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "(M|S|ST|T)SCH$")>; -def : InstRW<[FXb, Lat30], (instregex "RCHP$")>; -def : InstRW<[FXb, Lat30], (instregex "SCHM$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "STC(PS|RW)$")>; -def : InstRW<[FXb, LSU, Lat30], (instregex "TPI$")>; -def : InstRW<[FXb, Lat30], (instregex "SAL$")>; +def : InstRW<[WLat30, MCD], (instregex "(C|H|R|X)SCH$")>; +def : InstRW<[WLat30, MCD], (instregex "(M|S|ST|T)SCH$")>; +def : InstRW<[WLat30, MCD], (instregex "RCHP$")>; +def : InstRW<[WLat30, MCD], (instregex "SCHM$")>; +def : InstRW<[WLat30, MCD], (instregex "STC(PS|RW)$")>; +def : InstRW<[WLat30, MCD], (instregex "TPI$")>; +def : InstRW<[WLat30, MCD], (instregex "SAL$")>; } Index: lib/Target/SystemZ/SystemZScheduleZ196.td =================================================================== --- lib/Target/SystemZ/SystemZScheduleZ196.td +++ lib/Target/SystemZ/SystemZScheduleZ196.td @@ -10,13 +10,15 @@ // This file defines the machine model for Z196 to support instruction // scheduling and other instruction cost heuristics. // +// Pseudos expanded right after isel do not need to be modelled here. +// //===----------------------------------------------------------------------===// def Z196Model : SchedMachineModel { let UnsupportedFeatures = Arch9UnsupportedFeatures.List; - let IssueWidth = 5; + let IssueWidth = 3; let MicroOpBufferSize = 40; // Issue queues let LoadLatency = 1; // Optimistic load latency. @@ -27,48 +29,84 @@ } let SchedModel = Z196Model in { - -// These definitions could be put in a subtarget common include file, -// but it seems the include system in Tablegen currently rejects -// multiple includes of same file. +// These definitions need the SchedModel value. They could be put in a +// subtarget common include file, but it seems the include system in Tablegen +// currently (2016) rejects multiple includes of same file. + +// Decoder grouping rules +let NumMicroOps = 1 in { + def : WriteRes; + def : WriteRes { let BeginGroup = 1; } + def : WriteRes { let EndGroup = 1; } +} +def : WriteRes { + let NumMicroOps = 2; + let BeginGroup = 1; +} def : WriteRes { - let NumMicroOps = 0; + let NumMicroOps = 3; let BeginGroup = 1; let EndGroup = 1; } -def : WriteRes { - let NumMicroOps = 0; - let EndGroup = 1; + +// Incoming latency removed from the register operand which is used together +// with a memory operand by the instruction. +def : ReadAdvance; + +// LoadLatency (above) is not used for instructions in this file. This is +// instead the role of LSULatency, which is the latency value added to the +// result of loads and instructions with folded memory operands. +def : WriteRes { let Latency = 4; let NumMicroOps = 0; } + +let NumMicroOps = 0 in { + def : WriteRes { let Latency = 1; } + def : WriteRes { let Latency = 2; } + def : WriteRes { let Latency = 3; } + def : WriteRes { let Latency = 4; } + def : WriteRes { let Latency = 5; } + def : WriteRes { let Latency = 6; } + def : WriteRes { let Latency = 7; } + def : WriteRes { let Latency = 8; } + def : WriteRes { let Latency = 9; } + def : WriteRes { let Latency = 10; } + def : WriteRes { let Latency = 11; } + def : WriteRes { let Latency = 12; } + def : WriteRes { let Latency = 15; } + def : WriteRes { let Latency = 16; } + def : WriteRes { let Latency = 20; } + def : WriteRes { let Latency = 30; } } -def : WriteRes { let Latency = 2; let NumMicroOps = 0;} -def : WriteRes { let Latency = 3; let NumMicroOps = 0;} -def : WriteRes { let Latency = 4; let NumMicroOps = 0;} -def : WriteRes { let Latency = 5; let NumMicroOps = 0;} -def : WriteRes { let Latency = 6; let NumMicroOps = 0;} -def : WriteRes { let Latency = 7; let NumMicroOps = 0;} -def : WriteRes { let Latency = 8; let NumMicroOps = 0;} -def : WriteRes { let Latency = 9; let NumMicroOps = 0;} -def : WriteRes { let Latency = 10; let NumMicroOps = 0;} -def : WriteRes { let Latency = 11; let NumMicroOps = 0;} -def : WriteRes { let Latency = 12; let NumMicroOps = 0;} -def : WriteRes { let Latency = 15; let NumMicroOps = 0;} -def : WriteRes { let Latency = 20; let NumMicroOps = 0;} -def : WriteRes { let Latency = 30; let NumMicroOps = 0;} // Execution units. def Z196_FXUnit : ProcResource<2>; def Z196_LSUnit : ProcResource<2>; def Z196_FPUnit : ProcResource<1>; def Z196_DFUnit : ProcResource<1>; +def Z196_MCD : ProcResource<1>; // Subtarget specific definitions of scheduling resources. -def : WriteRes { let Latency = 1; } -def : WriteRes { let Latency = 4; } -def : WriteRes { let Latency = 1; } -def : WriteRes { let Latency = 8; } -def : WriteRes { let Latency = 9; } -def : WriteRes { let Latency = 2; } -def : WriteRes { let Latency = 3; } +let NumMicroOps = 0 in { + def : WriteRes; + def : WriteRes { let ResourceCycles = [2]; } + def : WriteRes { let ResourceCycles = [3]; } + def : WriteRes { let ResourceCycles = [4]; } + def : WriteRes { let ResourceCycles = [5]; } + def : WriteRes { let ResourceCycles = [6]; } + def : WriteRes; + def : WriteRes { let ResourceCycles = [2]; } + def : WriteRes { let ResourceCycles = [3]; } + def : WriteRes { let ResourceCycles = [5]; } + def : WriteRes; + def : WriteRes { let ResourceCycles = [2]; } + def : WriteRes { let ResourceCycles = [4]; } + def : WriteRes; + def : WriteRes { let ResourceCycles = [2]; } + def : WriteRes { let ResourceCycles = [4]; } +} + +def : WriteRes { let NumMicroOps = 3; + let BeginGroup = 1; + let EndGroup = 1; } // -------------------------- INSTRUCTIONS ---------------------------------- // @@ -82,26 +120,26 @@ // Stack allocation //===----------------------------------------------------------------------===// -def : InstRW<[FXU], (instregex "ADJDYNALLOC$")>; // Pseudo -> LA / LAY +def : InstRW<[WLat1, FXU, NormalGr], (instregex "ADJDYNALLOC$")>; // Pseudo -> LA / LAY //===----------------------------------------------------------------------===// // Branch instructions //===----------------------------------------------------------------------===// // Branch -def : InstRW<[LSU, EndGroup], (instregex "(Call)?BRC(L)?(Asm.*)?$")>; -def : InstRW<[LSU, EndGroup], (instregex "(Call)?J(G)?(Asm.*)?$")>; -def : InstRW<[LSU, EndGroup], (instregex "(Call)?BC(R)?(Asm.*)?$")>; -def : InstRW<[LSU, EndGroup], (instregex "(Call)?B(R)?(Asm.*)?$")>; -def : InstRW<[FXU, LSU, Lat5, GroupAlone], (instregex "BRCT(G|H)?$")>; -def : InstRW<[FXU, LSU, Lat5, GroupAlone], (instregex "BCT(G)?(R)?$")>; -def : InstRW<[FXU, FXU, FXU, LSU, Lat7, GroupAlone], +def : InstRW<[WLat1, LSU, EndGroup], (instregex "(Call)?BRC(L)?(Asm.*)?$")>; +def : InstRW<[WLat1, LSU, EndGroup], (instregex "(Call)?J(G)?(Asm.*)?$")>; +def : InstRW<[WLat1, LSU, EndGroup], (instregex "(Call)?BC(R)?(Asm.*)?$")>; +def : InstRW<[WLat1, LSU, EndGroup], (instregex "(Call)?B(R)?(Asm.*)?$")>; +def : InstRW<[WLat1, FXU, LSU, GroupAlone], (instregex "BRCT(G|H)?$")>; +def : InstRW<[WLat1, FXU, LSU, GroupAlone], (instregex "BCT(G)?(R)?$")>; +def : InstRW<[WLat1, FXU3, LSU, GroupAlone], (instregex "B(R)?X(H|L).*$")>; // Compare and branch -def : InstRW<[FXU, LSU, Lat5, GroupAlone], +def : InstRW<[WLat1, FXU, LSU, GroupAlone], (instregex "C(L)?(G)?(I|R)J(Asm.*)?$")>; -def : InstRW<[FXU, LSU, Lat5, GroupAlone], +def : InstRW<[WLat1, FXU, LSU, GroupAlone], (instregex "C(L)?(G)?(I|R)B(Call|Return|Asm.*)?$")>; //===----------------------------------------------------------------------===// @@ -109,528 +147,558 @@ //===----------------------------------------------------------------------===// // Trap -def : InstRW<[LSU, EndGroup], (instregex "(Cond)?Trap$")>; +def : InstRW<[WLat1, LSU, EndGroup], (instregex "(Cond)?Trap$")>; // Compare and trap -def : InstRW<[FXU], (instregex "C(G)?(I|R)T(Asm.*)?$")>; -def : InstRW<[FXU], (instregex "CL(G)?RT(Asm.*)?$")>; -def : InstRW<[FXU], (instregex "CL(F|G)IT(Asm.*)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "C(G)?(I|R)T(Asm.*)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "CL(G)?RT(Asm.*)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "CL(F|G)IT(Asm.*)?$")>; //===----------------------------------------------------------------------===// // Call and return instructions //===----------------------------------------------------------------------===// // Call -def : InstRW<[LSU, FXU, FXU, Lat6, GroupAlone], (instregex "(Call)?BRAS$")>; -def : InstRW<[LSU, FXU, FXU, Lat6, GroupAlone], (instregex "(Call)?BRASL$")>; -def : InstRW<[FXU, FXU, LSU, Lat6, GroupAlone], (instregex "(Call)?BAS(R)?$")>; -def : InstRW<[LSU, FXU, FXU, Lat6, GroupAlone], (instregex "TLS_(G|L)DCALL$")>; +def : InstRW<[WLat1, LSU, FXU2, GroupAlone], (instregex "(Call)?BRAS$")>; +def : InstRW<[WLat1, LSU, FXU2, GroupAlone], (instregex "(Call)?BRASL$")>; +def : InstRW<[WLat1, LSU, FXU2, GroupAlone], (instregex "(Call)?BAS(R)?$")>; +def : InstRW<[WLat1, LSU, FXU2, GroupAlone], (instregex "TLS_(G|L)DCALL$")>; // Return -def : InstRW<[LSU_lat1, EndGroup], (instregex "Return$")>; -def : InstRW<[LSU_lat1, EndGroup], (instregex "CondReturn$")>; +def : InstRW<[WLat1, LSU, EndGroup], (instregex "Return$")>; +def : InstRW<[WLat1, LSU, EndGroup], (instregex "CondReturn$")>; //===----------------------------------------------------------------------===// // Move instructions //===----------------------------------------------------------------------===// // Moves -def : InstRW<[FXU, LSU, Lat5], (instregex "MV(G|H)?HI$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "MVI(Y)?$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "MV(G|H)?HI$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "MVI(Y)?$")>; // Move character -def : InstRW<[LSU, LSU, LSU, FXU, Lat8, GroupAlone], (instregex "MVC$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MVCL(E|U)?$")>; +def : InstRW<[WLat1, FXU, LSU3, GroupAlone], (instregex "MVC$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "MVCL(E|U)?$")>; // Pseudo -> reg move -def : InstRW<[FXU], (instregex "COPY(_TO_REGCLASS)?$")>; -def : InstRW<[FXU], (instregex "EXTRACT_SUBREG$")>; -def : InstRW<[FXU], (instregex "INSERT_SUBREG$")>; -def : InstRW<[FXU], (instregex "REG_SEQUENCE$")>; -def : InstRW<[FXU], (instregex "SUBREG_TO_REG$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "COPY(_TO_REGCLASS)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "EXTRACT_SUBREG$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "INSERT_SUBREG$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "REG_SEQUENCE$")>; // Loads -def : InstRW<[LSU], (instregex "L(Y|FH|RL|Mux)?$")>; -def : InstRW<[LSU], (instregex "LG(RL)?$")>; -def : InstRW<[LSU], (instregex "L128$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "L(Y|FH|RL|Mux)?$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LG(RL)?$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "L128$")>; -def : InstRW<[FXU], (instregex "LLIH(F|H|L)$")>; -def : InstRW<[FXU], (instregex "LLIL(F|H|L)$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LLIH(F|H|L)$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LLIL(F|H|L)$")>; -def : InstRW<[FXU], (instregex "LG(F|H)I$")>; -def : InstRW<[FXU], (instregex "LHI(Mux)?$")>; -def : InstRW<[FXU], (instregex "LR(Mux)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LG(F|H)I$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LHI(Mux)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LR(Mux)?$")>; // Load and test -def : InstRW<[FXU, LSU, Lat5], (instregex "LT(G)?$")>; -def : InstRW<[FXU], (instregex "LT(G)?R$")>; +def : InstRW<[WLat1LSU, WLat1LSU, LSU, FXU, NormalGr], (instregex "LT(G)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LT(G)?R$")>; // Stores -def : InstRW<[FXU, LSU, Lat5], (instregex "STG(RL)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "ST128$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "ST(Y|FH|RL|Mux)?$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STG(RL)?$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "ST128$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "ST(Y|FH|RL|Mux)?$")>; // String moves. -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MVST$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "MVST$")>; //===----------------------------------------------------------------------===// // Conditional move instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, Lat2, EndGroup], (instregex "LOC(G)?R(Asm.*)?$")>; -def : InstRW<[FXU, LSU, Lat6, EndGroup], (instregex "LOC(G)?(Asm.*)?$")>; -def : InstRW<[FXU, LSU, Lat5, EndGroup], (instregex "STOC(G)?(Asm.*)?$")>; +def : InstRW<[WLat2, FXU, EndGroup], (instregex "LOC(G)?R(Asm.*)?$")>; +def : InstRW<[WLat2LSU, RegReadAdv, FXU, LSU, EndGroup], + (instregex "LOC(G)?(Asm.*)?$")>; +def : InstRW<[WLat1, FXU, LSU, EndGroup], (instregex "STOC(G)?(Asm.*)?$")>; //===----------------------------------------------------------------------===// // Sign extensions //===----------------------------------------------------------------------===// -def : InstRW<[FXU], (instregex "L(B|H|G)R$")>; -def : InstRW<[FXU], (instregex "LG(B|H|F)R$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LTGF$")>; -def : InstRW<[FXU], (instregex "LTGFR$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "L(B|H|G)R$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LG(B|H|F)R$")>; + +def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "LTGF$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LTGFR$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LB(H|Mux)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LH(Y)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LH(H|Mux|RL)$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LG(B|H|F)$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LG(H|F)RL$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LB(H|Mux)?$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LH(Y)?$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LH(H|Mux|RL)$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LG(B|H|F)$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LG(H|F)RL$")>; //===----------------------------------------------------------------------===// // Zero extensions //===----------------------------------------------------------------------===// -def : InstRW<[FXU], (instregex "LLCR(Mux)?$")>; -def : InstRW<[FXU], (instregex "LLHR(Mux)?$")>; -def : InstRW<[FXU], (instregex "LLG(C|F|H|T)R$")>; -def : InstRW<[LSU], (instregex "LLC(Mux)?$")>; -def : InstRW<[LSU], (instregex "LLH(Mux)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LL(C|H)H$")>; -def : InstRW<[LSU], (instregex "LLHRL$")>; -def : InstRW<[LSU], (instregex "LLG(C|F|H|T|FRL|HRL)$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LLCR(Mux)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LLHR(Mux)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LLG(C|H|F|T)R$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLC(Mux)?$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLH(Mux)?$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LL(C|H)H$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLHRL$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLG(C|H|F|T|HRL|FRL)$")>; //===----------------------------------------------------------------------===// // Truncations //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat5], (instregex "STC(H|Y|Mux)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "STH(H|Y|RL|Mux)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "STCM(H|Y)?$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STC(H|Y|Mux)?$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STH(H|Y|RL|Mux)?$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STCM(H|Y)?$")>; //===----------------------------------------------------------------------===// // Multi-register moves //===----------------------------------------------------------------------===// // Load multiple (estimated average of 5 ops) -def : InstRW<[LSU, LSU, LSU, LSU, LSU, Lat10, GroupAlone], - (instregex "LM(H|Y|G)?$")>; +def : InstRW<[WLat10, WLat10, LSU5, GroupAlone], (instregex "LM(H|Y|G)?$")>; // Load multiple disjoint -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "LMD$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "LMD$")>; // Store multiple (estimated average of 3 ops) -def : InstRW<[LSU, LSU, FXU, FXU, FXU, Lat10, GroupAlone], - (instregex "STM(H|Y|G)?$")>; +def : InstRW<[WLat1, LSU2, FXU5, GroupAlone], (instregex "STM(H|Y|G)?$")>; //===----------------------------------------------------------------------===// // Byte swaps //===----------------------------------------------------------------------===// -def : InstRW<[FXU], (instregex "LRV(G)?R$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LRV(G|H)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "STRV(G|H)?$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MVCIN$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LRV(G)?R$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LRV(G|H)?$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STRV(G|H)?$")>; +def : InstRW<[WLat30, MCD], (instregex "MVCIN$")>; //===----------------------------------------------------------------------===// // Load address instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU], (instregex "LA(Y|RL)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LA(Y|RL)?$")>; // Load the Global Offset Table address -def : InstRW<[FXU], (instregex "GOT$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "GOT$")>; //===----------------------------------------------------------------------===// // Absolute and Negation //===----------------------------------------------------------------------===// -def : InstRW<[FXU, Lat2], (instregex "LP(G)?R$")>; -def : InstRW<[FXU, FXU, Lat3, GroupAlone], (instregex "L(N|P)GFR$")>; -def : InstRW<[FXU, Lat2], (instregex "LN(R|GR)$")>; -def : InstRW<[FXU], (instregex "LC(R|GR)$")>; -def : InstRW<[FXU, FXU, Lat2, GroupAlone], (instregex "LCGFR$")>; +def : InstRW<[WLat2, WLat2, FXU, NormalGr], (instregex "LP(G)?R$")>; +def : InstRW<[WLat3, WLat3, FXU2, GroupAlone], (instregex "L(N|P)GFR$")>; +def : InstRW<[WLat2, WLat2, FXU, NormalGr], (instregex "LN(R|GR)$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LC(R|GR)$")>; +def : InstRW<[WLat2, WLat2, FXU2, GroupAlone], (instregex "LCGFR$")>; //===----------------------------------------------------------------------===// // Insertion //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat5], (instregex "IC(Y)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "IC32(Y)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "ICM(H|Y)?$")>; -def : InstRW<[FXU], (instregex "II(F|H|L)Mux$")>; -def : InstRW<[FXU], (instregex "IIHF(64)?$")>; -def : InstRW<[FXU], (instregex "IIHH(64)?$")>; -def : InstRW<[FXU], (instregex "IIHL(64)?$")>; -def : InstRW<[FXU], (instregex "IILF(64)?$")>; -def : InstRW<[FXU], (instregex "IILH(64)?$")>; -def : InstRW<[FXU], (instregex "IILL(64)?$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "IC(Y)?$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "IC32(Y)?$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "ICM(H|Y)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "II(F|H|L)Mux$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "IIHF(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "IIHH(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "IIHL(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "IILF(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "IILH(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "IILL(64)?$")>; //===----------------------------------------------------------------------===// // Addition //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat5], (instregex "A(L)?(Y|SI)?$")>; -def : InstRW<[FXU, FXU, LSU, Lat6, GroupAlone], (instregex "AH(Y)?$")>; -def : InstRW<[FXU], (instregex "AIH$")>; -def : InstRW<[FXU], (instregex "AFI(Mux)?$")>; -def : InstRW<[FXU], (instregex "AGFI$")>; -def : InstRW<[FXU], (instregex "AGHI(K)?$")>; -def : InstRW<[FXU], (instregex "AGR(K)?$")>; -def : InstRW<[FXU], (instregex "AHI(K)?$")>; -def : InstRW<[FXU], (instregex "AHIMux(K)?$")>; -def : InstRW<[FXU], (instregex "AL(FI|HSIK)$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "ALGF$")>; -def : InstRW<[FXU], (instregex "ALGHSIK$")>; -def : InstRW<[FXU], (instregex "ALGF(I|R)$")>; -def : InstRW<[FXU], (instregex "ALGR(K)?$")>; -def : InstRW<[FXU], (instregex "ALR(K)?$")>; -def : InstRW<[FXU], (instregex "AR(K)?$")>; -def : InstRW<[FXU], (instregex "A(L)?HHHR$")>; -def : InstRW<[FXU, FXU, Lat3, GroupAlone], (instregex "A(L)?HHLR$")>; -def : InstRW<[FXU], (instregex "ALSIH(N)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "A(L)?G(SI)?$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "A(L)?(Y)?$")>; +def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "A(L)?SI$")>; +def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXU2, LSU, GroupAlone], + (instregex "AH(Y)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "AIH$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "AFI(Mux)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "AGFI$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "AGHI(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "AGR(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "AHI(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "AHIMux(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "AL(FI|HSIK)$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "ALGF$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "ALGHSIK$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "ALGF(I|R)$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "ALGR(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "ALR(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "AR(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "A(L)?HHHR$")>; +def : InstRW<[WLat2, WLat2, FXU2, GroupAlone], (instregex "A(L)?HHLR$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "ALSIH(N)?$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "A(L)?G$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "A(L)?GSI$")>; // Logical addition with carry -def : InstRW<[FXU, LSU, Lat7, GroupAlone], (instregex "ALC(G)?$")>; -def : InstRW<[FXU, Lat3, GroupAlone], (instregex "ALC(G)?R$")>; +def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXU, LSU, GroupAlone], + (instregex "ALC(G)?$")>; +def : InstRW<[WLat2, WLat2, FXU, GroupAlone], (instregex "ALC(G)?R$")>; // Add with sign extension (32 -> 64) -def : InstRW<[FXU, FXU, LSU, Lat6, GroupAlone], (instregex "AGF$")>; -def : InstRW<[FXU, FXU, Lat2, GroupAlone], (instregex "AGFR$")>; +def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXU2, LSU, GroupAlone], + (instregex "AGF$")>; +def : InstRW<[WLat2, WLat2, FXU2, GroupAlone], (instregex "AGFR$")>; //===----------------------------------------------------------------------===// // Subtraction //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat5], (instregex "S(G|Y)?$")>; -def : InstRW<[FXU, FXU, LSU, Lat6, GroupAlone], (instregex "SH(Y)?$")>; -def : InstRW<[FXU], (instregex "SGR(K)?$")>; -def : InstRW<[FXU], (instregex "SLFI$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "SL(G|GF|Y)?$")>; -def : InstRW<[FXU], (instregex "SLGF(I|R)$")>; -def : InstRW<[FXU], (instregex "SLGR(K)?$")>; -def : InstRW<[FXU], (instregex "SLR(K)?$")>; -def : InstRW<[FXU], (instregex "SR(K)?$")>; -def : InstRW<[FXU], (instregex "S(L)?HHHR$")>; -def : InstRW<[FXU, FXU, Lat3, GroupAlone], (instregex "S(L)?HHLR$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "S(G|Y)?$")>; +def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXU2, LSU, GroupAlone], + (instregex "SH(Y)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "SGR(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "SLFI$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "SL(G|GF|Y)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "SLGF(I|R)$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "SLGR(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "SLR(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "SR(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "S(L)?HHHR$")>; +def : InstRW<[WLat2, WLat2, FXU2, GroupAlone], (instregex "S(L)?HHLR$")>; // Subtraction with borrow -def : InstRW<[FXU, LSU, Lat7, GroupAlone], (instregex "SLB(G)?$")>; -def : InstRW<[FXU, Lat3, GroupAlone], (instregex "SLB(G)?R$")>; +def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXU, LSU, GroupAlone], + (instregex "SLB(G)?$")>; +def : InstRW<[WLat2, WLat2, FXU, GroupAlone], (instregex "SLB(G)?R$")>; // Subtraction with sign extension (32 -> 64) -def : InstRW<[FXU, FXU, LSU, Lat6, GroupAlone], (instregex "SGF$")>; -def : InstRW<[FXU, FXU, Lat2, GroupAlone], (instregex "SGFR$")>; +def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXU2, LSU, GroupAlone], + (instregex "SGF$")>; +def : InstRW<[WLat2, WLat2, FXU2, GroupAlone], (instregex "SGFR$")>; //===----------------------------------------------------------------------===// // AND //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat5], (instregex "N(G|Y)?$")>; -def : InstRW<[FXU], (instregex "NGR(K)?$")>; -def : InstRW<[FXU], (instregex "NI(FMux|HMux|LMux)$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "NI(Y)?$")>; -def : InstRW<[FXU], (instregex "NIHF(64)?$")>; -def : InstRW<[FXU], (instregex "NIHH(64)?$")>; -def : InstRW<[FXU], (instregex "NIHL(64)?$")>; -def : InstRW<[FXU], (instregex "NILF(64)?$")>; -def : InstRW<[FXU], (instregex "NILH(64)?$")>; -def : InstRW<[FXU], (instregex "NILL(64)?$")>; -def : InstRW<[FXU], (instregex "NR(K)?$")>; -def : InstRW<[LSU, LSU, FXU, Lat9, GroupAlone], (instregex "NC$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "N(G|Y)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "NGR(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "NI(FMux|HMux|LMux)$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "NI(Y)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "NIHF(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "NIHH(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "NIHL(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "NILF(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "NILH(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "NILL(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "NR(K)?$")>; +def : InstRW<[WLat5LSU, LSU2, FXU, GroupAlone], (instregex "NC$")>; //===----------------------------------------------------------------------===// // OR //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat5], (instregex "O(G|Y)?$")>; -def : InstRW<[FXU], (instregex "OGR(K)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "OI(Y)?$")>; -def : InstRW<[FXU], (instregex "OI(FMux|HMux|LMux)$")>; -def : InstRW<[FXU], (instregex "OIHF(64)?$")>; -def : InstRW<[FXU], (instregex "OIHH(64)?$")>; -def : InstRW<[FXU], (instregex "OIHL(64)?$")>; -def : InstRW<[FXU], (instregex "OILF(64)?$")>; -def : InstRW<[FXU], (instregex "OILH(64)?$")>; -def : InstRW<[FXU], (instregex "OILL(64)?$")>; -def : InstRW<[FXU], (instregex "OR(K)?$")>; -def : InstRW<[LSU, LSU, FXU, Lat9, GroupAlone], (instregex "OC$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "O(G|Y)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "OGR(K)?$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "OI(Y)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "OI(FMux|HMux|LMux)$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "OIHF(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "OIHH(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "OIHL(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "OILF(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "OILH(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "OILL(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "OR(K)?$")>; +def : InstRW<[WLat5LSU, LSU2, FXU, GroupAlone], (instregex "OC$")>; //===----------------------------------------------------------------------===// // XOR //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat5], (instregex "X(G|Y)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "XI(Y)?$")>; -def : InstRW<[FXU], (instregex "XIFMux$")>; -def : InstRW<[FXU], (instregex "XGR(K)?$")>; -def : InstRW<[FXU], (instregex "XIHF(64)?$")>; -def : InstRW<[FXU], (instregex "XILF(64)?$")>; -def : InstRW<[FXU], (instregex "XR(K)?$")>; -def : InstRW<[LSU, LSU, FXU, Lat9, GroupAlone], (instregex "XC$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "X(G|Y)?$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "XI(Y)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "XIFMux$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "XGR(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "XIHF(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "XILF(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "XR(K)?$")>; +def : InstRW<[WLat5LSU, LSU2, FXU, GroupAlone], (instregex "XC$")>; //===----------------------------------------------------------------------===// // Multiplication //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat10], (instregex "MS(GF|Y)?$")>; -def : InstRW<[FXU, Lat6], (instregex "MS(R|FI)$")>; -def : InstRW<[FXU, LSU, Lat12], (instregex "MSG$")>; -def : InstRW<[FXU, Lat8], (instregex "MSGR$")>; -def : InstRW<[FXU, Lat6], (instregex "MSGF(I|R)$")>; -def : InstRW<[FXU, FXU, LSU, Lat15, GroupAlone], (instregex "MLG$")>; -def : InstRW<[FXU, FXU, Lat9, GroupAlone], (instregex "MLGR$")>; -def : InstRW<[FXU, Lat5], (instregex "MGHI$")>; -def : InstRW<[FXU, Lat5], (instregex "MHI$")>; -def : InstRW<[FXU, LSU, Lat9], (instregex "MH(Y)?$")>; -def : InstRW<[FXU, FXU, Lat7, GroupAlone], (instregex "M(L)?R$")>; -def : InstRW<[FXU, FXU, LSU, Lat7, GroupAlone], (instregex "M(FY|L)?$")>; +def : InstRW<[WLat6LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "MS(GF|Y)?$")>; +def : InstRW<[WLat6, FXU, NormalGr], (instregex "MS(R|FI)$")>; +def : InstRW<[WLat8LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "MSG$")>; +def : InstRW<[WLat8, FXU, NormalGr], (instregex "MSGR$")>; +def : InstRW<[WLat6, FXU, NormalGr], (instregex "MSGF(I|R)$")>; +def : InstRW<[WLat11LSU, RegReadAdv, FXU2, LSU, GroupAlone], + (instregex "MLG$")>; +def : InstRW<[WLat9, FXU2, GroupAlone], (instregex "MLGR$")>; +def : InstRW<[WLat5, FXU, NormalGr], (instregex "MGHI$")>; +def : InstRW<[WLat5, FXU, NormalGr], (instregex "MHI$")>; +def : InstRW<[WLat5LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "MH(Y)?$")>; +def : InstRW<[WLat7, FXU2, GroupAlone], (instregex "M(L)?R$")>; +def : InstRW<[WLat7LSU, RegReadAdv, FXU2, LSU, GroupAlone], + (instregex "M(FY|L)?$")>; //===----------------------------------------------------------------------===// // Division and remainder //===----------------------------------------------------------------------===// -def : InstRW<[FPU2, FPU2, FXU, FXU, FXU, FXU, FXU, Lat30, GroupAlone], - (instregex "DR$")>; -def : InstRW<[FPU2, FPU2, LSU, FXU, FXU, FXU, FXU, Lat30, GroupAlone], - (instregex "D$")>; -def : InstRW<[FPU2, FPU2, FXU, FXU, FXU, FXU, Lat30, GroupAlone], - (instregex "DSG(F)?R$")>; -def : InstRW<[FPU2, FPU2, LSU, FXU, FXU, FXU, Lat30, GroupAlone], - (instregex "DSG(F)?$")>; -def : InstRW<[FPU2, FPU2, FXU, FXU, FXU, FXU, FXU, Lat30, GroupAlone], - (instregex "DL(G)?R$")>; -def : InstRW<[FPU2, FPU2, LSU, FXU, FXU, FXU, FXU, Lat30, GroupAlone], - (instregex "DL(G)?$")>; +def : InstRW<[WLat30, FPU4, FXU5, GroupAlone], (instregex "DR$")>; +def : InstRW<[WLat30, RegReadAdv, FPU4, LSU, FXU4, GroupAlone], + (instregex "D$")>; +def : InstRW<[WLat30, FPU4, FXU4, GroupAlone], (instregex "DSG(F)?R$")>; +def : InstRW<[WLat30, RegReadAdv, FPU4, LSU, FXU3, GroupAlone], + (instregex "DSG(F)?$")>; +def : InstRW<[WLat30, FPU4, FXU5, GroupAlone], (instregex "DL(G)?R$")>; +def : InstRW<[WLat30, RegReadAdv, FPU4, LSU, FXU4, GroupAlone], + (instregex "DL(G)?$")>; //===----------------------------------------------------------------------===// // Shifts //===----------------------------------------------------------------------===// -def : InstRW<[FXU], (instregex "SLL(G|K)?$")>; -def : InstRW<[FXU], (instregex "SRL(G|K)?$")>; -def : InstRW<[FXU], (instregex "SRA(G|K)?$")>; -def : InstRW<[FXU, Lat2], (instregex "SLA(G|K)?$")>; -def : InstRW<[FXU, FXU, FXU, FXU, LSU, Lat8, GroupAlone], +def : InstRW<[WLat1, FXU, NormalGr], (instregex "SLL(G|K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "SRL(G|K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "SRA(G|K)?$")>; +def : InstRW<[WLat2, WLat2, FXU, NormalGr], (instregex "SLA(G|K)?$")>; +def : InstRW<[WLat5LSU, WLat5LSU, FXU4, LSU, GroupAlone], (instregex "S(L|R)D(A|L)$")>; // Rotate -def : InstRW<[FXU, LSU, Lat6], (instregex "RLL(G)?$")>; +def : InstRW<[WLat2LSU, FXU, LSU, NormalGr], (instregex "RLL(G)?$")>; // Rotate and insert -def : InstRW<[FXU], (instregex "RISBG(32)?$")>; -def : InstRW<[FXU], (instregex "RISBH(G|H|L)$")>; -def : InstRW<[FXU], (instregex "RISBL(G|H|L)$")>; -def : InstRW<[FXU], (instregex "RISBMux$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "RISBG(32)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "RISBH(G|H|L)$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "RISBL(G|H|L)$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "RISBMux$")>; // Rotate and Select -def : InstRW<[FXU, FXU, Lat3, GroupAlone], (instregex "R(N|O|X)SBG$")>; +def : InstRW<[WLat3, WLat3, FXU2, GroupAlone], (instregex "R(N|O|X)SBG$")>; //===----------------------------------------------------------------------===// // Comparison //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat5], (instregex "C(G|Y|Mux|RL)?$")>; -def : InstRW<[FXU], (instregex "C(F|H)I(Mux)?$")>; -def : InstRW<[FXU], (instregex "CG(F|H)I$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "CG(HSI|RL)$")>; -def : InstRW<[FXU], (instregex "C(G)?R$")>; -def : InstRW<[FXU], (instregex "CIH$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "CH(F|SI)$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "CL(Y|Mux|FHSI)?$")>; -def : InstRW<[FXU], (instregex "CLFI(Mux)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "CLG(HRL|HSI)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "CLGF(RL)?$")>; -def : InstRW<[FXU], (instregex "CLGF(I|R)$")>; -def : InstRW<[FXU], (instregex "CLGR$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "CLGRL$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "CLH(F|RL|HSI)$")>; -def : InstRW<[FXU], (instregex "CLIH$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "CLI(Y)?$")>; -def : InstRW<[FXU], (instregex "CLR$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "CLRL$")>; -def : InstRW<[FXU], (instregex "C(L)?HHR$")>; -def : InstRW<[FXU, FXU, Lat3, GroupAlone], (instregex "C(L)?HLR$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "C(G|Y|Mux|RL)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "C(F|H)I(Mux)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "CG(F|H)I$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CG(HSI|RL)$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "C(G)?R$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "CIH$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CHF$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CHSI$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "CL(Y|Mux)?$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLFHSI$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "CLFI(Mux)?$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CLG$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLG(HRL|HSI)$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CLGF$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLGFRL$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "CLGF(I|R)$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "CLGR$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLGRL$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CLHF$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLH(RL|HSI)$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "CLIH$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLI(Y)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "CLR$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLRL$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "C(L)?HHR$")>; +def : InstRW<[WLat2, FXU2, GroupAlone], (instregex "C(L)?HLR$")>; // Compare halfword -def : InstRW<[FXU, LSU, FXU, Lat6, GroupAlone], (instregex "CH(Y|RL)?$")>; -def : InstRW<[FXU, LSU, FXU, Lat6, GroupAlone], (instregex "CGH(RL)?$")>; -def : InstRW<[FXU, LSU, FXU, Lat6, GroupAlone], (instregex "CHHSI$")>; +def : InstRW<[WLat2LSU, RegReadAdv, FXU2, LSU, GroupAlone], + (instregex "CH(Y)?$")>; +def : InstRW<[WLat2LSU, FXU2, LSU, GroupAlone], (instregex "CHRL$")>; +def : InstRW<[WLat2LSU, RegReadAdv, FXU2, LSU, GroupAlone], (instregex "CGH$")>; +def : InstRW<[WLat2LSU, FXU2, LSU, GroupAlone], (instregex "CGHRL$")>; +def : InstRW<[WLat2LSU, FXU2, LSU, GroupAlone], (instregex "CHHSI$")>; // Compare with sign extension (32 -> 64) -def : InstRW<[FXU, FXU, LSU, Lat6, Lat2, GroupAlone], (instregex "CGF(RL)?$")>; -def : InstRW<[FXU, FXU, Lat2, GroupAlone], (instregex "CGFR$")>; +def : InstRW<[WLat2LSU, RegReadAdv, FXU2, LSU, GroupAlone], (instregex "CGF$")>; +def : InstRW<[WLat2LSU, FXU2, LSU, GroupAlone], (instregex "CGFRL$")>; +def : InstRW<[WLat2, FXU2, GroupAlone], (instregex "CGFR$")>; // Compare logical character -def : InstRW<[LSU, LSU, FXU, Lat9, GroupAlone], (instregex "CLC$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "CLCL(E|U)?$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "CLST$")>; +def : InstRW<[WLat9, FXU, LSU2, GroupAlone], (instregex "CLC$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CLCL(E|U)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CLST$")>; // Test under mask -def : InstRW<[FXU, LSU, Lat5], (instregex "TM(Y)?$")>; -def : InstRW<[FXU], (instregex "TM(H|L)Mux$")>; -def : InstRW<[FXU], (instregex "TMHH(64)?$")>; -def : InstRW<[FXU], (instregex "TMHL(64)?$")>; -def : InstRW<[FXU], (instregex "TMLH(64)?$")>; -def : InstRW<[FXU], (instregex "TMLL(64)?$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "TM(Y)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "TM(H|L)Mux$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "TMHH(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "TMHL(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "TMLH(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "TMLL(64)?$")>; // Compare logical characters under mask -def : InstRW<[FXU, FXU, LSU, Lat5, GroupAlone], (instregex "CLM(H|Y)?$")>; +def : InstRW<[WLat2LSU, RegReadAdv, FXU2, LSU, GroupAlone], + (instregex "CLM(H|Y)?$")>; //===----------------------------------------------------------------------===// // Prefetch //===----------------------------------------------------------------------===// -def : InstRW<[LSU, GroupAlone], (instregex "PFD(RL)?$")>; +def : InstRW<[WLat1, LSU, GroupAlone], (instregex "PFD(RL)?$")>; //===----------------------------------------------------------------------===// // Atomic operations //===----------------------------------------------------------------------===// -def : InstRW<[LSU, EndGroup], (instregex "Serialize$")>; +def : InstRW<[WLat1, LSU, EndGroup], (instregex "Serialize$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LAA(G)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LAAL(G)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LAN(G)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LAO(G)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LAX(G)?$")>; +def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "LAA(G)?$")>; +def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "LAAL(G)?$")>; +def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "LAN(G)?$")>; +def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "LAO(G)?$")>; +def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "LAX(G)?$")>; // Test and set -def : InstRW<[FXU, LSU, Lat5, EndGroup], (instregex "TS$")>; +def : InstRW<[WLat1LSU, FXU, LSU, EndGroup], (instregex "TS$")>; // Compare and swap -def : InstRW<[FXU, LSU, FXU, Lat6, GroupAlone], (instregex "CS(G|Y)?$")>; +def : InstRW<[WLat2LSU, WLat2LSU, FXU2, LSU, GroupAlone], + (instregex "CS(G|Y)?$")>; // Compare double and swap -def : InstRW<[FXU, FXU, FXU, FXU, FXU, LSU, Lat10, GroupAlone], +def : InstRW<[WLat5LSU, WLat5LSU, FXU5, LSU, GroupAlone], (instregex "CDS(Y)?$")>; -def : InstRW<[FXU, FXU, FXU, FXU, FXU, FXU, LSU, LSU, Lat12, GroupAlone], +def : InstRW<[WLat12, WLat12, FXU6, LSU2, GroupAlone], (instregex "CDSG$")>; // Compare and swap and store -def : InstRW<[FXU, LSU, Lat30], (instregex "CSST$")>; +def : InstRW<[WLat30, MCD], (instregex "CSST$")>; // Perform locked operation -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "PLO$")>; +def : InstRW<[WLat30, MCD], (instregex "PLO$")>; // Load/store pair from/to quadword -def : InstRW<[LSU, LSU, Lat5, GroupAlone], (instregex "LPQ$")>; -def : InstRW<[FXU, FXU, LSU, LSU, Lat6, GroupAlone], (instregex "STPQ$")>; +def : InstRW<[WLat4LSU, LSU2, GroupAlone], (instregex "LPQ$")>; +def : InstRW<[WLat1, FXU2, LSU2, GroupAlone], (instregex "STPQ$")>; // Load pair disjoint -def : InstRW<[LSU, LSU, Lat5, GroupAlone], (instregex "LPD(G)?$")>; +def : InstRW<[WLat2LSU, WLat2LSU, LSU2, GroupAlone], (instregex "LPD(G)?$")>; //===----------------------------------------------------------------------===// // Translate and convert //===----------------------------------------------------------------------===// -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "TR$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "TRT$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "TRTR$")>; -def : InstRW<[FXU, Lat30], (instregex "TRE$")>; -def : InstRW<[FXU, Lat30], (instregex "TRT(R)?E(Opt)?$")>; -def : InstRW<[LSU, Lat30], (instregex "TR(T|O)(T|O)(Opt)?$")>; -def : InstRW<[FXU, Lat30], (instregex "CU(12|14|21|24|41|42)(Opt)?$")>; -def : InstRW<[FXU, Lat30], (instregex "(CUUTF|CUTFU)(Opt)?$")>; +def : InstRW<[WLat30, MCD], (instregex "TR$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "TRT$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "TRTR$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "TRE$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "TRT(R)?E(Opt)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "TR(T|O)(T|O)(Opt)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], + (instregex "CU(12|14|21|24|41|42)(Opt)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "(CUUTF|CUTFU)(Opt)?$")>; //===----------------------------------------------------------------------===// // Message-security assist //===----------------------------------------------------------------------===// -def : InstRW<[FXU, Lat30], (instregex "KM(C|F|O|CTR)?$")>; -def : InstRW<[FXU, Lat30], (instregex "(KIMD|KLMD|KMAC|PCC)$")>; +def : InstRW<[WLat30, WLat30, WLat30, WLat30, MCD], + (instregex "KM(C|F|O|CTR)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "(KIMD|KLMD|KMAC|PCC)$")>; //===----------------------------------------------------------------------===// // Decimal arithmetic //===----------------------------------------------------------------------===// -def : InstRW<[FXU, DFU2, LSU, LSU, Lat30, GroupAlone], (instregex "CVBG$")>; -def : InstRW<[FXU, DFU, LSU, Lat30, GroupAlone], (instregex "CVB(Y)?$")>; -def : InstRW<[FXU, FXU, FXU, DFU2, DFU2, LSU, Lat30, GroupAlone], - (instregex "CVDG$")>; -def : InstRW<[FXU, FXU, DFU, LSU, Lat30, GroupAlone], (instregex "CVD(Y)?$")>; -def : InstRW<[LSU, Lat10, GroupAlone], (instregex "MVO$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MV(N|Z)$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "(PACK|PKA|PKU)$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "UNPK$")>; -def : InstRW<[LSU, Lat12, GroupAlone], (instregex "UNPK(A|U)$")>; +def : InstRW<[WLat30, RegReadAdv, FXU, DFU2, LSU2, GroupAlone], + (instregex "CVBG$")>; +def : InstRW<[WLat20, RegReadAdv, FXU, DFU, LSU, GroupAlone], + (instregex "CVB(Y)?$")>; +def : InstRW<[WLat1, FXU3, DFU4, LSU, GroupAlone], (instregex "CVDG$")>; +def : InstRW<[WLat1, FXU2, DFU, LSU, GroupAlone], (instregex "CVD(Y)?$")>; +def : InstRW<[WLat1, LSU5, GroupAlone], (instregex "MV(N|O|Z)$")>; +def : InstRW<[WLat1, LSU5, GroupAlone], (instregex "(PACK|PKA|PKU)$")>; +def : InstRW<[WLat10, LSU5, GroupAlone], (instregex "UNPK(A|U)$")>; +def : InstRW<[WLat1, LSU5, GroupAlone], (instregex "UNPK$")>; -def : InstRW<[FXU, DFU2, DFU2, LSU, LSU, Lat15, GroupAlone], +def : InstRW<[WLat11LSU, FXU, DFU4, LSU2, GroupAlone], (instregex "(A|S|ZA)P$")>; -def : InstRW<[FXU, DFU2, DFU2, LSU, LSU, Lat30, GroupAlone], - (instregex "(M|D)P$")>; -def : InstRW<[FXU, FXU, DFU2, DFU2, LSU, LSU, LSU, Lat15, GroupAlone], - (instregex "SRP$")>; -def : InstRW<[DFU2, DFU2, LSU, LSU, Lat11, GroupAlone], (instregex "CP$")>; -def : InstRW<[DFU2, LSU, LSU, GroupAlone], (instregex "TP$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "ED(MK)?$")>; +def : InstRW<[WLat1, FXU, DFU4, LSU2, GroupAlone], (instregex "(M|D)P$")>; +def : InstRW<[WLat15, FXU2, DFU4, LSU3, GroupAlone], (instregex "SRP$")>; +def : InstRW<[WLat11, DFU4, LSU2, GroupAlone], (instregex "CP$")>; +def : InstRW<[WLat5LSU, DFU2, LSU2, GroupAlone], (instregex "TP$")>; +def : InstRW<[WLat30, MCD], (instregex "ED(MK)?$")>; //===----------------------------------------------------------------------===// // Access registers //===----------------------------------------------------------------------===// // Extract/set/copy access register -def : InstRW<[LSU], (instregex "(EAR|SAR|CPYA)$")>; +def : InstRW<[WLat3, LSU, NormalGr], (instregex "(EAR|SAR|CPYA)$")>; // Load address extended -def : InstRW<[LSU, FXU, Lat5, GroupAlone], (instregex "LAE(Y)?$")>; +def : InstRW<[WLat5, LSU, FXU, GroupAlone], (instregex "LAE(Y)?$")>; // Load/store access multiple (not modeled precisely) -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "(L|ST)AM(Y)?$")>; +def : InstRW<[WLat10, WLat10, LSU5, GroupAlone], (instregex "LAM(Y)?$")>; +def : InstRW<[WLat1, FXU5, LSU5, GroupAlone], (instregex "STAM(Y)?$")>; //===----------------------------------------------------------------------===// // Program mask and addressing mode //===----------------------------------------------------------------------===// // Insert Program Mask -def : InstRW<[FXU, Lat3, EndGroup], (instregex "IPM$")>; +def : InstRW<[WLat3, FXU, EndGroup], (instregex "IPM$")>; // Set Program Mask -def : InstRW<[LSU, EndGroup], (instregex "SPM$")>; +def : InstRW<[WLat3, LSU, EndGroup], (instregex "SPM$")>; // Branch and link -def : InstRW<[FXU, FXU, LSU, Lat8, GroupAlone], (instregex "BAL(R)?$")>; +def : InstRW<[WLat1, FXU2, LSU, GroupAlone], (instregex "BAL(R)?$")>; // Test addressing mode -def : InstRW<[FXU], (instregex "TAM$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "TAM$")>; // Set addressing mode -def : InstRW<[LSU, EndGroup], (instregex "SAM(24|31|64)$")>; +def : InstRW<[WLat1, LSU, EndGroup], (instregex "SAM(24|31|64)$")>; // Branch (and save) and set mode. -def : InstRW<[FXU, LSU, Lat5, GroupAlone], (instregex "BSM$")>; -def : InstRW<[FXU, FXU, LSU, Lat6, GroupAlone], (instregex "BASSM$")>; +def : InstRW<[WLat1, FXU, LSU, GroupAlone], (instregex "BSM$")>; +def : InstRW<[WLat1, FXU2, LSU, GroupAlone], (instregex "BASSM$")>; //===----------------------------------------------------------------------===// // Miscellaneous Instructions. //===----------------------------------------------------------------------===// // Find leftmost one -def : InstRW<[FXU, FXU, Lat7, GroupAlone], (instregex "FLOGR$")>; +def : InstRW<[WLat7, WLat7, FXU2, GroupAlone], (instregex "FLOGR$")>; // Population count -def : InstRW<[FXU, Lat3], (instregex "POPCNT$")>; +def : InstRW<[WLat3, WLat3, FXU, NormalGr], (instregex "POPCNT$")>; // String instructions -def : InstRW<[FXU, LSU, Lat30], (instregex "SRST$")>; -def : InstRW<[FXU, Lat30], (instregex "SRSTU$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "CUSE$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "SRST(U)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CUSE$")>; // Various complex instructions -def : InstRW<[LSU, Lat30], (instregex "CFC$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "UPT$")>; -def : InstRW<[LSU, Lat30], (instregex "CKSM$")>; -def : InstRW<[FXU, Lat30], (instregex "CMPSC$")>; +def : InstRW<[WLat30, WLat30, WLat30, WLat30, MCD], (instregex "CFC$")>; +def : InstRW<[WLat30, WLat30, WLat30, WLat30, WLat30, WLat30, MCD], + (instregex "UPT$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CKSM$")>; +def : InstRW<[WLat30, WLat30, WLat30, WLat30, MCD], (instregex "CMPSC$")>; // Execute def : InstRW<[LSU, GroupAlone], (instregex "EX(RL)?$")>; @@ -651,154 +719,151 @@ //===----------------------------------------------------------------------===// // Load zero -def : InstRW<[FXU], (instregex "LZ(DR|ER)$")>; -def : InstRW<[FXU, FXU, Lat2, GroupAlone], (instregex "LZXR$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LZ(DR|ER)$")>; +def : InstRW<[WLat2, FXU2, GroupAlone], (instregex "LZXR$")>; // Load -def : InstRW<[FXU], (instregex "LER$")>; -def : InstRW<[FXU], (instregex "LD(R|R32|GR)$")>; -def : InstRW<[FXU, Lat3], (instregex "LGDR$")>; -def : InstRW<[FXU, FXU, Lat2, GroupAlone], (instregex "LXR$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LER$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LD(R|R32|GR)$")>; +def : InstRW<[WLat3, FXU, NormalGr], (instregex "LGDR$")>; +def : InstRW<[WLat2, FXU2, GroupAlone], (instregex "LXR$")>; // Load and Test -def : InstRW<[FPU], (instregex "LT(D|E)BR$")>; -def : InstRW<[FPU], (instregex "LTEBRCompare$")>; -def : InstRW<[FPU], (instregex "LTDBRCompare$")>; -def : InstRW<[FPU2, FPU2, Lat9, GroupAlone], (instregex "LTXBR$")>; -def : InstRW<[FPU2, FPU2, Lat9, GroupAlone], (instregex "LTXBRCompare$")>; +def : InstRW<[WLat9, WLat9, FPU, NormalGr], (instregex "LT(E|D)BR$")>; +def : InstRW<[WLat9, FPU, NormalGr], (instregex "LT(E|D)BRCompare$")>; +def : InstRW<[WLat10, WLat10, FPU4, GroupAlone], (instregex "LTXBR(Compare)?$")>; // Copy sign -def : InstRW<[FXU, FXU, Lat5, GroupAlone], (instregex "CPSDRd(d|s)$")>; -def : InstRW<[FXU, FXU, Lat5, GroupAlone], (instregex "CPSDRs(d|s)$")>; +def : InstRW<[WLat5, FXU2, GroupAlone], (instregex "CPSDR(d|s)(d|s)$")>; //===----------------------------------------------------------------------===// // FP: Load instructions //===----------------------------------------------------------------------===// -def : InstRW<[LSU], (instregex "LE(Y)?$")>; -def : InstRW<[LSU], (instregex "LD(Y|E32)?$")>; -def : InstRW<[LSU], (instregex "LX$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "L(E|D)(Y|E32)?$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LX$")>; //===----------------------------------------------------------------------===// // FP: Store instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat7], (instregex "STD(Y)?$")>; -def : InstRW<[FXU, LSU, Lat7], (instregex "STE(Y)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "STX$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "ST(E|D)(Y)?$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STX$")>; //===----------------------------------------------------------------------===// // FP: Conversion instructions //===----------------------------------------------------------------------===// // Load rounded -def : InstRW<[FPU], (instregex "LEDBR(A)?$")>; -def : InstRW<[FPU, FPU, Lat20], (instregex "LEXBR(A)?$")>; -def : InstRW<[FPU, FPU, Lat20], (instregex "LDXBR(A)?$")>; +def : InstRW<[WLat7, FPU, NormalGr], (instregex "LEDBR(A)?$")>; +def : InstRW<[WLat9, FPU2, NormalGr], (instregex "L(E|D)XBR(A)?$")>; // Load lengthened -def : InstRW<[FPU, LSU, Lat12], (instregex "LDEB$")>; -def : InstRW<[FPU], (instregex "LDEBR$")>; -def : InstRW<[FPU2, FPU2, LSU, Lat15, GroupAlone], (instregex "LX(D|E)B$")>; -def : InstRW<[FPU2, FPU2, Lat10, GroupAlone], (instregex "LX(D|E)BR$")>; +def : InstRW<[WLat7LSU, FPU, LSU, NormalGr], (instregex "LDEB$")>; +def : InstRW<[WLat7, FPU, NormalGr], (instregex "LDEBR$")>; +def : InstRW<[WLat11LSU, FPU4, LSU, GroupAlone], (instregex "LX(E|D)B$")>; +def : InstRW<[WLat10, FPU4, GroupAlone], (instregex "LX(E|D)BR$")>; // Convert from fixed / logical -def : InstRW<[FXU, FPU, Lat9, GroupAlone], (instregex "CE(F|G)BR(A)?$")>; -def : InstRW<[FXU, FPU, Lat9, GroupAlone], (instregex "CD(F|G)BR(A)?$")>; -def : InstRW<[FXU, FPU2, FPU2, Lat11, GroupAlone], (instregex "CX(F|G)BR(A)?$")>; -def : InstRW<[FXU, FPU, Lat9, GroupAlone], (instregex "CEL(F|G)BR$")>; -def : InstRW<[FXU, FPU, Lat9, GroupAlone], (instregex "CDL(F|G)BR$")>; -def : InstRW<[FXU, FPU2, FPU2, Lat11, GroupAlone], (instregex "CXL(F|G)BR$")>; +def : InstRW<[WLat8, FXU, FPU, GroupAlone], (instregex "C(E|D)(F|G)BR(A)?$")>; +def : InstRW<[WLat11, FXU, FPU4, GroupAlone], (instregex "CX(F|G)BR(A?)$")>; +def : InstRW<[WLat8, FXU, FPU, GroupAlone], (instregex "CEL(F|G)BR$")>; +def : InstRW<[WLat8, FXU, FPU, GroupAlone], (instregex "CDL(F|G)BR$")>; +def : InstRW<[WLat11, FXU, FPU4, GroupAlone], (instregex "CXL(F|G)BR$")>; // Convert to fixed / logical -def : InstRW<[FXU, FPU, Lat12, GroupAlone], (instregex "CF(E|D)BR(A)?$")>; -def : InstRW<[FXU, FPU, Lat12, GroupAlone], (instregex "CG(E|D)BR(A)?$")>; -def : InstRW<[FXU, FPU, FPU, Lat20, GroupAlone], (instregex "C(F|G)XBR(A)?$")>; -def : InstRW<[FXU, FPU, Lat11, GroupAlone], (instregex "CLF(E|D)BR$")>; -def : InstRW<[FXU, FPU, Lat11, GroupAlone], (instregex "CLG(E|D)BR$")>; -def : InstRW<[FXU, FPU, FPU, Lat20, GroupAlone], (instregex "CL(F|G)XBR$")>; +def : InstRW<[WLat12, WLat12, FXU, FPU, GroupAlone], + (instregex "C(F|G)(E|D)BR(A?)$")>; +def : InstRW<[WLat12, WLat12, FXU, FPU2, GroupAlone], + (instregex "C(F|G)XBR(A?)$")>; +def : InstRW<[WLat12, WLat12, FXU, FPU, GroupAlone], + (instregex "CL(F|G)(E|D)BR$")>; +def : InstRW<[WLat12, WLat12, FXU, FPU2, GroupAlone], (instregex "CL(F|G)XBR$")>; //===----------------------------------------------------------------------===// // FP: Unary arithmetic //===----------------------------------------------------------------------===// // Load Complement / Negative / Positive -def : InstRW<[FPU], (instregex "L(C|N|P)DBR$")>; -def : InstRW<[FPU], (instregex "L(C|N|P)EBR$")>; -def : InstRW<[FXU], (instregex "LCDFR(_32)?$")>; -def : InstRW<[FXU], (instregex "LNDFR(_32)?$")>; -def : InstRW<[FXU], (instregex "LPDFR(_32)?$")>; -def : InstRW<[FPU2, FPU2, Lat9, GroupAlone], (instregex "L(C|N|P)XBR$")>; +def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "L(C|N|P)(E|D)BR$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "L(C|N|P)DFR(_32)?$")>; +def : InstRW<[WLat10, WLat10, FPU4, GroupAlone], (instregex "L(C|N|P)XBR$")>; // Square root -def : InstRW<[FPU, LSU, Lat30], (instregex "SQ(E|D)B$")>; -def : InstRW<[FPU, Lat30], (instregex "SQ(E|D)BR$")>; -def : InstRW<[FPU2, FPU2, Lat30, GroupAlone], (instregex "SQXBR$")>; +def : InstRW<[WLat30, FPU, LSU, NormalGr], (instregex "SQ(E|D)B$")>; +def : InstRW<[WLat30, FPU, NormalGr], (instregex "SQ(E|D)BR$")>; +def : InstRW<[WLat30, FPU4, GroupAlone], (instregex "SQXBR$")>; // Load FP integer -def : InstRW<[FPU], (instregex "FIEBR(A)?$")>; -def : InstRW<[FPU], (instregex "FIDBR(A)?$")>; -def : InstRW<[FPU2, FPU2, Lat15, GroupAlone], (instregex "FIXBR(A)?$")>; +def : InstRW<[WLat7, FPU, NormalGr], (instregex "FI(E|D)BR(A)?$")>; +def : InstRW<[WLat15, FPU4, GroupAlone], (instregex "FIXBR(A)?$")>; //===----------------------------------------------------------------------===// // FP: Binary arithmetic //===----------------------------------------------------------------------===// // Addition -def : InstRW<[FPU, LSU, Lat12], (instregex "A(E|D)B$")>; -def : InstRW<[FPU], (instregex "A(E|D)BR$")>; -def : InstRW<[FPU2, FPU2, Lat20, GroupAlone], (instregex "AXBR$")>; +def : InstRW<[WLat7LSU, WLat7LSU, RegReadAdv, FPU, LSU, NormalGr], + (instregex "A(E|D)B$")>; +def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "A(E|D)BR$")>; +def : InstRW<[WLat20, WLat20, FPU4, GroupAlone], (instregex "AXBR$")>; // Subtraction -def : InstRW<[FPU, LSU, Lat12], (instregex "S(E|D)B$")>; -def : InstRW<[FPU], (instregex "S(E|D)BR$")>; -def : InstRW<[FPU2, FPU2, Lat20, GroupAlone], (instregex "SXBR$")>; +def : InstRW<[WLat7LSU, WLat7LSU, RegReadAdv, FPU, LSU, NormalGr], + (instregex "S(E|D)B$")>; +def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "S(E|D)BR$")>; +def : InstRW<[WLat20, WLat20, FPU4, GroupAlone], (instregex "SXBR$")>; // Multiply -def : InstRW<[FPU, LSU, Lat12], (instregex "M(D|DE|EE)B$")>; -def : InstRW<[FPU], (instregex "M(D|DE|EE)BR$")>; -def : InstRW<[FPU2, FPU2, LSU, Lat15, GroupAlone], (instregex "MXDB$")>; -def : InstRW<[FPU2, FPU2, Lat10, GroupAlone], (instregex "MXDBR$")>; -def : InstRW<[FPU2, FPU2, Lat30, GroupAlone], (instregex "MXBR$")>; +def : InstRW<[WLat7LSU, RegReadAdv, FPU, LSU, NormalGr], + (instregex "M(D|DE|EE)B$")>; +def : InstRW<[WLat7, FPU, NormalGr], (instregex "M(D|DE|EE)BR$")>; +def : InstRW<[WLat11LSU, RegReadAdv, FPU4, LSU, GroupAlone], + (instregex "MXDB$")>; +def : InstRW<[WLat10, FPU4, GroupAlone], (instregex "MXDBR$")>; +def : InstRW<[WLat30, FPU4, GroupAlone], (instregex "MXBR$")>; // Multiply and add / subtract -def : InstRW<[FPU, FPU, LSU, Lat12, GroupAlone], (instregex "M(A|S)EB$")>; -def : InstRW<[FPU, GroupAlone], (instregex "M(A|S)EBR$")>; -def : InstRW<[FPU, FPU, LSU, Lat12, GroupAlone], (instregex "M(A|S)DB$")>; -def : InstRW<[FPU, GroupAlone], (instregex "M(A|S)DBR$")>; +def : InstRW<[WLat7LSU, RegReadAdv, RegReadAdv, FPU2, LSU, GroupAlone], + (instregex "M(A|S)EB$")>; +def : InstRW<[WLat7, FPU, GroupAlone], (instregex "M(A|S)EBR$")>; +def : InstRW<[WLat7LSU, RegReadAdv, RegReadAdv, FPU2, LSU, GroupAlone], + (instregex "M(A|S)DB$")>; +def : InstRW<[WLat7, FPU, GroupAlone], (instregex "M(A|S)DBR$")>; // Division -def : InstRW<[FPU, LSU, Lat30], (instregex "D(E|D)B$")>; -def : InstRW<[FPU, Lat30], (instregex "D(E|D)BR$")>; -def : InstRW<[FPU2, FPU2, Lat30, GroupAlone], (instregex "DXBR$")>; +def : InstRW<[WLat30, RegReadAdv, FPU, LSU, NormalGr], (instregex "D(E|D)B$")>; +def : InstRW<[WLat30, FPU, NormalGr], (instregex "D(E|D)BR$")>; +def : InstRW<[WLat30, FPU4, GroupAlone], (instregex "DXBR$")>; // Divide to integer -def : InstRW<[FPU, Lat30], (instregex "DI(E|D)BR$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "DI(E|D)BR$")>; //===----------------------------------------------------------------------===// // FP: Comparisons //===----------------------------------------------------------------------===// // Compare -def : InstRW<[FPU, LSU, Lat12], (instregex "(K|C)(E|D)B$")>; -def : InstRW<[FPU], (instregex "(K|C)(E|D)BR$")>; -def : InstRW<[FPU, FPU, Lat30], (instregex "(K|C)XBR$")>; +def : InstRW<[WLat11LSU, RegReadAdv, FPU, LSU, NormalGr], + (instregex "(K|C)(E|D)B$")>; +def : InstRW<[WLat9, FPU, NormalGr], (instregex "(K|C)(E|D)BR$")>; +def : InstRW<[WLat30, FPU2, NormalGr], (instregex "(K|C)XBR$")>; // Test Data Class -def : InstRW<[FPU, LSU, Lat15], (instregex "TC(E|D)B$")>; -def : InstRW<[FPU2, FPU2, LSU, Lat15, GroupAlone], (instregex "TCXB$")>; +def : InstRW<[WLat15, FPU, LSU, NormalGr], (instregex "TC(E|D)B$")>; +def : InstRW<[WLat15, FPU4, LSU, GroupAlone], (instregex "TCXB$")>; //===----------------------------------------------------------------------===// // FP: Floating-point control register instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat4, GroupAlone], (instregex "EFPC$")>; -def : InstRW<[LSU, Lat3, GroupAlone], (instregex "SFPC$")>; -def : InstRW<[LSU, LSU, Lat6, GroupAlone], (instregex "LFPC$")>; -def : InstRW<[FXU, LSU, Lat3, GroupAlone], (instregex "STFPC$")>; -def : InstRW<[FXU, Lat30], (instregex "SFASR$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "LFAS$")>; -def : InstRW<[FXU, Lat2, GroupAlone], (instregex "SRNM(B|T)?$")>; +def : InstRW<[WLat4, FXU, LSU, GroupAlone], (instregex "EFPC$")>; +def : InstRW<[WLat1, FXU, LSU, GroupAlone], (instregex "STFPC$")>; +def : InstRW<[WLat1, LSU, GroupAlone], (instregex "SFPC$")>; +def : InstRW<[WLat1, LSU2, GroupAlone], (instregex "LFPC$")>; +def : InstRW<[WLat30, MCD], (instregex "SFASR$")>; +def : InstRW<[WLat30, MCD], (instregex "LFAS$")>; +def : InstRW<[WLat2, FXU, GroupAlone], (instregex "SRNM(B|T)?$")>; // --------------------- Hexadecimal floating point ------------------------- // @@ -808,108 +873,111 @@ //===----------------------------------------------------------------------===// // Load and Test -def : InstRW<[FPU], (instregex "LT(D|E)R$")>; -def : InstRW<[FPU2, FPU2, Lat9, GroupAlone], (instregex "LTXR$")>; +def : InstRW<[WLat9, WLat9, FPU, NormalGr], (instregex "LT(E|D)R$")>; +def : InstRW<[WLat9, WLat9, FPU4, GroupAlone], (instregex "LTXR$")>; //===----------------------------------------------------------------------===// // HFP: Conversion instructions //===----------------------------------------------------------------------===// // Load rounded -def : InstRW<[FPU], (instregex "(LEDR|LRER)$")>; -def : InstRW<[FPU], (instregex "LEXR$")>; -def : InstRW<[FPU], (instregex "(LDXR|LRDR)$")>; +def : InstRW<[WLat7, FPU, NormalGr], (instregex "(LEDR|LRER)$")>; +def : InstRW<[WLat7, FPU, NormalGr], (instregex "LEXR$")>; +def : InstRW<[WLat9, FPU, NormalGr], (instregex "(LDXR|LRDR)$")>; // Load lengthened -def : InstRW<[LSU], (instregex "LDE$")>; -def : InstRW<[FXU], (instregex "LDER$")>; -def : InstRW<[FPU2, FPU2, LSU, Lat15, GroupAlone], (instregex "LX(D|E)$")>; -def : InstRW<[FPU2, FPU2, Lat10, GroupAlone], (instregex "LX(D|E)R$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LDE$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LDER$")>; +def : InstRW<[WLat11LSU, FPU4, LSU, GroupAlone], (instregex "LX(E|D)$")>; +def : InstRW<[WLat9, FPU4, GroupAlone], (instregex "LX(E|D)R$")>; // Convert from fixed -def : InstRW<[FXU, FPU, Lat9, GroupAlone], (instregex "CE(F|G)R$")>; -def : InstRW<[FXU, FPU, Lat9, GroupAlone], (instregex "CD(F|G)R$")>; -def : InstRW<[FXU, FPU2, FPU2, Lat11, GroupAlone], (instregex "CX(F|G)R$")>; +def : InstRW<[WLat8, FXU, FPU, GroupAlone], (instregex "C(E|D)(F|G)R$")>; +def : InstRW<[WLat10, FXU, FPU4, GroupAlone], (instregex "CX(F|G)R$")>; // Convert to fixed -def : InstRW<[FXU, FPU, Lat12, GroupAlone], (instregex "CF(E|D)R$")>; -def : InstRW<[FXU, FPU, Lat12, GroupAlone], (instregex "CG(E|D)R$")>; -def : InstRW<[FXU, FPU, FPU, Lat20, GroupAlone], (instregex "C(F|G)XR$")>; +def : InstRW<[WLat12, WLat12, FXU, FPU, GroupAlone], + (instregex "C(F|G)(E|D)R$")>; +def : InstRW<[WLat30, WLat30, FXU, FPU2, GroupAlone], (instregex "C(F|G)XR$")>; // Convert BFP to HFP / HFP to BFP. -def : InstRW<[FPU], (instregex "THD(E)?R$")>; -def : InstRW<[FPU], (instregex "TB(E)?DR$")>; +def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "THD(E)?R$")>; +def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "TB(E)?DR$")>; //===----------------------------------------------------------------------===// // HFP: Unary arithmetic //===----------------------------------------------------------------------===// // Load Complement / Negative / Positive -def : InstRW<[FPU], (instregex "L(C|N|P)DR$")>; -def : InstRW<[FPU], (instregex "L(C|N|P)ER$")>; -def : InstRW<[FPU2, FPU2, Lat9, GroupAlone], (instregex "L(C|N|P)XR$")>; +def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "L(C|N|P)(E|D)R$")>; +def : InstRW<[WLat9, WLat9, FPU4, GroupAlone], (instregex "L(C|N|P)XR$")>; // Halve -def : InstRW<[FPU], (instregex "H(E|D)R$")>; +def : InstRW<[WLat7, FPU, NormalGr], (instregex "H(E|D)R$")>; // Square root -def : InstRW<[FPU, LSU, Lat30], (instregex "SQ(E|D)$")>; -def : InstRW<[FPU, Lat30], (instregex "SQ(E|D)R$")>; -def : InstRW<[FPU2, FPU2, Lat30, GroupAlone], (instregex "SQXR$")>; +def : InstRW<[WLat30, FPU, LSU, NormalGr], (instregex "SQ(E|D)$")>; +def : InstRW<[WLat30, FPU, NormalGr], (instregex "SQ(E|D)R$")>; +def : InstRW<[WLat30, FPU4, GroupAlone], (instregex "SQXR$")>; // Load FP integer -def : InstRW<[FPU], (instregex "FIER$")>; -def : InstRW<[FPU], (instregex "FIDR$")>; -def : InstRW<[FPU2, FPU2, Lat15, GroupAlone], (instregex "FIXR$")>; +def : InstRW<[WLat7, FPU, NormalGr], (instregex "FI(E|D)R$")>; +def : InstRW<[WLat15, FPU4, GroupAlone], (instregex "FIXR$")>; //===----------------------------------------------------------------------===// // HFP: Binary arithmetic //===----------------------------------------------------------------------===// // Addition -def : InstRW<[FPU, LSU, Lat12], (instregex "A(E|D|U|W)$")>; -def : InstRW<[FPU], (instregex "A(E|D|U|W)R$")>; -def : InstRW<[FPU2, FPU2, Lat20, GroupAlone], (instregex "AXR$")>; +def : InstRW<[WLat7LSU, WLat7LSU, RegReadAdv, FPU, LSU, NormalGr], + (instregex "A(E|D|U|W)$")>; +def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "A(E|D|U|W)R$")>; +def : InstRW<[WLat15, WLat15, FPU4, GroupAlone], (instregex "AXR$")>; // Subtraction -def : InstRW<[FPU, LSU, Lat12], (instregex "S(E|D|U|W)$")>; -def : InstRW<[FPU], (instregex "S(E|D|U|W)R$")>; -def : InstRW<[FPU2, FPU2, Lat20, GroupAlone], (instregex "SXR$")>; +def : InstRW<[WLat7LSU, WLat7LSU, RegReadAdv, FPU, LSU, NormalGr], + (instregex "S(E|D|U|W)$")>; +def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "S(E|D|U|W)R$")>; +def : InstRW<[WLat15, WLat15, FPU4, GroupAlone], (instregex "SXR$")>; // Multiply -def : InstRW<[FPU, LSU, Lat12], (instregex "M(D|DE|E|EE)$")>; -def : InstRW<[FPU], (instregex "M(D|DE|E|EE)R$")>; -def : InstRW<[FPU2, FPU2, LSU, Lat15, GroupAlone], (instregex "MXD$")>; -def : InstRW<[FPU2, FPU2, Lat10, GroupAlone], (instregex "MXDR$")>; -def : InstRW<[FPU2, FPU2, Lat30, GroupAlone], (instregex "MXR$")>; -def : InstRW<[FPU2, FPU2, LSU, Lat15, GroupAlone], (instregex "MY$")>; -def : InstRW<[FPU, FPU, LSU, Lat15, GroupAlone], (instregex "MY(H|L)$")>; -def : InstRW<[FPU2, FPU2, Lat10, GroupAlone], (instregex "MYR$")>; -def : InstRW<[FPU, Lat10, GroupAlone], (instregex "MY(H|L)R$")>; +def : InstRW<[WLat7LSU, RegReadAdv, FPU, LSU, NormalGr], (instregex "M(D|EE)$")>; +def : InstRW<[WLat8LSU, RegReadAdv, FPU, LSU, NormalGr], (instregex "M(DE|E)$")>; +def : InstRW<[WLat7, FPU, NormalGr], (instregex "M(D|EE)R$")>; +def : InstRW<[WLat8, FPU, NormalGr], (instregex "M(DE|E)R$")>; +def : InstRW<[WLat11LSU, RegReadAdv, FPU4, LSU, GroupAlone], (instregex "MXD$")>; +def : InstRW<[WLat10, FPU4, GroupAlone], (instregex "MXDR$")>; +def : InstRW<[WLat30, FPU4, GroupAlone], (instregex "MXR$")>; +def : InstRW<[WLat11LSU, RegReadAdv, FPU4, LSU, GroupAlone], (instregex "MY$")>; +def : InstRW<[WLat7LSU, RegReadAdv, FPU2, LSU, GroupAlone], + (instregex "MY(H|L)$")>; +def : InstRW<[WLat10, FPU4, GroupAlone], (instregex "MYR$")>; +def : InstRW<[WLat7, FPU, GroupAlone], (instregex "MY(H|L)R$")>; // Multiply and add / subtract -def : InstRW<[FPU, FPU, LSU, Lat12, GroupAlone], (instregex "M(A|S)E$")>; -def : InstRW<[FPU, GroupAlone], (instregex "M(A|S)ER$")>; -def : InstRW<[FPU, FPU, LSU, Lat12, GroupAlone], (instregex "M(A|S)D$")>; -def : InstRW<[FPU, GroupAlone], (instregex "M(A|S)DR$")>; -def : InstRW<[FPU2, FPU2, LSU, GroupAlone], (instregex "MAY$")>; -def : InstRW<[FPU2, FPU2, GroupAlone], (instregex "MAYR$")>; -def : InstRW<[FPU, FPU, LSU, Lat12, GroupAlone], (instregex "MAY(H|L)$")>; -def : InstRW<[FPU, GroupAlone], (instregex "MAY(H|L)R$")>; +def : InstRW<[WLat7LSU, RegReadAdv, RegReadAdv, FPU2, LSU, GroupAlone], + (instregex "M(A|S)(E|D)$")>; +def : InstRW<[WLat7, FPU, GroupAlone], (instregex "M(A|S)(E|D)R$")>; +def : InstRW<[WLat11LSU, RegReadAdv, RegReadAdv, FPU4, LSU, GroupAlone], + (instregex "MAY$")>; +def : InstRW<[WLat7LSU, RegReadAdv, RegReadAdv, FPU2, LSU, GroupAlone], + (instregex "MAY(H|L)$")>; +def : InstRW<[WLat10, FPU4, GroupAlone], (instregex "MAYR$")>; +def : InstRW<[WLat7, FPU, GroupAlone], (instregex "MAY(H|L)R$")>; // Division -def : InstRW<[FPU, LSU, Lat30], (instregex "D(E|D)$")>; -def : InstRW<[FPU, Lat30], (instregex "D(E|D)R$")>; -def : InstRW<[FPU2, FPU2, Lat30, GroupAlone], (instregex "DXR$")>; +def : InstRW<[WLat30, RegReadAdv, FPU, LSU, NormalGr], (instregex "D(E|D)$")>; +def : InstRW<[WLat30, FPU, NormalGr], (instregex "D(E|D)R$")>; +def : InstRW<[WLat30, FPU4, GroupAlone], (instregex "DXR$")>; //===----------------------------------------------------------------------===// // HFP: Comparisons //===----------------------------------------------------------------------===// // Compare -def : InstRW<[FPU, LSU, Lat12], (instregex "C(E|D)$")>; -def : InstRW<[FPU], (instregex "C(E|D)R$")>; -def : InstRW<[FPU, FPU, Lat15], (instregex "CXR$")>; +def : InstRW<[WLat11LSU, RegReadAdv, FPU, LSU, NormalGr], (instregex "C(E|D)$")>; +def : InstRW<[WLat9, FPU, NormalGr], (instregex "C(E|D)R$")>; +def : InstRW<[WLat15, FPU2, NormalGr], (instregex "CXR$")>; // ------------------------ Decimal floating point -------------------------- // @@ -919,114 +987,115 @@ //===----------------------------------------------------------------------===// // Load and Test -def : InstRW<[DFU, Lat20], (instregex "LTDTR$")>; -def : InstRW<[DFU2, DFU2, Lat20, GroupAlone], (instregex "LTXTR$")>; +def : InstRW<[WLat4, WLat4, DFU, NormalGr], (instregex "LTDTR$")>; +def : InstRW<[WLat6, WLat6, DFU4, GroupAlone], (instregex "LTXTR$")>; //===----------------------------------------------------------------------===// // DFP: Conversion instructions //===----------------------------------------------------------------------===// // Load rounded -def : InstRW<[DFU, Lat30], (instregex "LEDTR$")>; -def : InstRW<[DFU, DFU, Lat30], (instregex "LDXTR$")>; +def : InstRW<[WLat30, DFU, NormalGr], (instregex "LEDTR$")>; +def : InstRW<[WLat30, DFU2, NormalGr], (instregex "LDXTR$")>; // Load lengthened -def : InstRW<[DFU, Lat20], (instregex "LDETR$")>; -def : InstRW<[DFU2, DFU2, Lat20, GroupAlone], (instregex "LXDTR$")>; +def : InstRW<[WLat7, DFU, NormalGr], (instregex "LDETR$")>; +def : InstRW<[WLat6, DFU4, GroupAlone], (instregex "LXDTR$")>; // Convert from fixed / logical -def : InstRW<[FXU, DFU, Lat9, GroupAlone], (instregex "CDFTR$")>; -def : InstRW<[FXU, DFU, Lat30, GroupAlone], (instregex "CDGTR(A)?$")>; -def : InstRW<[FXU, DFU2, DFU2, GroupAlone], (instregex "CXFTR$")>; -def : InstRW<[FXU, DFU2, DFU2, Lat30, GroupAlone], (instregex "CXGTR(A)?$")>; -def : InstRW<[FXU, DFU, Lat11, GroupAlone], (instregex "CDL(F|G)TR$")>; -def : InstRW<[FXU, DFU2, DFU2, Lat11, GroupAlone], (instregex "CXLFTR$")>; -def : InstRW<[FXU, DFU2, DFU2, Lat6, GroupAlone], (instregex "CXLGTR$")>; +def : InstRW<[WLat9, FXU, DFU, GroupAlone], (instregex "CDFTR$")>; +def : InstRW<[WLat30, FXU, DFU, GroupAlone], (instregex "CDGTR(A)?$")>; +def : InstRW<[WLat5, FXU, DFU4, GroupAlone], (instregex "CXFTR(A)?$")>; +def : InstRW<[WLat30, FXU, DFU4, GroupAlone], (instregex "CXGTR(A)?$")>; +def : InstRW<[WLat9, FXU, DFU, GroupAlone], (instregex "CDL(F|G)TR$")>; +def : InstRW<[WLat9, FXU, DFU4, GroupAlone], (instregex "CXLFTR$")>; +def : InstRW<[WLat5, FXU, DFU4, GroupAlone], (instregex "CXLGTR$")>; // Convert to fixed / logical -def : InstRW<[FXU, DFU, Lat11, GroupAlone], (instregex "CFDTR(A)?$")>; -def : InstRW<[FXU, DFU, Lat30, GroupAlone], (instregex "CGDTR(A)?$")>; -def : InstRW<[FXU, DFU, DFU, Lat11, GroupAlone], (instregex "CFXTR$")>; -def : InstRW<[FXU, DFU, DFU, Lat30, GroupAlone], (instregex "CGXTR(A)?$")>; -def : InstRW<[FXU, DFU, Lat11, GroupAlone], (instregex "CL(F|G)DTR$")>; -def : InstRW<[FXU, DFU, DFU, Lat11, GroupAlone], (instregex "CL(F|G)XTR$")>; +def : InstRW<[WLat11, WLat11, FXU, DFU, GroupAlone], (instregex "CFDTR(A)?$")>; +def : InstRW<[WLat30, WLat30, FXU, DFU, GroupAlone], (instregex "CGDTR(A)?$")>; +def : InstRW<[WLat7, WLat7, FXU, DFU2, GroupAlone], (instregex "CFXTR$")>; +def : InstRW<[WLat30, WLat30, FXU, DFU2, GroupAlone], (instregex "CGXTR(A)?$")>; +def : InstRW<[WLat11, WLat11, FXU, DFU, GroupAlone], (instregex "CL(F|G)DTR$")>; +def : InstRW<[WLat7, WLat7, FXU, DFU2, GroupAlone], (instregex "CL(F|G)XTR$")>; // Convert from / to signed / unsigned packed -def : InstRW<[FXU, DFU, Lat12, GroupAlone], (instregex "CD(S|U)TR$")>; -def : InstRW<[FXU, FXU, DFU2, DFU2, Lat20, GroupAlone], (instregex "CX(S|U)TR$")>; -def : InstRW<[FXU, DFU, Lat12, GroupAlone], (instregex "C(S|U)DTR$")>; -def : InstRW<[FXU, FXU, DFU2, DFU2, Lat20, GroupAlone], (instregex "C(S|U)XTR$")>; +def : InstRW<[WLat5, FXU, DFU, GroupAlone], (instregex "CD(S|U)TR$")>; +def : InstRW<[WLat8, FXU2, DFU4, GroupAlone], (instregex "CX(S|U)TR$")>; +def : InstRW<[WLat7, FXU, DFU, GroupAlone], (instregex "C(S|U)DTR$")>; +def : InstRW<[WLat12, FXU2, DFU4, GroupAlone], (instregex "C(S|U)XTR$")>; // Perform floating-point operation -def : InstRW<[FXU, Lat30], (instregex "PFPO$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "PFPO$")>; //===----------------------------------------------------------------------===// // DFP: Unary arithmetic //===----------------------------------------------------------------------===// // Load FP integer -def : InstRW<[DFU, Lat20], (instregex "FIDTR$")>; -def : InstRW<[DFU2, DFU2, Lat20, GroupAlone], (instregex "FIXTR$")>; +def : InstRW<[WLat8, DFU, NormalGr], (instregex "FIDTR$")>; +def : InstRW<[WLat10, DFU4, GroupAlone], (instregex "FIXTR$")>; // Extract biased exponent -def : InstRW<[FXU, DFU, Lat15, GroupAlone], (instregex "EEDTR$")>; -def : InstRW<[FXU, DFU2, Lat15, GroupAlone], (instregex "EEXTR$")>; +def : InstRW<[WLat7, FXU, DFU, GroupAlone], (instregex "EEDTR$")>; +def : InstRW<[WLat8, FXU, DFU2, GroupAlone], (instregex "EEXTR$")>; // Extract significance -def : InstRW<[FXU, DFU, Lat15, GroupAlone], (instregex "ESDTR$")>; -def : InstRW<[FXU, DFU, DFU, Lat20, GroupAlone], (instregex "ESXTR$")>; +def : InstRW<[WLat7, FXU, DFU, GroupAlone], (instregex "ESDTR$")>; +def : InstRW<[WLat8, FXU, DFU2, GroupAlone], (instregex "ESXTR$")>; //===----------------------------------------------------------------------===// // DFP: Binary arithmetic //===----------------------------------------------------------------------===// // Addition -def : InstRW<[DFU, Lat30], (instregex "ADTR(A)?$")>; -def : InstRW<[DFU2, DFU2, Lat30, GroupAlone], (instregex "AXTR(A)?$")>; +def : InstRW<[WLat9, WLat9, DFU, NormalGr], (instregex "ADTR(A)?$")>; +def : InstRW<[WLat30, WLat30, DFU4, GroupAlone], (instregex "AXTR(A)?$")>; // Subtraction -def : InstRW<[DFU, Lat30], (instregex "SDTR(A)?$")>; -def : InstRW<[DFU2, DFU2, Lat30, GroupAlone], (instregex "SXTR(A)?$")>; +def : InstRW<[WLat9, WLat9, DFU, NormalGr], (instregex "SDTR(A)?$")>; +def : InstRW<[WLat30, WLat30, DFU4, GroupAlone], (instregex "SXTR(A)?$")>; // Multiply -def : InstRW<[DFU, Lat30], (instregex "MDTR(A)?$")>; -def : InstRW<[DFU2, DFU2, Lat30, GroupAlone], (instregex "MXTR(A)?$")>; +def : InstRW<[WLat30, DFU, NormalGr], (instregex "MDTR(A)?$")>; +def : InstRW<[WLat30, DFU4, GroupAlone], (instregex "MXTR(A)?$")>; // Division -def : InstRW<[DFU, Lat30], (instregex "DDTR(A)?$")>; -def : InstRW<[DFU2, DFU2, Lat30, GroupAlone], (instregex "DXTR(A)?$")>; +def : InstRW<[WLat30, DFU, NormalGr], (instregex "DDTR(A)?$")>; +def : InstRW<[WLat30, DFU4, GroupAlone], (instregex "DXTR(A)?$")>; // Quantize -def : InstRW<[DFU, Lat30], (instregex "QADTR$")>; -def : InstRW<[DFU2, DFU2, Lat30, GroupAlone], (instregex "QAXTR$")>; +def : InstRW<[WLat8, WLat8, DFU, NormalGr], (instregex "QADTR$")>; +def : InstRW<[WLat10, WLat10, DFU4, GroupAlone], (instregex "QAXTR$")>; // Reround -def : InstRW<[FXU, DFU, Lat30, GroupAlone], (instregex "RRDTR$")>; -def : InstRW<[FXU, DFU2, DFU2, Lat30, GroupAlone], (instregex "RRXTR$")>; +def : InstRW<[WLat11, WLat11, FXU, DFU, GroupAlone], (instregex "RRDTR$")>; +def : InstRW<[WLat30, WLat30, FXU, DFU4, GroupAlone], (instregex "RRXTR$")>; // Shift significand left/right -def : InstRW<[LSU, DFU, Lat11, GroupAlone], (instregex "S(L|R)DT$")>; -def : InstRW<[LSU, DFU2, DFU2, Lat15, GroupAlone], (instregex "S(L|R)XT$")>; +def : InstRW<[WLat7LSU, LSU, DFU, GroupAlone], (instregex "S(L|R)DT$")>; +def : InstRW<[WLat11LSU, LSU, DFU4, GroupAlone], (instregex "S(L|R)XT$")>; // Insert biased exponent -def : InstRW<[FXU, DFU, Lat11, GroupAlone], (instregex "IEDTR$")>; -def : InstRW<[FXU, DFU2, DFU2, Lat15, GroupAlone], (instregex "IEXTR$")>; +def : InstRW<[WLat5, FXU, DFU, GroupAlone], (instregex "IEDTR$")>; +def : InstRW<[WLat7, FXU, DFU4, GroupAlone], (instregex "IEXTR$")>; //===----------------------------------------------------------------------===// // DFP: Comparisons //===----------------------------------------------------------------------===// // Compare -def : InstRW<[DFU, Lat11], (instregex "(K|C)DTR$")>; -def : InstRW<[DFU, DFU, Lat15], (instregex "(K|C)XTR$")>; +def : InstRW<[WLat9, DFU, NormalGr], (instregex "(K|C)DTR$")>; +def : InstRW<[WLat10, DFU2, NormalGr], (instregex "(K|C)XTR$")>; // Compare biased exponent -def : InstRW<[DFU, Lat8], (instregex "CEDTR$")>; -def : InstRW<[DFU2, Lat9], (instregex "CEXTR$")>; +def : InstRW<[WLat4, DFU, NormalGr], (instregex "CEDTR$")>; +def : InstRW<[WLat5, DFU2, NormalGr], (instregex "CEXTR$")>; // Test Data Class/Group -def : InstRW<[LSU, DFU, Lat15], (instregex "TD(C|G)(E|D)T$")>; -def : InstRW<[LSU, DFU2, Lat15], (instregex "TD(C|G)XT$")>; +def : InstRW<[WLat9, LSU, DFU, NormalGr], (instregex "TD(C|G)DT$")>; +def : InstRW<[WLat10, LSU, DFU, NormalGr], (instregex "TD(C|G)ET$")>; +def : InstRW<[WLat10, LSU, DFU2, NormalGr], (instregex "TD(C|G)XT$")>; // -------------------------------- System ---------------------------------- // @@ -1035,156 +1104,151 @@ // System: Program-Status Word Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, Lat30], (instregex "EPSW$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "LPSW(E)?$")>; -def : InstRW<[FXU, Lat3, GroupAlone], (instregex "IPK$")>; -def : InstRW<[LSU, EndGroup], (instregex "SPKA$")>; -def : InstRW<[LSU, EndGroup], (instregex "SSM$")>; -def : InstRW<[FXU, LSU, GroupAlone], (instregex "ST(N|O)SM$")>; -def : InstRW<[FXU, Lat3], (instregex "IAC$")>; -def : InstRW<[LSU, EndGroup], (instregex "SAC(F)?$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "EPSW$")>; +def : InstRW<[WLat30, MCD], (instregex "LPSW(E)?$")>; +def : InstRW<[WLat3, FXU, GroupAlone], (instregex "IPK$")>; +def : InstRW<[WLat1, LSU, EndGroup], (instregex "SPKA$")>; +def : InstRW<[WLat1, LSU, EndGroup], (instregex "SSM$")>; +def : InstRW<[WLat1, FXU, LSU, GroupAlone], (instregex "ST(N|O)SM$")>; +def : InstRW<[WLat3, FXU, NormalGr], (instregex "IAC$")>; +def : InstRW<[WLat1, LSU, EndGroup], (instregex "SAC(F)?$")>; //===----------------------------------------------------------------------===// // System: Control Register Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat30], (instregex "LCTL(G)?$")>; -def : InstRW<[FXU, LSU, LSU, LSU, LSU, Lat10, GroupAlone], - (instregex "STCT(L|G)$")>; -def : InstRW<[LSU], (instregex "E(P|S)A(I)?R$")>; -def : InstRW<[FXU, Lat30], (instregex "SSA(I)?R$")>; -def : InstRW<[FXU, Lat30], (instregex "ESEA$")>; +def : InstRW<[WLat10, WLat10, LSU2, GroupAlone], (instregex "LCTL(G)?$")>; +def : InstRW<[WLat1, FXU5, LSU5, GroupAlone], (instregex "STCT(L|G)$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "E(P|S)A(I)?R$")>; +def : InstRW<[WLat30, MCD], (instregex "SSA(I)?R$")>; +def : InstRW<[WLat30, MCD], (instregex "ESEA$")>; //===----------------------------------------------------------------------===// // System: Prefix-Register Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat30], (instregex "SPX$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "STPX$")>; +def : InstRW<[WLat30, MCD], (instregex "S(T)?PX$")>; //===----------------------------------------------------------------------===// // System: Storage-Key and Real Memory Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, Lat30], (instregex "ISKE$")>; -def : InstRW<[FXU, Lat30], (instregex "IVSK$")>; -def : InstRW<[FXU, Lat30], (instregex "SSKE(Opt)?$")>; -def : InstRW<[FXU, Lat30], (instregex "RRB(E|M)$")>; -def : InstRW<[FXU, Lat30], (instregex "PFMF$")>; -def : InstRW<[FXU, Lat30], (instregex "TB$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "PGIN$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "PGOUT$")>; +def : InstRW<[WLat30, MCD], (instregex "ISKE$")>; +def : InstRW<[WLat30, MCD], (instregex "IVSK$")>; +def : InstRW<[WLat30, MCD], (instregex "SSKE(Opt)?$")>; +def : InstRW<[WLat30, MCD], (instregex "RRB(E|M)$")>; +def : InstRW<[WLat30, MCD], (instregex "PFMF$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "TB$")>; +def : InstRW<[WLat30, MCD], (instregex "PGIN$")>; +def : InstRW<[WLat30, MCD], (instregex "PGOUT$")>; //===----------------------------------------------------------------------===// // System: Dynamic-Address-Translation Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat30], (instregex "IPTE(Opt)?(Opt)?$")>; -def : InstRW<[FXU, Lat30], (instregex "IDTE(Opt)?$")>; -def : InstRW<[FXU, Lat30], (instregex "PTLB$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "CSP(G)?$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "LPTEA$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "LRA(Y|G)?$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "STRAG$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "LURA(G)?$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "STUR(A|G)$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "TPROT$")>; +def : InstRW<[WLat30, MCD], (instregex "IPTE(Opt)?(Opt)?$")>; +def : InstRW<[WLat30, MCD], (instregex "IDTE(Opt)?$")>; +def : InstRW<[WLat30, MCD], (instregex "PTLB$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "CSP(G)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "LPTEA$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "LRA(Y|G)?$")>; +def : InstRW<[WLat30, MCD], (instregex "STRAG$")>; +def : InstRW<[WLat30, MCD], (instregex "LURA(G)?$")>; +def : InstRW<[WLat30, MCD], (instregex "STUR(A|G)$")>; +def : InstRW<[WLat30, MCD], (instregex "TPROT$")>; //===----------------------------------------------------------------------===// // System: Memory-move Instructions //===----------------------------------------------------------------------===// -def : InstRW<[LSU, Lat8, GroupAlone], (instregex "MVC(K|P|S)$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MVCSK$")>; -def : InstRW<[LSU, Lat6, GroupAlone], (instregex "MVCDK$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "MVCOS$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MVPG$")>; +def : InstRW<[WLat30, MCD], (instregex "MVC(K|P|S)$")>; +def : InstRW<[WLat30, MCD], (instregex "MVC(S|D)K$")>; +def : InstRW<[WLat30, MCD], (instregex "MVCOS$")>; +def : InstRW<[WLat30, MCD], (instregex "MVPG$")>; //===----------------------------------------------------------------------===// // System: Address-Space Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat30], (instregex "LASP$")>; -def : InstRW<[LSU, GroupAlone], (instregex "PALB$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "PC$")>; -def : InstRW<[FXU, Lat30], (instregex "PR$")>; -def : InstRW<[FXU, Lat30], (instregex "PT(I)?$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "RP$")>; -def : InstRW<[FXU, Lat30], (instregex "BS(G|A)$")>; -def : InstRW<[FXU, Lat20], (instregex "TAR$")>; +def : InstRW<[WLat30, MCD], (instregex "LASP$")>; +def : InstRW<[WLat1, LSU, GroupAlone], (instregex "PALB$")>; +def : InstRW<[WLat30, MCD], (instregex "PC$")>; +def : InstRW<[WLat30, MCD], (instregex "PR$")>; +def : InstRW<[WLat30, MCD], (instregex "PT(I)?$")>; +def : InstRW<[WLat30, MCD], (instregex "RP$")>; +def : InstRW<[WLat30, MCD], (instregex "BS(G|A)$")>; +def : InstRW<[WLat30, MCD], (instregex "TAR$")>; //===----------------------------------------------------------------------===// // System: Linkage-Stack Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat30, EndGroup], (instregex "BAKR$")>; -def : InstRW<[FXU, Lat30], (instregex "EREG(G)?$")>; -def : InstRW<[FXU, Lat30], (instregex "(E|M)STA$")>; +def : InstRW<[WLat30, MCD], (instregex "BAKR$")>; +def : InstRW<[WLat30, MCD], (instregex "EREG(G)?$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "(E|M)STA$")>; //===----------------------------------------------------------------------===// // System: Time-Related Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, Lat30], (instregex "PTFF$")>; -def : InstRW<[FXU, LSU, Lat20], (instregex "SCK$")>; -def : InstRW<[FXU, Lat30], (instregex "SCKPF$")>; -def : InstRW<[FXU, LSU, Lat20], (instregex "SCKC$")>; -def : InstRW<[FXU, LSU, Lat20], (instregex "SPT$")>; -def : InstRW<[FXU, LSU, Lat15], (instregex "STCK$")>; -def : InstRW<[FXU, LSU, Lat12], (instregex "STCKF$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "STCKE$")>; -def : InstRW<[FXU, LSU, Lat9], (instregex "STCKC$")>; -def : InstRW<[FXU, LSU, Lat8], (instregex "STPT$")>; +def : InstRW<[WLat30, MCD], (instregex "PTFF$")>; +def : InstRW<[WLat30, MCD], (instregex "SCK$")>; +def : InstRW<[WLat30, MCD], (instregex "SCKPF$")>; +def : InstRW<[WLat30, MCD], (instregex "SCKC$")>; +def : InstRW<[WLat30, MCD], (instregex "SPT$")>; +def : InstRW<[WLat30, MCD], (instregex "STCK(F)?$")>; +def : InstRW<[WLat30, MCD], (instregex "STCKE$")>; +def : InstRW<[WLat30, MCD], (instregex "STCKC$")>; +def : InstRW<[WLat30, MCD], (instregex "STPT$")>; //===----------------------------------------------------------------------===// // System: CPU-Related Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat30], (instregex "STAP$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "STIDP$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "STSI$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "STFL(E)?$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "ECAG$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "ECTG$")>; -def : InstRW<[FXU, Lat30], (instregex "PTF$")>; -def : InstRW<[FXU, Lat30], (instregex "PCKMO$")>; +def : InstRW<[WLat30, MCD], (instregex "STAP$")>; +def : InstRW<[WLat30, MCD], (instregex "STIDP$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "STSI$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "STFL(E)?$")>; +def : InstRW<[WLat30, MCD], (instregex "ECAG$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "ECTG$")>; +def : InstRW<[WLat30, MCD], (instregex "PTF$")>; +def : InstRW<[WLat30, MCD], (instregex "PCKMO$")>; //===----------------------------------------------------------------------===// // System: Miscellaneous Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, Lat30], (instregex "SVC$")>; -def : InstRW<[FXU, GroupAlone], (instregex "MC$")>; -def : InstRW<[FXU, Lat30], (instregex "DIAG$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "TRAC(E|G)$")>; -def : InstRW<[FXU, Lat30], (instregex "TRAP(2|4)$")>; -def : InstRW<[FXU, Lat30], (instregex "SIGP$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "SIGA$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "SIE$")>; +def : InstRW<[WLat30, MCD], (instregex "SVC$")>; +def : InstRW<[WLat1, FXU, GroupAlone], (instregex "MC$")>; +def : InstRW<[WLat30, MCD], (instregex "DIAG$")>; +def : InstRW<[WLat30, MCD], (instregex "TRAC(E|G)$")>; +def : InstRW<[WLat30, MCD], (instregex "TRAP(2|4)$")>; +def : InstRW<[WLat30, MCD], (instregex "SIG(P|A)$")>; +def : InstRW<[WLat30, MCD], (instregex "SIE$")>; //===----------------------------------------------------------------------===// // System: CPU-Measurement Facility Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU], (instregex "LPP$")>; -def : InstRW<[FXU, Lat30], (instregex "ECPGA$")>; -def : InstRW<[FXU, Lat30], (instregex "E(C|P)CTR$")>; -def : InstRW<[FXU, Lat30], (instregex "LCCTL$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "L(P|S)CTL$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "Q(S|CTR)I$")>; -def : InstRW<[FXU, Lat30], (instregex "S(C|P)CTR$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LPP$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "ECPGA$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "E(C|P)CTR$")>; +def : InstRW<[WLat30, MCD], (instregex "LCCTL$")>; +def : InstRW<[WLat30, MCD], (instregex "L(P|S)CTL$")>; +def : InstRW<[WLat30, MCD], (instregex "Q(S|CTR)I$")>; +def : InstRW<[WLat30, MCD], (instregex "S(C|P)CTR$")>; //===----------------------------------------------------------------------===// // System: I/O Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, Lat30], (instregex "(C|H|R|X)SCH$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "(M|S|ST|T)SCH$")>; -def : InstRW<[FXU, Lat30], (instregex "RCHP$")>; -def : InstRW<[FXU, Lat30], (instregex "SCHM$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "STC(PS|RW)$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "TPI$")>; -def : InstRW<[FXU, Lat30], (instregex "SAL$")>; +def : InstRW<[WLat30, MCD], (instregex "(C|H|R|X)SCH$")>; +def : InstRW<[WLat30, MCD], (instregex "(M|S|ST|T)SCH$")>; +def : InstRW<[WLat30, MCD], (instregex "RCHP$")>; +def : InstRW<[WLat30, MCD], (instregex "SCHM$")>; +def : InstRW<[WLat30, MCD], (instregex "STC(PS|RW)$")>; +def : InstRW<[WLat30, MCD], (instregex "TPI$")>; +def : InstRW<[WLat30, MCD], (instregex "SAL$")>; } Index: lib/Target/SystemZ/SystemZScheduleZEC12.td =================================================================== --- lib/Target/SystemZ/SystemZScheduleZEC12.td +++ lib/Target/SystemZ/SystemZScheduleZEC12.td @@ -10,13 +10,15 @@ // This file defines the machine model for ZEC12 to support instruction // scheduling and other instruction cost heuristics. // +// Pseudos expanded right after isel do not need to be modelled here. +// //===----------------------------------------------------------------------===// def ZEC12Model : SchedMachineModel { let UnsupportedFeatures = Arch10UnsupportedFeatures.List; - let IssueWidth = 5; + let IssueWidth = 3; let MicroOpBufferSize = 40; // Issue queues let LoadLatency = 1; // Optimistic load latency. @@ -26,34 +28,54 @@ let MispredictPenalty = 16; } -let SchedModel = ZEC12Model in { +let SchedModel = ZEC12Model in { +// These definitions need the SchedModel value. They could be put in a +// subtarget common include file, but it seems the include system in Tablegen +// currently (2016) rejects multiple includes of same file. -// These definitions could be put in a subtarget common include file, -// but it seems the include system in Tablegen currently rejects -// multiple includes of same file. +// Decoder grouping rules +let NumMicroOps = 1 in { + def : WriteRes; + def : WriteRes { let BeginGroup = 1; } + def : WriteRes { let EndGroup = 1; } +} +def : WriteRes { + let NumMicroOps = 2; + let BeginGroup = 1; +} def : WriteRes { - let NumMicroOps = 0; + let NumMicroOps = 3; let BeginGroup = 1; let EndGroup = 1; } -def : WriteRes { - let NumMicroOps = 0; - let EndGroup = 1; + +// Incoming latency removed from the register operand which is used together +// with a memory operand by the instruction. +def : ReadAdvance; + +// LoadLatency (above) is not used for instructions in this file. This is +// instead the role of LSULatency, which is the latency value added to the +// result of loads and instructions with folded memory operands. +def : WriteRes { let Latency = 4; let NumMicroOps = 0; } + +let NumMicroOps = 0 in { + def : WriteRes { let Latency = 1; } + def : WriteRes { let Latency = 2; } + def : WriteRes { let Latency = 3; } + def : WriteRes { let Latency = 4; } + def : WriteRes { let Latency = 5; } + def : WriteRes { let Latency = 6; } + def : WriteRes { let Latency = 7; } + def : WriteRes { let Latency = 8; } + def : WriteRes { let Latency = 9; } + def : WriteRes { let Latency = 10; } + def : WriteRes { let Latency = 11; } + def : WriteRes { let Latency = 12; } + def : WriteRes { let Latency = 15; } + def : WriteRes { let Latency = 16; } + def : WriteRes { let Latency = 20; } + def : WriteRes { let Latency = 30; } } -def : WriteRes { let Latency = 2; let NumMicroOps = 0;} -def : WriteRes { let Latency = 3; let NumMicroOps = 0;} -def : WriteRes { let Latency = 4; let NumMicroOps = 0;} -def : WriteRes { let Latency = 5; let NumMicroOps = 0;} -def : WriteRes { let Latency = 6; let NumMicroOps = 0;} -def : WriteRes { let Latency = 7; let NumMicroOps = 0;} -def : WriteRes { let Latency = 8; let NumMicroOps = 0;} -def : WriteRes { let Latency = 9; let NumMicroOps = 0;} -def : WriteRes { let Latency = 10; let NumMicroOps = 0;} -def : WriteRes { let Latency = 11; let NumMicroOps = 0;} -def : WriteRes { let Latency = 12; let NumMicroOps = 0;} -def : WriteRes { let Latency = 15; let NumMicroOps = 0;} -def : WriteRes { let Latency = 20; let NumMicroOps = 0;} -def : WriteRes { let Latency = 30; let NumMicroOps = 0;} // Execution units. def ZEC12_FXUnit : ProcResource<2>; @@ -61,16 +83,33 @@ def ZEC12_FPUnit : ProcResource<1>; def ZEC12_DFUnit : ProcResource<1>; def ZEC12_VBUnit : ProcResource<1>; +def ZEC12_MCD : ProcResource<1>; // Subtarget specific definitions of scheduling resources. -def : WriteRes { let Latency = 1; } -def : WriteRes { let Latency = 4; } -def : WriteRes { let Latency = 1; } -def : WriteRes { let Latency = 8; } -def : WriteRes { let Latency = 9; } -def : WriteRes { let Latency = 2; } -def : WriteRes { let Latency = 3; } -def : WriteRes; // Virtual Branching Unit +let NumMicroOps = 0 in { + def : WriteRes; + def : WriteRes { let ResourceCycles = [2]; } + def : WriteRes { let ResourceCycles = [3]; } + def : WriteRes { let ResourceCycles = [4]; } + def : WriteRes { let ResourceCycles = [5]; } + def : WriteRes { let ResourceCycles = [6]; } + def : WriteRes; + def : WriteRes { let ResourceCycles = [2]; } + def : WriteRes { let ResourceCycles = [3]; } + def : WriteRes { let ResourceCycles = [4]; } + def : WriteRes { let ResourceCycles = [5]; } + def : WriteRes; + def : WriteRes { let ResourceCycles = [2]; } + def : WriteRes { let ResourceCycles = [4]; } + def : WriteRes; + def : WriteRes { let ResourceCycles = [2]; } + def : WriteRes { let ResourceCycles = [4]; } + def : WriteRes; // Virtual Branching Unit +} + +def : WriteRes { let NumMicroOps = 3; + let BeginGroup = 1; + let EndGroup = 1; } // -------------------------- INSTRUCTIONS ---------------------------------- // @@ -84,26 +123,27 @@ // Stack allocation //===----------------------------------------------------------------------===// -def : InstRW<[FXU], (instregex "ADJDYNALLOC$")>; // Pseudo -> LA / LAY +// Pseudo -> LA / LAY +def : InstRW<[WLat1, FXU, NormalGr], (instregex "ADJDYNALLOC$")>; //===----------------------------------------------------------------------===// // Branch instructions //===----------------------------------------------------------------------===// // Branch -def : InstRW<[VBU], (instregex "(Call)?BRC(L)?(Asm.*)?$")>; -def : InstRW<[VBU], (instregex "(Call)?J(G)?(Asm.*)?$")>; -def : InstRW<[LSU, Lat4], (instregex "(Call)?BC(R)?(Asm.*)?$")>; -def : InstRW<[LSU, Lat4], (instregex "(Call)?B(R)?(Asm.*)?$")>; -def : InstRW<[FXU, EndGroup], (instregex "BRCT(G)?$")>; -def : InstRW<[FXU, LSU, Lat5, GroupAlone], (instregex "BRCTH$")>; -def : InstRW<[FXU, LSU, Lat5, GroupAlone], (instregex "BCT(G)?(R)?$")>; -def : InstRW<[FXU, FXU, FXU, LSU, Lat7, GroupAlone], +def : InstRW<[WLat1, VBU, NormalGr], (instregex "(Call)?BRC(L)?(Asm.*)?$")>; +def : InstRW<[WLat1, VBU, NormalGr], (instregex "(Call)?J(G)?(Asm.*)?$")>; +def : InstRW<[WLat1, LSU, NormalGr], (instregex "(Call)?BC(R)?(Asm.*)?$")>; +def : InstRW<[WLat1, LSU, NormalGr], (instregex "(Call)?B(R)?(Asm.*)?$")>; +def : InstRW<[WLat1, FXU, EndGroup], (instregex "BRCT(G)?$")>; +def : InstRW<[WLat1, FXU, LSU, GroupAlone], (instregex "BRCTH$")>; +def : InstRW<[WLat1, FXU, LSU, GroupAlone], (instregex "BCT(G)?(R)?$")>; +def : InstRW<[WLat1, FXU3, LSU, GroupAlone], (instregex "B(R)?X(H|L).*$")>; // Compare and branch -def : InstRW<[FXU], (instregex "C(L)?(G)?(I|R)J(Asm.*)?$")>; -def : InstRW<[FXU, LSU, Lat5, GroupAlone], +def : InstRW<[WLat1, FXU, NormalGr], (instregex "C(L)?(G)?(I|R)J(Asm.*)?$")>; +def : InstRW<[WLat1, FXU, LSU, GroupAlone], (instregex "C(L)?(G)?(I|R)B(Call|Return|Asm.*)?$")>; //===----------------------------------------------------------------------===// @@ -111,564 +151,592 @@ //===----------------------------------------------------------------------===// // Trap -def : InstRW<[VBU], (instregex "(Cond)?Trap$")>; +def : InstRW<[WLat1, VBU, NormalGr], (instregex "(Cond)?Trap$")>; // Compare and trap -def : InstRW<[FXU], (instregex "C(G)?(I|R)T(Asm.*)?$")>; -def : InstRW<[FXU], (instregex "CL(G)?RT(Asm.*)?$")>; -def : InstRW<[FXU], (instregex "CL(F|G)IT(Asm.*)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "CL(G)?T(Asm.*)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "C(G)?(I|R)T(Asm.*)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "CL(G)?RT(Asm.*)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "CL(F|G)IT(Asm.*)?$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "CL(G)?T(Asm.*)?$")>; //===----------------------------------------------------------------------===// // Call and return instructions //===----------------------------------------------------------------------===// // Call -def : InstRW<[VBU, FXU, FXU, Lat3, GroupAlone], (instregex "(Call)?BRAS$")>; -def : InstRW<[FXU, FXU, LSU, Lat6, GroupAlone], (instregex "(Call)?BRASL$")>; -def : InstRW<[FXU, FXU, LSU, Lat6, GroupAlone], (instregex "(Call)?BAS(R)?$")>; -def : InstRW<[FXU, FXU, LSU, Lat6, GroupAlone], (instregex "TLS_(G|L)DCALL$")>; +def : InstRW<[WLat1, FXU2, VBU, GroupAlone], (instregex "(Call)?BRAS$")>; +def : InstRW<[WLat1, FXU2, LSU, GroupAlone], (instregex "(Call)?BRASL$")>; +def : InstRW<[WLat1, FXU2, LSU, GroupAlone], (instregex "(Call)?BAS(R)?$")>; +def : InstRW<[WLat1, FXU2, LSU, GroupAlone], (instregex "TLS_(G|L)DCALL$")>; // Return -def : InstRW<[LSU_lat1, EndGroup], (instregex "Return$")>; -def : InstRW<[LSU_lat1], (instregex "CondReturn$")>; +def : InstRW<[WLat1, LSU, EndGroup], (instregex "Return$")>; +def : InstRW<[WLat1, LSU, NormalGr], (instregex "CondReturn$")>; //===----------------------------------------------------------------------===// // Move instructions //===----------------------------------------------------------------------===// // Moves -def : InstRW<[FXU, LSU, Lat5], (instregex "MV(G|H)?HI$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "MVI(Y)?$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "MV(G|H)?HI$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "MVI(Y)?$")>; // Move character -def : InstRW<[LSU, LSU, LSU, FXU, Lat8, GroupAlone], (instregex "MVC$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MVCL(E|U)?$")>; +def : InstRW<[WLat1, FXU, LSU3, GroupAlone], (instregex "MVC$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "MVCL(E|U)?$")>; // Pseudo -> reg move -def : InstRW<[FXU], (instregex "COPY(_TO_REGCLASS)?$")>; -def : InstRW<[FXU], (instregex "EXTRACT_SUBREG$")>; -def : InstRW<[FXU], (instregex "INSERT_SUBREG$")>; -def : InstRW<[FXU], (instregex "REG_SEQUENCE$")>; -def : InstRW<[FXU], (instregex "SUBREG_TO_REG$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "COPY(_TO_REGCLASS)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "EXTRACT_SUBREG$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "INSERT_SUBREG$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "REG_SEQUENCE$")>; // Loads -def : InstRW<[LSU], (instregex "L(Y|FH|RL|Mux)?$")>; -def : InstRW<[LSU], (instregex "LG(RL)?$")>; -def : InstRW<[LSU], (instregex "L128$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "L(Y|FH|RL|Mux)?$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LG(RL)?$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "L128$")>; -def : InstRW<[FXU], (instregex "LLIH(F|H|L)$")>; -def : InstRW<[FXU], (instregex "LLIL(F|H|L)$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LLIH(F|H|L)$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LLIL(F|H|L)$")>; -def : InstRW<[FXU], (instregex "LG(F|H)I$")>; -def : InstRW<[FXU], (instregex "LHI(Mux)?$")>; -def : InstRW<[FXU], (instregex "LR(Mux)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LG(F|H)I$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LHI(Mux)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LR(Mux)?$")>; // Load and trap -def : InstRW<[FXU, LSU, Lat5], (instregex "L(FH|G)?AT$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "L(FH|G)?AT$")>; // Load and test -def : InstRW<[FXU, LSU, Lat5], (instregex "LT(G)?$")>; -def : InstRW<[FXU], (instregex "LT(G)?R$")>; +def : InstRW<[WLat1LSU, WLat1LSU, LSU, FXU, NormalGr], (instregex "LT(G)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LT(G)?R$")>; // Stores -def : InstRW<[FXU, LSU, Lat5], (instregex "STG(RL)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "ST128$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "ST(Y|FH|RL|Mux)?$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STG(RL)?$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "ST128$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "ST(Y|FH|RL|Mux)?$")>; // String moves. -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MVST$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "MVST$")>; //===----------------------------------------------------------------------===// // Conditional move instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, Lat2], (instregex "LOC(G)?R(Asm.*)?$")>; -def : InstRW<[FXU, LSU, Lat6], (instregex "LOC(G)?(Asm.*)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "STOC(G)?(Asm.*)?$")>; +def : InstRW<[WLat2, FXU, NormalGr], (instregex "LOC(G)?R(Asm.*)?$")>; +def : InstRW<[WLat2LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "LOC(G)?(Asm.*)?$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STOC(G)?(Asm.*)?$")>; //===----------------------------------------------------------------------===// // Sign extensions //===----------------------------------------------------------------------===// -def : InstRW<[FXU], (instregex "L(B|H|G)R$")>; -def : InstRW<[FXU], (instregex "LG(B|H|F)R$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "L(B|H|G)R$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LG(B|H|F)R$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LTGF$")>; -def : InstRW<[FXU], (instregex "LTGFR$")>; +def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "LTGF$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LTGFR$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LB(H|Mux)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LH(Y)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LH(H|Mux|RL)$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LG(B|H|F)$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LG(H|F)RL$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LB(H|Mux)?$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LH(Y)?$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LH(H|Mux|RL)$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LG(B|H|F)$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LG(H|F)RL$")>; //===----------------------------------------------------------------------===// // Zero extensions //===----------------------------------------------------------------------===// -def : InstRW<[FXU], (instregex "LLCR(Mux)?$")>; -def : InstRW<[FXU], (instregex "LLHR(Mux)?$")>; -def : InstRW<[FXU], (instregex "LLG(C|H|F|T)R$")>; -def : InstRW<[LSU], (instregex "LLC(Mux)?$")>; -def : InstRW<[LSU], (instregex "LLH(Mux)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LL(C|H)H$")>; -def : InstRW<[LSU], (instregex "LLHRL$")>; -def : InstRW<[LSU], (instregex "LLG(C|H|F|T|HRL|FRL)$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LLCR(Mux)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LLHR(Mux)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LLG(C|H|F|T)R$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLC(Mux)?$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLH(Mux)?$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LL(C|H)H$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLHRL$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLG(C|H|F|T|HRL|FRL)$")>; // Load and trap -def : InstRW<[FXU, LSU, Lat5], (instregex "LLG(F|T)?AT$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LLG(F|T)?AT$")>; //===----------------------------------------------------------------------===// // Truncations //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat5], (instregex "STC(H|Y|Mux)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "STH(H|Y|RL|Mux)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "STCM(H|Y)?$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STC(H|Y|Mux)?$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STH(H|Y|RL|Mux)?$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STCM(H|Y)?$")>; //===----------------------------------------------------------------------===// // Multi-register moves //===----------------------------------------------------------------------===// // Load multiple (estimated average of 5 ops) -def : InstRW<[LSU, LSU, LSU, LSU, LSU, Lat10, GroupAlone], - (instregex "LM(H|Y|G)?$")>; +def : InstRW<[WLat10, WLat10, LSU5, GroupAlone], (instregex "LM(H|Y|G)?$")>; // Load multiple disjoint -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "LMD$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "LMD$")>; // Store multiple (estimated average of 3 ops) -def : InstRW<[LSU, LSU, FXU, FXU, FXU, Lat10, GroupAlone], - (instregex "STM(H|Y|G)?$")>; +def : InstRW<[WLat1, LSU2, FXU5, GroupAlone], (instregex "STM(H|Y|G)?$")>; //===----------------------------------------------------------------------===// // Byte swaps //===----------------------------------------------------------------------===// -def : InstRW<[FXU], (instregex "LRV(G)?R$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LRV(G|H)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "STRV(G|H)?$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MVCIN$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LRV(G)?R$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LRV(G|H)?$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STRV(G|H)?$")>; +def : InstRW<[WLat30, MCD], (instregex "MVCIN$")>; //===----------------------------------------------------------------------===// // Load address instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU], (instregex "LA(Y|RL)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LA(Y|RL)?$")>; // Load the Global Offset Table address -def : InstRW<[FXU], (instregex "GOT$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "GOT$")>; //===----------------------------------------------------------------------===// // Absolute and Negation //===----------------------------------------------------------------------===// -def : InstRW<[FXU, Lat2], (instregex "LP(G)?R$")>; -def : InstRW<[FXU, FXU, Lat3, GroupAlone], (instregex "L(N|P)GFR$")>; -def : InstRW<[FXU, Lat2], (instregex "LN(R|GR)$")>; -def : InstRW<[FXU], (instregex "LC(R|GR)$")>; -def : InstRW<[FXU, FXU, Lat2, GroupAlone], (instregex "LCGFR$")>; +def : InstRW<[WLat2, WLat2, FXU, NormalGr], (instregex "LP(G)?R$")>; +def : InstRW<[WLat3, WLat3, FXU2, GroupAlone], (instregex "L(N|P)GFR$")>; +def : InstRW<[WLat2, WLat2, FXU, NormalGr], (instregex "LN(R|GR)$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LC(R|GR)$")>; +def : InstRW<[WLat2, WLat2, FXU2, GroupAlone], (instregex "LCGFR$")>; //===----------------------------------------------------------------------===// // Insertion //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat5], (instregex "IC(Y)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "IC32(Y)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "ICM(H|Y)?$")>; -def : InstRW<[FXU], (instregex "II(F|H|L)Mux$")>; -def : InstRW<[FXU], (instregex "IIHF(64)?$")>; -def : InstRW<[FXU], (instregex "IIHH(64)?$")>; -def : InstRW<[FXU], (instregex "IIHL(64)?$")>; -def : InstRW<[FXU], (instregex "IILF(64)?$")>; -def : InstRW<[FXU], (instregex "IILH(64)?$")>; -def : InstRW<[FXU], (instregex "IILL(64)?$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "IC(Y)?$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "IC32(Y)?$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "ICM(H|Y)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "II(F|H|L)Mux$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "IIHF(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "IIHH(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "IIHL(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "IILF(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "IILH(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "IILL(64)?$")>; //===----------------------------------------------------------------------===// // Addition //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat5], (instregex "A(L)?(Y|SI)?$")>; -def : InstRW<[FXU, LSU, Lat6], (instregex "AH(Y)?$")>; -def : InstRW<[FXU], (instregex "AIH$")>; -def : InstRW<[FXU], (instregex "AFI(Mux)?$")>; -def : InstRW<[FXU], (instregex "AGFI$")>; -def : InstRW<[FXU], (instregex "AGHI(K)?$")>; -def : InstRW<[FXU], (instregex "AGR(K)?$")>; -def : InstRW<[FXU], (instregex "AHI(K)?$")>; -def : InstRW<[FXU], (instregex "AHIMux(K)?$")>; -def : InstRW<[FXU], (instregex "AL(FI|HSIK)$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "ALGF$")>; -def : InstRW<[FXU], (instregex "ALGHSIK$")>; -def : InstRW<[FXU], (instregex "ALGF(I|R)$")>; -def : InstRW<[FXU], (instregex "ALGR(K)?$")>; -def : InstRW<[FXU], (instregex "ALR(K)?$")>; -def : InstRW<[FXU], (instregex "AR(K)?$")>; -def : InstRW<[FXU], (instregex "A(L)?HHHR$")>; -def : InstRW<[FXU, Lat2], (instregex "A(L)?HHLR$")>; -def : InstRW<[FXU], (instregex "ALSIH(N)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "A(L)?G(SI)?$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "A(L)?(Y)?$")>; +def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "A(L)?SI$")>; +def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "AH(Y)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "AIH$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "AFI(Mux)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "AGFI$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "AGHI(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "AGR(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "AHI(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "AHIMux(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "AL(FI|HSIK)$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "ALGF$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "ALGHSIK$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "ALGF(I|R)$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "ALGR(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "ALR(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "AR(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "A(L)?HHHR$")>; +def : InstRW<[WLat2, WLat2, FXU, NormalGr], (instregex "A(L)?HHLR$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "ALSIH(N)?$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "A(L)?G$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "A(L)?GSI$")>; // Logical addition with carry -def : InstRW<[FXU, LSU, Lat7, GroupAlone], (instregex "ALC(G)?$")>; -def : InstRW<[FXU, Lat3, GroupAlone], (instregex "ALC(G)?R$")>; +def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXU, LSU, GroupAlone], + (instregex "ALC(G)?$")>; +def : InstRW<[WLat2, WLat2, FXU, GroupAlone], (instregex "ALC(G)?R$")>; // Add with sign extension (32 -> 64) -def : InstRW<[FXU, LSU, Lat6], (instregex "AGF$")>; -def : InstRW<[FXU, Lat2], (instregex "AGFR$")>; +def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "AGF$")>; +def : InstRW<[WLat2, WLat2, FXU, NormalGr], (instregex "AGFR$")>; //===----------------------------------------------------------------------===// // Subtraction //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat5], (instregex "S(G|Y)?$")>; -def : InstRW<[FXU, LSU, Lat6], (instregex "SH(Y)?$")>; -def : InstRW<[FXU], (instregex "SGR(K)?$")>; -def : InstRW<[FXU], (instregex "SLFI$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "SL(G|GF|Y)?$")>; -def : InstRW<[FXU], (instregex "SLGF(I|R)$")>; -def : InstRW<[FXU], (instregex "SLGR(K)?$")>; -def : InstRW<[FXU], (instregex "SLR(K)?$")>; -def : InstRW<[FXU], (instregex "SR(K)?$")>; -def : InstRW<[FXU], (instregex "S(L)?HHHR$")>; -def : InstRW<[FXU, Lat2], (instregex "S(L)?HHLR$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "S(G|Y)?$")>; +def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "SH(Y)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "SGR(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "SLFI$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "SL(G|GF|Y)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "SLGF(I|R)$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "SLGR(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "SLR(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "SR(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "S(L)?HHHR$")>; +def : InstRW<[WLat2, WLat2, FXU, NormalGr], (instregex "S(L)?HHLR$")>; // Subtraction with borrow -def : InstRW<[FXU, LSU, Lat7, GroupAlone], (instregex "SLB(G)?$")>; -def : InstRW<[FXU, Lat3, GroupAlone], (instregex "SLB(G)?R$")>; +def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXU, LSU, GroupAlone], + (instregex "SLB(G)?$")>; +def : InstRW<[WLat2, WLat2, FXU, GroupAlone], (instregex "SLB(G)?R$")>; // Subtraction with sign extension (32 -> 64) -def : InstRW<[FXU, LSU, Lat6], (instregex "SGF$")>; -def : InstRW<[FXU, Lat2], (instregex "SGFR$")>; +def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "SGF$")>; +def : InstRW<[WLat2, WLat2, FXU, NormalGr], (instregex "SGFR$")>; //===----------------------------------------------------------------------===// // AND //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat5], (instregex "N(G|Y)?$")>; -def : InstRW<[FXU], (instregex "NGR(K)?$")>; -def : InstRW<[FXU], (instregex "NI(FMux|HMux|LMux)$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "NI(Y)?$")>; -def : InstRW<[FXU], (instregex "NIHF(64)?$")>; -def : InstRW<[FXU], (instregex "NIHH(64)?$")>; -def : InstRW<[FXU], (instregex "NIHL(64)?$")>; -def : InstRW<[FXU], (instregex "NILF(64)?$")>; -def : InstRW<[FXU], (instregex "NILH(64)?$")>; -def : InstRW<[FXU], (instregex "NILL(64)?$")>; -def : InstRW<[FXU], (instregex "NR(K)?$")>; -def : InstRW<[LSU, LSU, FXU, Lat9, GroupAlone], (instregex "NC$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "N(G|Y)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "NGR(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "NI(FMux|HMux|LMux)$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "NI(Y)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "NIHF(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "NIHH(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "NIHL(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "NILF(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "NILH(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "NILL(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "NR(K)?$")>; +def : InstRW<[WLat5LSU, LSU2, FXU, GroupAlone], (instregex "NC$")>; //===----------------------------------------------------------------------===// // OR //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat5], (instregex "O(G|Y)?$")>; -def : InstRW<[FXU], (instregex "OGR(K)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "OI(Y)?$")>; -def : InstRW<[FXU], (instregex "OI(FMux|HMux|LMux)$")>; -def : InstRW<[FXU], (instregex "OIHF(64)?$")>; -def : InstRW<[FXU], (instregex "OIHH(64)?$")>; -def : InstRW<[FXU], (instregex "OIHL(64)?$")>; -def : InstRW<[FXU], (instregex "OILF(64)?$")>; -def : InstRW<[FXU], (instregex "OILH(64)?$")>; -def : InstRW<[FXU], (instregex "OILL(64)?$")>; -def : InstRW<[FXU], (instregex "OR(K)?$")>; -def : InstRW<[LSU, LSU, FXU, Lat9, GroupAlone], (instregex "OC$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "O(G|Y)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "OGR(K)?$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "OI(Y)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "OI(FMux|HMux|LMux)$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "OIHF(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "OIHH(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "OIHL(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "OILF(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "OILH(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "OILL(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "OR(K)?$")>; +def : InstRW<[WLat5LSU, LSU2, FXU, GroupAlone], (instregex "OC$")>; //===----------------------------------------------------------------------===// // XOR //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat5], (instregex "X(G|Y)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "XI(Y)?$")>; -def : InstRW<[FXU], (instregex "XIFMux$")>; -def : InstRW<[FXU], (instregex "XGR(K)?$")>; -def : InstRW<[FXU], (instregex "XIHF(64)?$")>; -def : InstRW<[FXU], (instregex "XILF(64)?$")>; -def : InstRW<[FXU], (instregex "XR(K)?$")>; -def : InstRW<[LSU, LSU, FXU, Lat9, GroupAlone], (instregex "XC$")>; +def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "X(G|Y)?$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "XI(Y)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "XIFMux$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "XGR(K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "XIHF(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "XILF(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "XR(K)?$")>; +def : InstRW<[WLat5LSU, LSU2, FXU, GroupAlone], (instregex "XC$")>; //===----------------------------------------------------------------------===// // Multiplication //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat10], (instregex "MS(GF|Y)?$")>; -def : InstRW<[FXU, Lat6], (instregex "MS(R|FI)$")>; -def : InstRW<[FXU, LSU, Lat12], (instregex "MSG$")>; -def : InstRW<[FXU, Lat8], (instregex "MSGR$")>; -def : InstRW<[FXU, Lat6], (instregex "MSGF(I|R)$")>; -def : InstRW<[FXU, FXU, LSU, Lat15, GroupAlone], (instregex "MLG$")>; -def : InstRW<[FXU, FXU, Lat9, GroupAlone], (instregex "MLGR$")>; -def : InstRW<[FXU, Lat5], (instregex "MGHI$")>; -def : InstRW<[FXU, Lat5], (instregex "MHI$")>; -def : InstRW<[FXU, LSU, Lat9], (instregex "MH(Y)?$")>; -def : InstRW<[FXU, FXU, Lat7, GroupAlone], (instregex "M(L)?R$")>; -def : InstRW<[FXU, FXU, LSU, Lat7, GroupAlone], (instregex "M(FY|L)?$")>; +def : InstRW<[WLat6LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "MS(GF|Y)?$")>; +def : InstRW<[WLat6, FXU, NormalGr], (instregex "MS(R|FI)$")>; +def : InstRW<[WLat8LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "MSG$")>; +def : InstRW<[WLat8, FXU, NormalGr], (instregex "MSGR$")>; +def : InstRW<[WLat6, FXU, NormalGr], (instregex "MSGF(I|R)$")>; +def : InstRW<[WLat11LSU, RegReadAdv, FXU2, LSU, GroupAlone], + (instregex "MLG$")>; +def : InstRW<[WLat9, FXU2, GroupAlone], (instregex "MLGR$")>; +def : InstRW<[WLat5, FXU, NormalGr], (instregex "MGHI$")>; +def : InstRW<[WLat5, FXU, NormalGr], (instregex "MHI$")>; +def : InstRW<[WLat5LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "MH(Y)?$")>; +def : InstRW<[WLat7, FXU2, GroupAlone], (instregex "M(L)?R$")>; +def : InstRW<[WLat7LSU, RegReadAdv, FXU2, LSU, GroupAlone], + (instregex "M(FY|L)?$")>; //===----------------------------------------------------------------------===// // Division and remainder //===----------------------------------------------------------------------===// -def : InstRW<[FPU2, FPU2, FXU, FXU, FXU, FXU, FXU, Lat30, GroupAlone], - (instregex "DR$")>; -def : InstRW<[FPU2, FPU2, LSU, FXU, FXU, FXU, FXU, Lat30, GroupAlone], - (instregex "D$")>; -def : InstRW<[FPU2, FPU2, FXU, FXU, FXU, FXU, Lat30, GroupAlone], - (instregex "DSG(F)?R$")>; -def : InstRW<[FPU2, FPU2, LSU, FXU, FXU, FXU, Lat30, GroupAlone], - (instregex "DSG(F)?$")>; -def : InstRW<[FPU2, FPU2, FXU, FXU, FXU, FXU, FXU, Lat30, GroupAlone], - (instregex "DL(G)?R$")>; -def : InstRW<[FPU2, FPU2, LSU, FXU, FXU, FXU, FXU, Lat30, GroupAlone], - (instregex "DL(G)?$")>; +def : InstRW<[WLat30, FPU4, FXU5, GroupAlone], (instregex "DR$")>; +def : InstRW<[WLat30, RegReadAdv, FPU4, LSU, FXU4, GroupAlone], + (instregex "D$")>; +def : InstRW<[WLat30, FPU4, FXU4, GroupAlone], (instregex "DSG(F)?R$")>; +def : InstRW<[WLat30, RegReadAdv, FPU4, LSU, FXU3, GroupAlone], + (instregex "DSG(F)?$")>; +def : InstRW<[WLat30, FPU4, FXU5, GroupAlone], (instregex "DL(G)?R$")>; +def : InstRW<[WLat30, RegReadAdv, FPU4, LSU, FXU4, GroupAlone], + (instregex "DL(G)?$")>; //===----------------------------------------------------------------------===// // Shifts //===----------------------------------------------------------------------===// -def : InstRW<[FXU], (instregex "SLL(G|K)?$")>; -def : InstRW<[FXU], (instregex "SRL(G|K)?$")>; -def : InstRW<[FXU], (instregex "SRA(G|K)?$")>; -def : InstRW<[FXU], (instregex "SLA(G|K)?$")>; -def : InstRW<[FXU, FXU, FXU, FXU, LSU, Lat8, GroupAlone], +def : InstRW<[WLat1, FXU, NormalGr], (instregex "SLL(G|K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "SRL(G|K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "SRA(G|K)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "SLA(G|K)?$")>; +def : InstRW<[WLat5LSU, WLat5LSU, FXU4, LSU, GroupAlone], (instregex "S(L|R)D(A|L)$")>; // Rotate -def : InstRW<[FXU, LSU, Lat6], (instregex "RLL(G)?$")>; +def : InstRW<[WLat2LSU, FXU, LSU, NormalGr], (instregex "RLL(G)?$")>; // Rotate and insert -def : InstRW<[FXU], (instregex "RISBG(N|32)?$")>; -def : InstRW<[FXU], (instregex "RISBH(G|H|L)$")>; -def : InstRW<[FXU], (instregex "RISBL(G|H|L)$")>; -def : InstRW<[FXU], (instregex "RISBMux$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "RISBG(N|32)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "RISBH(G|H|L)$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "RISBL(G|H|L)$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "RISBMux$")>; // Rotate and Select -def : InstRW<[FXU, FXU, Lat3, GroupAlone], (instregex "R(N|O|X)SBG$")>; +def : InstRW<[WLat3, WLat3, FXU2, GroupAlone], (instregex "R(N|O|X)SBG$")>; //===----------------------------------------------------------------------===// // Comparison //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat5], (instregex "C(G|Y|Mux|RL)?$")>; -def : InstRW<[FXU], (instregex "C(F|H)I(Mux)?$")>; -def : InstRW<[FXU], (instregex "CG(F|H)I$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "CG(HSI|RL)$")>; -def : InstRW<[FXU], (instregex "C(G)?R$")>; -def : InstRW<[FXU], (instregex "CIH$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "CH(F|SI)$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "CL(Y|Mux|FHSI)?$")>; -def : InstRW<[FXU], (instregex "CLFI(Mux)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "CLG(HRL|HSI)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "CLGF(RL)?$")>; -def : InstRW<[FXU], (instregex "CLGF(I|R)$")>; -def : InstRW<[FXU], (instregex "CLGR$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "CLGRL$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "CLH(F|RL|HSI)$")>; -def : InstRW<[FXU], (instregex "CLIH$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "CLI(Y)?$")>; -def : InstRW<[FXU], (instregex "CLR$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "CLRL$")>; -def : InstRW<[FXU], (instregex "C(L)?HHR$")>; -def : InstRW<[FXU, Lat2], (instregex "C(L)?HLR$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "C(G|Y|Mux|RL)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "C(F|H)I(Mux)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "CG(F|H)I$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CG(HSI|RL)$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "C(G)?R$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "CIH$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CHF$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CHSI$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "CL(Y|Mux)?$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLFHSI$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "CLFI(Mux)?$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CLG$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLG(HRL|HSI)$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CLGF$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLGFRL$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "CLGF(I|R)$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "CLGR$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLGRL$")>; +def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CLHF$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLH(RL|HSI)$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "CLIH$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLI(Y)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "CLR$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLRL$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "C(L)?HHR$")>; +def : InstRW<[WLat2, FXU, NormalGr], (instregex "C(L)?HLR$")>; // Compare halfword -def : InstRW<[FXU, LSU, Lat6], (instregex "CH(Y|RL)?$")>; -def : InstRW<[FXU, LSU, Lat6], (instregex "CGH(RL)?$")>; -def : InstRW<[FXU, FXU, LSU, Lat6, GroupAlone], (instregex "CHHSI$")>; +def : InstRW<[WLat2LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CH(Y)?$")>; +def : InstRW<[WLat2LSU, FXU, LSU, NormalGr], (instregex "CHRL$")>; +def : InstRW<[WLat2LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CGH$")>; +def : InstRW<[WLat2LSU, FXU, LSU, NormalGr], (instregex "CGHRL$")>; +def : InstRW<[WLat2LSU, FXU2, LSU, GroupAlone], (instregex "CHHSI$")>; // Compare with sign extension (32 -> 64) -def : InstRW<[FXU, LSU, Lat6], (instregex "CGF(RL)?$")>; -def : InstRW<[FXU, Lat2], (instregex "CGFR$")>; +def : InstRW<[WLat2LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CGF$")>; +def : InstRW<[WLat2LSU, FXU, LSU, NormalGr], (instregex "CGFRL$")>; +def : InstRW<[WLat2, FXU, NormalGr], (instregex "CGFR$")>; // Compare logical character -def : InstRW<[FXU, LSU, LSU, Lat9, GroupAlone], (instregex "CLC$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "CLCL(E|U)?$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "CLST$")>; +def : InstRW<[WLat9, FXU, LSU2, GroupAlone], (instregex "CLC$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CLCL(E|U)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CLST$")>; // Test under mask -def : InstRW<[FXU, LSU, Lat5], (instregex "TM(Y)?$")>; -def : InstRW<[FXU], (instregex "TM(H|L)Mux$")>; -def : InstRW<[FXU], (instregex "TMHH(64)?$")>; -def : InstRW<[FXU], (instregex "TMHL(64)?$")>; -def : InstRW<[FXU], (instregex "TMLH(64)?$")>; -def : InstRW<[FXU], (instregex "TMLL(64)?$")>; +def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "TM(Y)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "TM(H|L)Mux$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "TMHH(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "TMHL(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "TMLH(64)?$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "TMLL(64)?$")>; // Compare logical characters under mask -def : InstRW<[FXU, LSU, Lat5], (instregex "CLM(H|Y)?$")>; +def : InstRW<[WLat2LSU, RegReadAdv, FXU, LSU, NormalGr], + (instregex "CLM(H|Y)?$")>; //===----------------------------------------------------------------------===// // Prefetch and execution hint //===----------------------------------------------------------------------===// -def : InstRW<[LSU], (instregex "PFD(RL)?$")>; -def : InstRW<[LSU], (instregex "BP(R)?P$")>; -def : InstRW<[FXU], (instregex "NIAI$")>; +def : InstRW<[WLat1, LSU, NormalGr], (instregex "PFD(RL)?$")>; +def : InstRW<[WLat1, LSU, NormalGr], (instregex "BP(R)?P$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "NIAI$")>; //===----------------------------------------------------------------------===// // Atomic operations //===----------------------------------------------------------------------===// -def : InstRW<[LSU, EndGroup], (instregex "Serialize$")>; +def : InstRW<[WLat1, LSU, EndGroup], (instregex "Serialize$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LAA(G)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LAAL(G)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LAN(G)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LAO(G)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "LAX(G)?$")>; +def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "LAA(G)?$")>; +def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "LAAL(G)?$")>; +def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "LAN(G)?$")>; +def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "LAO(G)?$")>; +def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "LAX(G)?$")>; // Test and set -def : InstRW<[FXU, LSU, Lat5, EndGroup], (instregex "TS$")>; +def : InstRW<[WLat1LSU, FXU, LSU, EndGroup], (instregex "TS$")>; // Compare and swap -def : InstRW<[FXU, FXU, LSU, Lat6, GroupAlone], (instregex "CS(G|Y)?$")>; +def : InstRW<[WLat2LSU, WLat2LSU, FXU2, LSU, GroupAlone], + (instregex "CS(G|Y)?$")>; // Compare double and swap -def : InstRW<[FXU, FXU, FXU, FXU, FXU, LSU, Lat10, GroupAlone], +def : InstRW<[WLat5LSU, WLat5LSU, FXU5, LSU, GroupAlone], (instregex "CDS(Y)?$")>; -def : InstRW<[FXU, FXU, FXU, FXU, FXU, FXU, LSU, LSU, Lat12, GroupAlone], +def : InstRW<[WLat12, WLat12, FXU6, LSU2, GroupAlone], (instregex "CDSG$")>; // Compare and swap and store -def : InstRW<[FXU, LSU, Lat30], (instregex "CSST$")>; +def : InstRW<[WLat30, MCD], (instregex "CSST$")>; // Perform locked operation -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "PLO$")>; +def : InstRW<[WLat30, MCD], (instregex "PLO$")>; // Load/store pair from/to quadword -def : InstRW<[LSU, LSU, Lat5, GroupAlone], (instregex "LPQ$")>; -def : InstRW<[FXU, FXU, LSU, LSU, Lat6, GroupAlone], (instregex "STPQ$")>; +def : InstRW<[WLat4LSU, LSU2, GroupAlone], (instregex "LPQ$")>; +def : InstRW<[WLat1, FXU2, LSU2, GroupAlone], (instregex "STPQ$")>; // Load pair disjoint -def : InstRW<[LSU, LSU, Lat5, GroupAlone], (instregex "LPD(G)?$")>; +def : InstRW<[WLat2LSU, WLat2LSU, LSU2, GroupAlone], (instregex "LPD(G)?$")>; //===----------------------------------------------------------------------===// // Translate and convert //===----------------------------------------------------------------------===// -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "TR$")>; -def : InstRW<[FXU, FXU, FXU, LSU, LSU, Lat30, GroupAlone], (instregex "TRT$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "TRTR$")>; -def : InstRW<[FXU, Lat30], (instregex "TRE$")>; -def : InstRW<[FXU, Lat30], (instregex "TRT(R)?E(Opt)?$")>; -def : InstRW<[LSU, Lat30], (instregex "TR(T|O)(T|O)(Opt)?$")>; -def : InstRW<[FXU, Lat30], (instregex "CU(12|14|21|24|41|42)(Opt)?$")>; -def : InstRW<[FXU, Lat30], (instregex "(CUUTF|CUTFU)(Opt)?$")>; +def : InstRW<[WLat1, LSU, GroupAlone], (instregex "TR$")>; +def : InstRW<[WLat30, WLat30, WLat30, FXU3, LSU2, GroupAlone], + (instregex "TRT$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "TRTR$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "TRE$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "TRT(R)?E(Opt)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "TR(T|O)(T|O)(Opt)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], + (instregex "CU(12|14|21|24|41|42)(Opt)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "(CUUTF|CUTFU)(Opt)?$")>; //===----------------------------------------------------------------------===// // Message-security assist //===----------------------------------------------------------------------===// -def : InstRW<[FXU, Lat30], (instregex "KM(C|F|O|CTR)?$")>; -def : InstRW<[FXU, Lat30], (instregex "(KIMD|KLMD|KMAC|PCC)$")>; +def : InstRW<[WLat30, WLat30, WLat30, WLat30, MCD], + (instregex "KM(C|F|O|CTR)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "(KIMD|KLMD|KMAC|PCC)$")>; //===----------------------------------------------------------------------===// // Decimal arithmetic //===----------------------------------------------------------------------===// -def : InstRW<[FXU, DFU2, LSU, LSU, Lat30, GroupAlone], (instregex "CVBG$")>; -def : InstRW<[FXU, DFU, LSU, Lat30, GroupAlone], (instregex "CVB(Y)?$")>; -def : InstRW<[FXU, FXU, FXU, DFU2, DFU2, LSU, Lat30, GroupAlone], - (instregex "CVDG$")>; -def : InstRW<[FXU, FXU, DFU, LSU, Lat30, GroupAlone], (instregex "CVD(Y)?$")>; -def : InstRW<[LSU, Lat10, GroupAlone], (instregex "MVO$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MV(N|Z)$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "(PACK|PKA|PKU)$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "UNPK$")>; -def : InstRW<[LSU, Lat12, GroupAlone], (instregex "UNPK(A|U)$")>; +def : InstRW<[WLat30, RegReadAdv, FXU, DFU2, LSU2, GroupAlone], + (instregex "CVBG$")>; +def : InstRW<[WLat20, RegReadAdv, FXU, DFU, LSU, GroupAlone], + (instregex "CVB(Y)?$")>; +def : InstRW<[WLat1, FXU3, DFU4, LSU, GroupAlone], (instregex "CVDG$")>; +def : InstRW<[WLat1, FXU2, DFU, LSU, GroupAlone], (instregex "CVD(Y)?$")>; +def : InstRW<[WLat1, LSU5, GroupAlone], (instregex "MV(N|O|Z)$")>; +def : InstRW<[WLat1, LSU5, GroupAlone], (instregex "(PACK|PKA|PKU)$")>; +def : InstRW<[WLat10, LSU5, GroupAlone], (instregex "UNPK(A|U)$")>; +def : InstRW<[WLat1, FXU, LSU2, GroupAlone], (instregex "UNPK$")>; -def : InstRW<[FXU, DFU2, DFU2, LSU, LSU, Lat15, GroupAlone], +def : InstRW<[WLat11LSU, FXU, DFU4, LSU2, GroupAlone], (instregex "(A|S|ZA)P$")>; -def : InstRW<[FXU, DFU2, DFU2, LSU, LSU, Lat30, GroupAlone], - (instregex "(M|D)P$")>; -def : InstRW<[FXU, FXU, DFU2, DFU2, LSU, LSU, LSU, Lat15, GroupAlone], - (instregex "SRP$")>; -def : InstRW<[DFU2, DFU2, LSU, LSU, Lat11, GroupAlone], (instregex "CP$")>; -def : InstRW<[DFU2, LSU, LSU, Lat5, GroupAlone], (instregex "TP$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "ED(MK)?$")>; +def : InstRW<[WLat1, FXU, DFU4, LSU2, GroupAlone], (instregex "(M|D)P$")>; +def : InstRW<[WLat15, FXU2, DFU4, LSU3, GroupAlone], (instregex "SRP$")>; +def : InstRW<[WLat11, DFU4, LSU2, GroupAlone], (instregex "CP$")>; +def : InstRW<[WLat5LSU, DFU2, LSU2, GroupAlone], (instregex "TP$")>; +def : InstRW<[WLat30, MCD], (instregex "ED(MK)?$")>; //===----------------------------------------------------------------------===// // Access registers //===----------------------------------------------------------------------===// // Extract/set/copy access register -def : InstRW<[LSU], (instregex "(EAR|SAR|CPYA)$")>; +def : InstRW<[WLat3, LSU, NormalGr], (instregex "(EAR|SAR|CPYA)$")>; // Load address extended -def : InstRW<[LSU, FXU, Lat5, GroupAlone], (instregex "LAE(Y)?$")>; +def : InstRW<[WLat5, LSU, FXU, GroupAlone], (instregex "LAE(Y)?$")>; // Load/store access multiple (not modeled precisely) -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "(L|ST)AM(Y)?$")>; +def : InstRW<[WLat10, WLat10, LSU5, GroupAlone], (instregex "LAM(Y)?$")>; +def : InstRW<[WLat1, FXU5, LSU5, GroupAlone], (instregex "STAM(Y)?$")>; //===----------------------------------------------------------------------===// // Program mask and addressing mode //===----------------------------------------------------------------------===// // Insert Program Mask -def : InstRW<[FXU, Lat3, EndGroup], (instregex "IPM$")>; +def : InstRW<[WLat3, FXU, EndGroup], (instregex "IPM$")>; // Set Program Mask -def : InstRW<[LSU, EndGroup], (instregex "SPM$")>; +def : InstRW<[WLat3, LSU, EndGroup], (instregex "SPM$")>; // Branch and link -def : InstRW<[FXU, FXU, LSU, Lat8, GroupAlone], (instregex "BAL(R)?$")>; +def : InstRW<[WLat1, FXU2, LSU, GroupAlone], (instregex "BAL(R)?$")>; // Test addressing mode -def : InstRW<[FXU], (instregex "TAM$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "TAM$")>; // Set addressing mode -def : InstRW<[LSU, EndGroup], (instregex "SAM(24|31|64)$")>; +def : InstRW<[WLat1, LSU, EndGroup], (instregex "SAM(24|31|64)$")>; // Branch (and save) and set mode. -def : InstRW<[FXU, LSU, Lat5, GroupAlone], (instregex "BSM$")>; -def : InstRW<[FXU, FXU, LSU, Lat6, GroupAlone], (instregex "BASSM$")>; +def : InstRW<[WLat1, FXU, LSU, GroupAlone], (instregex "BSM$")>; +def : InstRW<[WLat1, FXU2, LSU, GroupAlone], (instregex "BASSM$")>; //===----------------------------------------------------------------------===// // Transactional execution //===----------------------------------------------------------------------===// // Transaction begin -def : InstRW<[LSU, LSU, FXU, FXU, FXU, FXU, FXU, Lat15, GroupAlone], - (instregex "TBEGIN(C)?$")>; +def : InstRW<[WLat9, LSU2, FXU5, GroupAlone], (instregex "TBEGIN(C)?$")>; // Transaction end -def : InstRW<[LSU, GroupAlone], (instregex "TEND$")>; +def : InstRW<[WLat4, LSU, GroupAlone], (instregex "TEND$")>; // Transaction abort -def : InstRW<[LSU, GroupAlone], (instregex "TABORT$")>; +def : InstRW<[WLat30, MCD], (instregex "TABORT$")>; // Extract Transaction Nesting Depth -def : InstRW<[FXU], (instregex "ETND$")>; +def : InstRW<[WLat30, MCD], (instregex "ETND$")>; // Nontransactional store -def : InstRW<[FXU, LSU, Lat5], (instregex "NTSTG$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "NTSTG$")>; //===----------------------------------------------------------------------===// // Processor assist //===----------------------------------------------------------------------===// -def : InstRW<[FXU], (instregex "PPA$")>; +def : InstRW<[WLat30, MCD], (instregex "PPA$")>; //===----------------------------------------------------------------------===// // Miscellaneous Instructions. //===----------------------------------------------------------------------===// // Find leftmost one -def : InstRW<[FXU, FXU, Lat7, GroupAlone], (instregex "FLOGR$")>; +def : InstRW<[WLat7, WLat7, FXU2, GroupAlone], (instregex "FLOGR$")>; // Population count -def : InstRW<[FXU, Lat3], (instregex "POPCNT$")>; +def : InstRW<[WLat3, WLat3, FXU, NormalGr], (instregex "POPCNT$")>; // String instructions -def : InstRW<[FXU, LSU, Lat30], (instregex "SRST$")>; -def : InstRW<[FXU, Lat30], (instregex "SRSTU$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "CUSE$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "SRST(U)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CUSE$")>; // Various complex instructions -def : InstRW<[LSU, Lat30], (instregex "CFC$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "UPT$")>; -def : InstRW<[LSU, Lat30], (instregex "CKSM$")>; -def : InstRW<[FXU, Lat30], (instregex "CMPSC$")>; +def : InstRW<[WLat30, WLat30, WLat30, WLat30, MCD], (instregex "CFC$")>; +def : InstRW<[WLat30, WLat30, WLat30, WLat30, WLat30, WLat30, MCD], + (instregex "UPT$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CKSM$")>; +def : InstRW<[WLat30, WLat30, WLat30, WLat30, MCD], (instregex "CMPSC$")>; // Execute def : InstRW<[LSU, GroupAlone], (instregex "EX(RL)?$")>; @@ -689,155 +757,151 @@ //===----------------------------------------------------------------------===// // Load zero -def : InstRW<[FXU], (instregex "LZ(DR|ER)$")>; -def : InstRW<[FXU, FXU, Lat2, GroupAlone], (instregex "LZXR$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LZ(DR|ER)$")>; +def : InstRW<[WLat2, FXU2, GroupAlone], (instregex "LZXR$")>; // Load -def : InstRW<[FXU], (instregex "LER$")>; -def : InstRW<[FXU], (instregex "LD(R|R32|GR)$")>; -def : InstRW<[FXU, Lat3], (instregex "LGDR$")>; -def : InstRW<[FXU, FXU, Lat2, GroupAlone], (instregex "LXR$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LER$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LD(R|R32|GR)$")>; +def : InstRW<[WLat3, FXU, NormalGr], (instregex "LGDR$")>; +def : InstRW<[WLat2, FXU2, GroupAlone], (instregex "LXR$")>; // Load and Test -def : InstRW<[FPU], (instregex "LT(D|E)BR$")>; -def : InstRW<[FPU], (instregex "LTEBRCompare$")>; -def : InstRW<[FPU], (instregex "LTDBRCompare$")>; -def : InstRW<[FPU2, FPU2, Lat9, GroupAlone], (instregex "LTXBR$")>; -def : InstRW<[FPU2, FPU2, Lat9, GroupAlone], - (instregex "LTXBRCompare$")>; +def : InstRW<[WLat9, WLat9, FPU, NormalGr], (instregex "LT(E|D)BR$")>; +def : InstRW<[WLat9, FPU, NormalGr], (instregex "LT(E|D)BRCompare$")>; +def : InstRW<[WLat10, WLat10, FPU4, GroupAlone], (instregex "LTXBR(Compare)?$")>; // Copy sign -def : InstRW<[FXU, FXU, Lat5, GroupAlone], (instregex "CPSDRd(d|s)$")>; -def : InstRW<[FXU, FXU, Lat5, GroupAlone], (instregex "CPSDRs(d|s)$")>; +def : InstRW<[WLat5, FXU2, GroupAlone], (instregex "CPSDR(d|s)(d|s)$")>; //===----------------------------------------------------------------------===// // FP: Load instructions //===----------------------------------------------------------------------===// -def : InstRW<[LSU], (instregex "LE(Y)?$")>; -def : InstRW<[LSU], (instregex "LD(Y|E32)?$")>; -def : InstRW<[LSU], (instregex "LX$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "L(E|D)(Y|E32)?$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LX$")>; //===----------------------------------------------------------------------===// // FP: Store instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat7], (instregex "STD(Y)?$")>; -def : InstRW<[FXU, LSU, Lat7], (instregex "STE(Y)?$")>; -def : InstRW<[FXU, LSU, Lat5], (instregex "STX$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "ST(E|D)(Y)?$")>; +def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STX$")>; //===----------------------------------------------------------------------===// // FP: Conversion instructions //===----------------------------------------------------------------------===// // Load rounded -def : InstRW<[FPU], (instregex "LEDBR(A)?$")>; -def : InstRW<[FPU, FPU, Lat20], (instregex "LEXBR(A)?$")>; -def : InstRW<[FPU, FPU, Lat20], (instregex "LDXBR(A)?$")>; +def : InstRW<[WLat7, FPU, NormalGr], (instregex "LEDBR(A)?$")>; +def : InstRW<[WLat9, FPU2, NormalGr], (instregex "L(E|D)XBR(A)?$")>; // Load lengthened -def : InstRW<[FPU, LSU, Lat12], (instregex "LDEB$")>; -def : InstRW<[FPU], (instregex "LDEBR$")>; -def : InstRW<[FPU2, FPU2, LSU, Lat15, GroupAlone], (instregex "LX(D|E)B$")>; -def : InstRW<[FPU2, FPU2, Lat10, GroupAlone], (instregex "LX(D|E)BR$")>; +def : InstRW<[WLat7LSU, FPU, LSU, NormalGr], (instregex "LDEB$")>; +def : InstRW<[WLat7, FPU, NormalGr], (instregex "LDEBR$")>; +def : InstRW<[WLat11LSU, FPU4, LSU, GroupAlone], (instregex "LX(E|D)B$")>; +def : InstRW<[WLat10, FPU4, GroupAlone], (instregex "LX(E|D)BR$")>; // Convert from fixed / logical -def : InstRW<[FXU, FPU, Lat9, GroupAlone], (instregex "CE(F|G)BR(A?)$")>; -def : InstRW<[FXU, FPU, Lat9, GroupAlone], (instregex "CD(F|G)BR(A?)$")>; -def : InstRW<[FXU, FPU2, FPU2, Lat11, GroupAlone], (instregex "CX(F|G)BR(A?)$")>; -def : InstRW<[FXU, FPU, Lat9, GroupAlone], (instregex "CEL(F|G)BR$")>; -def : InstRW<[FXU, FPU, Lat9, GroupAlone], (instregex "CDL(F|G)BR$")>; -def : InstRW<[FXU, FPU2, FPU2, Lat11, GroupAlone], (instregex "CXL(F|G)BR$")>; +def : InstRW<[WLat8, FXU, FPU, GroupAlone], (instregex "C(E|D)(F|G)BR(A)?$")>; +def : InstRW<[WLat11, FXU, FPU4, GroupAlone], (instregex "CX(F|G)BR(A?)$")>; +def : InstRW<[WLat8, FXU, FPU, GroupAlone], (instregex "CEL(F|G)BR$")>; +def : InstRW<[WLat8, FXU, FPU, GroupAlone], (instregex "CDL(F|G)BR$")>; +def : InstRW<[WLat11, FXU, FPU4, GroupAlone], (instregex "CXL(F|G)BR$")>; // Convert to fixed / logical -def : InstRW<[FXU, FPU, Lat12, GroupAlone], (instregex "CF(E|D)BR(A?)$")>; -def : InstRW<[FXU, FPU, Lat12, GroupAlone], (instregex "CG(E|D)BR(A?)$")>; -def : InstRW<[FXU, FPU, FPU, Lat20, GroupAlone], (instregex "C(F|G)XBR(A?)$")>; -def : InstRW<[FXU, FPU, Lat11, GroupAlone], (instregex "CLF(E|D)BR$")>; -def : InstRW<[FXU, FPU, Lat11, GroupAlone], (instregex "CLG(E|D)BR$")>; -def : InstRW<[FXU, FPU, FPU, Lat20, GroupAlone], (instregex "CL(F|G)XBR$")>; +def : InstRW<[WLat12, WLat12, FXU, FPU, GroupAlone], + (instregex "C(F|G)(E|D)BR(A?)$")>; +def : InstRW<[WLat12, WLat12, FXU, FPU2, GroupAlone], + (instregex "C(F|G)XBR(A?)$")>; +def : InstRW<[WLat12, WLat12, FXU, FPU, GroupAlone], + (instregex "CL(F|G)(E|D)BR$")>; +def : InstRW<[WLat12, WLat12, FXU, FPU2, GroupAlone], (instregex "CL(F|G)XBR$")>; //===----------------------------------------------------------------------===// // FP: Unary arithmetic //===----------------------------------------------------------------------===// // Load Complement / Negative / Positive -def : InstRW<[FPU], (instregex "L(C|N|P)DBR$")>; -def : InstRW<[FPU], (instregex "L(C|N|P)EBR$")>; -def : InstRW<[FXU], (instregex "LCDFR(_32)?$")>; -def : InstRW<[FXU], (instregex "LNDFR(_32)?$")>; -def : InstRW<[FXU], (instregex "LPDFR(_32)?$")>; -def : InstRW<[FPU2, FPU2, Lat9, GroupAlone], (instregex "L(C|N|P)XBR$")>; +def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "L(C|N|P)(E|D)BR$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "L(C|N|P)DFR(_32)?$")>; +def : InstRW<[WLat10, WLat10, FPU4, GroupAlone], (instregex "L(C|N|P)XBR$")>; // Square root -def : InstRW<[FPU, LSU, Lat30], (instregex "SQ(E|D)B$")>; -def : InstRW<[FPU, Lat30], (instregex "SQ(E|D)BR$")>; -def : InstRW<[FPU2, FPU2, Lat30, GroupAlone], (instregex "SQXBR$")>; +def : InstRW<[WLat30, FPU, LSU, NormalGr], (instregex "SQ(E|D)B$")>; +def : InstRW<[WLat30, FPU, NormalGr], (instregex "SQ(E|D)BR$")>; +def : InstRW<[WLat30, FPU4, GroupAlone], (instregex "SQXBR$")>; // Load FP integer -def : InstRW<[FPU], (instregex "FIEBR(A)?$")>; -def : InstRW<[FPU], (instregex "FIDBR(A)?$")>; -def : InstRW<[FPU2, FPU2, Lat15, GroupAlone], (instregex "FIXBR(A)?$")>; +def : InstRW<[WLat7, FPU, NormalGr], (instregex "FI(E|D)BR(A)?$")>; +def : InstRW<[WLat15, FPU4, GroupAlone], (instregex "FIXBR(A)?$")>; //===----------------------------------------------------------------------===// // FP: Binary arithmetic //===----------------------------------------------------------------------===// // Addition -def : InstRW<[FPU, LSU, Lat12], (instregex "A(E|D)B$")>; -def : InstRW<[FPU], (instregex "A(E|D)BR$")>; -def : InstRW<[FPU2, FPU2, Lat20, GroupAlone], (instregex "AXBR$")>; +def : InstRW<[WLat7LSU, WLat7LSU, RegReadAdv, FPU, LSU, NormalGr], + (instregex "A(E|D)B$")>; +def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "A(E|D)BR$")>; +def : InstRW<[WLat20, WLat20, FPU4, GroupAlone], (instregex "AXBR$")>; // Subtraction -def : InstRW<[FPU, LSU, Lat12], (instregex "S(E|D)B$")>; -def : InstRW<[FPU], (instregex "S(E|D)BR$")>; -def : InstRW<[FPU2, FPU2, Lat20, GroupAlone], (instregex "SXBR$")>; +def : InstRW<[WLat7LSU, WLat7LSU, RegReadAdv, FPU, LSU, NormalGr], + (instregex "S(E|D)B$")>; +def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "S(E|D)BR$")>; +def : InstRW<[WLat20, WLat20, FPU4, GroupAlone], (instregex "SXBR$")>; // Multiply -def : InstRW<[FPU, LSU, Lat12], (instregex "M(D|DE|EE)B$")>; -def : InstRW<[FPU], (instregex "M(D|DE|EE)BR$")>; -def : InstRW<[FPU2, FPU2, LSU, Lat15, GroupAlone], (instregex "MXDB$")>; -def : InstRW<[FPU2, FPU2, Lat10, GroupAlone], (instregex "MXDBR$")>; -def : InstRW<[FPU2, FPU2, Lat30, GroupAlone], (instregex "MXBR$")>; +def : InstRW<[WLat7LSU, RegReadAdv, FPU, LSU, NormalGr], + (instregex "M(D|DE|EE)B$")>; +def : InstRW<[WLat7, FPU, NormalGr], (instregex "M(D|DE|EE)BR$")>; +def : InstRW<[WLat11LSU, RegReadAdv, FPU4, LSU, GroupAlone], + (instregex "MXDB$")>; +def : InstRW<[WLat10, FPU4, GroupAlone], (instregex "MXDBR$")>; +def : InstRW<[WLat30, FPU4, GroupAlone], (instregex "MXBR$")>; // Multiply and add / subtract -def : InstRW<[FPU, FPU, LSU, Lat12, GroupAlone], (instregex "M(A|S)EB$")>; -def : InstRW<[FPU, GroupAlone], (instregex "M(A|S)EBR$")>; -def : InstRW<[FPU, FPU, LSU, Lat12, GroupAlone], (instregex "M(A|S)DB$")>; -def : InstRW<[FPU, GroupAlone], (instregex "M(A|S)DBR$")>; +def : InstRW<[WLat7LSU, RegReadAdv, RegReadAdv, FPU2, LSU, GroupAlone], + (instregex "M(A|S)EB$")>; +def : InstRW<[WLat7, FPU, GroupAlone], (instregex "M(A|S)EBR$")>; +def : InstRW<[WLat7LSU, RegReadAdv, RegReadAdv, FPU2, LSU, GroupAlone], + (instregex "M(A|S)DB$")>; +def : InstRW<[WLat7, FPU, GroupAlone], (instregex "M(A|S)DBR$")>; // Division -def : InstRW<[FPU, LSU, Lat30], (instregex "D(E|D)B$")>; -def : InstRW<[FPU, Lat30], (instregex "D(E|D)BR$")>; -def : InstRW<[FPU2, FPU2, Lat30, GroupAlone], (instregex "DXBR$")>; +def : InstRW<[WLat30, RegReadAdv, FPU, LSU, NormalGr], (instregex "D(E|D)B$")>; +def : InstRW<[WLat30, FPU, NormalGr], (instregex "D(E|D)BR$")>; +def : InstRW<[WLat30, FPU4, GroupAlone], (instregex "DXBR$")>; // Divide to integer -def : InstRW<[FPU, Lat30], (instregex "DI(E|D)BR$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "DI(E|D)BR$")>; //===----------------------------------------------------------------------===// // FP: Comparisons //===----------------------------------------------------------------------===// // Compare -def : InstRW<[FPU, LSU, Lat12], (instregex "(K|C)(E|D)B$")>; -def : InstRW<[FPU], (instregex "(K|C)(E|D)BR$")>; -def : InstRW<[FPU, FPU, Lat30], (instregex "(K|C)XBR$")>; +def : InstRW<[WLat11LSU, RegReadAdv, FPU, LSU, NormalGr], + (instregex "(K|C)(E|D)B$")>; +def : InstRW<[WLat9, FPU, NormalGr], (instregex "(K|C)(E|D)BR$")>; +def : InstRW<[WLat30, FPU2, NormalGr], (instregex "(K|C)XBR$")>; // Test Data Class -def : InstRW<[FPU, LSU, Lat15], (instregex "TC(E|D)B$")>; -def : InstRW<[FPU2, FPU2, LSU, Lat15, GroupAlone], (instregex "TCXB$")>; +def : InstRW<[WLat15, FPU, LSU, NormalGr], (instregex "TC(E|D)B$")>; +def : InstRW<[WLat15, FPU4, LSU, GroupAlone], (instregex "TCXB$")>; //===----------------------------------------------------------------------===// // FP: Floating-point control register instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat4, GroupAlone], (instregex "EFPC$")>; -def : InstRW<[LSU, Lat3, GroupAlone], (instregex "SFPC$")>; -def : InstRW<[LSU, LSU, Lat6, GroupAlone], (instregex "LFPC$")>; -def : InstRW<[FXU, LSU, Lat3, GroupAlone], (instregex "STFPC$")>; -def : InstRW<[FXU, Lat30], (instregex "SFASR$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "LFAS$")>; -def : InstRW<[FXU, GroupAlone], (instregex "SRNM(B|T)?$")>; +def : InstRW<[WLat4, FXU, LSU, GroupAlone], (instregex "EFPC$")>; +def : InstRW<[WLat1, FXU, LSU, GroupAlone], (instregex "STFPC$")>; +def : InstRW<[WLat1, LSU, GroupAlone], (instregex "SFPC$")>; +def : InstRW<[WLat1, LSU2, GroupAlone], (instregex "LFPC$")>; +def : InstRW<[WLat30, MCD], (instregex "SFASR$")>; +def : InstRW<[WLat30, MCD], (instregex "LFAS$")>; +def : InstRW<[WLat2, FXU, GroupAlone], (instregex "SRNM(B|T)?$")>; // --------------------- Hexadecimal floating point ------------------------- // @@ -847,108 +911,111 @@ //===----------------------------------------------------------------------===// // Load and Test -def : InstRW<[FPU], (instregex "LT(D|E)R$")>; -def : InstRW<[FPU2, FPU2, Lat9, GroupAlone], (instregex "LTXR$")>; +def : InstRW<[WLat9, WLat9, FPU, NormalGr], (instregex "LT(E|D)R$")>; +def : InstRW<[WLat9, WLat9, FPU4, GroupAlone], (instregex "LTXR$")>; //===----------------------------------------------------------------------===// // HFP: Conversion instructions //===----------------------------------------------------------------------===// // Load rounded -def : InstRW<[FPU], (instregex "(LEDR|LRER)$")>; -def : InstRW<[FPU], (instregex "LEXR$")>; -def : InstRW<[FPU], (instregex "(LDXR|LRDR)$")>; +def : InstRW<[WLat7, FPU, NormalGr], (instregex "(LEDR|LRER)$")>; +def : InstRW<[WLat7, FPU, NormalGr], (instregex "LEXR$")>; +def : InstRW<[WLat9, FPU, NormalGr], (instregex "(LDXR|LRDR)$")>; // Load lengthened -def : InstRW<[LSU], (instregex "LDE$")>; -def : InstRW<[FXU], (instregex "LDER$")>; -def : InstRW<[FPU2, FPU2, LSU, Lat15, GroupAlone], (instregex "LX(D|E)$")>; -def : InstRW<[FPU2, FPU2, Lat10, GroupAlone], (instregex "LX(D|E)R$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LDE$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LDER$")>; +def : InstRW<[WLat11LSU, FPU4, LSU, GroupAlone], (instregex "LX(E|D)$")>; +def : InstRW<[WLat9, FPU4, GroupAlone], (instregex "LX(E|D)R$")>; // Convert from fixed -def : InstRW<[FXU, FPU, Lat9, GroupAlone], (instregex "CE(F|G)R$")>; -def : InstRW<[FXU, FPU, Lat9, GroupAlone], (instregex "CD(F|G)R$")>; -def : InstRW<[FXU, FPU2, FPU2, Lat11, GroupAlone], (instregex "CX(F|G)R$")>; +def : InstRW<[WLat8, FXU, FPU, GroupAlone], (instregex "C(E|D)(F|G)R$")>; +def : InstRW<[WLat10, FXU, FPU4, GroupAlone], (instregex "CX(F|G)R$")>; // Convert to fixed -def : InstRW<[FXU, FPU, Lat12, GroupAlone], (instregex "CF(E|D)R$")>; -def : InstRW<[FXU, FPU, Lat12, GroupAlone], (instregex "CG(E|D)R$")>; -def : InstRW<[FXU, FPU, FPU, Lat20, GroupAlone], (instregex "C(F|G)XR$")>; +def : InstRW<[WLat12, WLat12, FXU, FPU, GroupAlone], + (instregex "C(F|G)(E|D)R$")>; +def : InstRW<[WLat30, WLat30, FXU, FPU2, GroupAlone], (instregex "C(F|G)XR$")>; // Convert BFP to HFP / HFP to BFP. -def : InstRW<[FPU], (instregex "THD(E)?R$")>; -def : InstRW<[FPU], (instregex "TB(E)?DR$")>; +def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "THD(E)?R$")>; +def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "TB(E)?DR$")>; //===----------------------------------------------------------------------===// // HFP: Unary arithmetic //===----------------------------------------------------------------------===// // Load Complement / Negative / Positive -def : InstRW<[FPU], (instregex "L(C|N|P)DR$")>; -def : InstRW<[FPU], (instregex "L(C|N|P)ER$")>; -def : InstRW<[FPU2, FPU2, Lat9, GroupAlone], (instregex "L(C|N|P)XR$")>; +def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "L(C|N|P)(E|D)R$")>; +def : InstRW<[WLat9, WLat9, FPU4, GroupAlone], (instregex "L(C|N|P)XR$")>; // Halve -def : InstRW<[FPU], (instregex "H(E|D)R$")>; +def : InstRW<[WLat7, FPU, NormalGr], (instregex "H(E|D)R$")>; // Square root -def : InstRW<[FPU, LSU, Lat30], (instregex "SQ(E|D)$")>; -def : InstRW<[FPU, Lat30], (instregex "SQ(E|D)R$")>; -def : InstRW<[FPU2, FPU2, Lat30, GroupAlone], (instregex "SQXR$")>; +def : InstRW<[WLat30, FPU, LSU, NormalGr], (instregex "SQ(E|D)$")>; +def : InstRW<[WLat30, FPU, NormalGr], (instregex "SQ(E|D)R$")>; +def : InstRW<[WLat30, FPU4, GroupAlone], (instregex "SQXR$")>; // Load FP integer -def : InstRW<[FPU], (instregex "FIER$")>; -def : InstRW<[FPU], (instregex "FIDR$")>; -def : InstRW<[FPU2, FPU2, Lat15, GroupAlone], (instregex "FIXR$")>; +def : InstRW<[WLat7, FPU, NormalGr], (instregex "FI(E|D)R$")>; +def : InstRW<[WLat15, FPU4, GroupAlone], (instregex "FIXR$")>; //===----------------------------------------------------------------------===// // HFP: Binary arithmetic //===----------------------------------------------------------------------===// // Addition -def : InstRW<[FPU, LSU, Lat12], (instregex "A(E|D|U|W)$")>; -def : InstRW<[FPU], (instregex "A(E|D|U|W)R$")>; -def : InstRW<[FPU2, FPU2, Lat20, GroupAlone], (instregex "AXR$")>; +def : InstRW<[WLat7LSU, WLat7LSU, RegReadAdv, FPU, LSU, NormalGr], + (instregex "A(E|D|U|W)$")>; +def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "A(E|D|U|W)R$")>; +def : InstRW<[WLat15, WLat15, FPU4, GroupAlone], (instregex "AXR$")>; // Subtraction -def : InstRW<[FPU, LSU, Lat12], (instregex "S(E|D|U|W)$")>; -def : InstRW<[FPU], (instregex "S(E|D|U|W)R$")>; -def : InstRW<[FPU2, FPU2, Lat20, GroupAlone], (instregex "SXR$")>; +def : InstRW<[WLat7LSU, WLat7LSU, RegReadAdv, FPU, LSU, NormalGr], + (instregex "S(E|D|U|W)$")>; +def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "S(E|D|U|W)R$")>; +def : InstRW<[WLat15, WLat15, FPU4, GroupAlone], (instregex "SXR$")>; // Multiply -def : InstRW<[FPU, LSU, Lat12], (instregex "M(D|DE|E|EE)$")>; -def : InstRW<[FPU], (instregex "M(D|DE|E|EE)R$")>; -def : InstRW<[FPU2, FPU2, LSU, Lat15, GroupAlone], (instregex "MXD$")>; -def : InstRW<[FPU2, FPU2, Lat10, GroupAlone], (instregex "MXDR$")>; -def : InstRW<[FPU2, FPU2, Lat30, GroupAlone], (instregex "MXR$")>; -def : InstRW<[FPU2, FPU2, LSU, Lat15, GroupAlone], (instregex "MY$")>; -def : InstRW<[FPU, FPU, LSU, Lat15, GroupAlone], (instregex "MY(H|L)$")>; -def : InstRW<[FPU2, FPU2, Lat10, GroupAlone], (instregex "MYR$")>; -def : InstRW<[FPU, Lat10, GroupAlone], (instregex "MY(H|L)R$")>; +def : InstRW<[WLat7LSU, RegReadAdv, FPU, LSU, NormalGr], (instregex "M(D|EE)$")>; +def : InstRW<[WLat8LSU, RegReadAdv, FPU, LSU, NormalGr], (instregex "M(DE|E)$")>; +def : InstRW<[WLat7, FPU, NormalGr], (instregex "M(D|EE)R$")>; +def : InstRW<[WLat8, FPU, NormalGr], (instregex "M(DE|E)R$")>; +def : InstRW<[WLat11LSU, RegReadAdv, FPU4, LSU, GroupAlone], (instregex "MXD$")>; +def : InstRW<[WLat10, FPU4, GroupAlone], (instregex "MXDR$")>; +def : InstRW<[WLat30, FPU4, GroupAlone], (instregex "MXR$")>; +def : InstRW<[WLat11LSU, RegReadAdv, FPU4, LSU, GroupAlone], (instregex "MY$")>; +def : InstRW<[WLat7LSU, RegReadAdv, FPU2, LSU, GroupAlone], + (instregex "MY(H|L)$")>; +def : InstRW<[WLat10, FPU4, GroupAlone], (instregex "MYR$")>; +def : InstRW<[WLat7, FPU, GroupAlone], (instregex "MY(H|L)R$")>; // Multiply and add / subtract -def : InstRW<[FPU, FPU, LSU, Lat12, GroupAlone], (instregex "M(A|S)E$")>; -def : InstRW<[FPU, GroupAlone], (instregex "M(A|S)ER$")>; -def : InstRW<[FPU, FPU, LSU, Lat12, GroupAlone], (instregex "M(A|S)D$")>; -def : InstRW<[FPU, GroupAlone], (instregex "M(A|S)DR$")>; -def : InstRW<[FPU2, FPU2, LSU, GroupAlone], (instregex "MAY$")>; -def : InstRW<[FPU2, FPU2, GroupAlone], (instregex "MAYR$")>; -def : InstRW<[FPU, FPU, LSU, Lat12, GroupAlone], (instregex "MAY(H|L)$")>; -def : InstRW<[FPU, GroupAlone], (instregex "MAY(H|L)R$")>; +def : InstRW<[WLat7LSU, RegReadAdv, RegReadAdv, FPU2, LSU, GroupAlone], + (instregex "M(A|S)(E|D)$")>; +def : InstRW<[WLat7, FPU, GroupAlone], (instregex "M(A|S)(E|D)R$")>; +def : InstRW<[WLat11LSU, RegReadAdv, RegReadAdv, FPU4, LSU, GroupAlone], + (instregex "MAY$")>; +def : InstRW<[WLat7LSU, RegReadAdv, RegReadAdv, FPU2, LSU, GroupAlone], + (instregex "MAY(H|L)$")>; +def : InstRW<[WLat10, FPU4, GroupAlone], (instregex "MAYR$")>; +def : InstRW<[WLat7, FPU, GroupAlone], (instregex "MAY(H|L)R$")>; // Division -def : InstRW<[FPU, LSU, Lat30], (instregex "D(E|D)$")>; -def : InstRW<[FPU, Lat30], (instregex "D(E|D)R$")>; -def : InstRW<[FPU2, FPU2, Lat30, GroupAlone], (instregex "DXR$")>; +def : InstRW<[WLat30, RegReadAdv, FPU, LSU, NormalGr], (instregex "D(E|D)$")>; +def : InstRW<[WLat30, FPU, NormalGr], (instregex "D(E|D)R$")>; +def : InstRW<[WLat30, FPU4, GroupAlone], (instregex "DXR$")>; //===----------------------------------------------------------------------===// // HFP: Comparisons //===----------------------------------------------------------------------===// // Compare -def : InstRW<[FPU, LSU, Lat12], (instregex "C(E|D)$")>; -def : InstRW<[FPU], (instregex "C(E|D)R$")>; -def : InstRW<[FPU, FPU, Lat15], (instregex "CXR$")>; +def : InstRW<[WLat11LSU, RegReadAdv, FPU, LSU, NormalGr], (instregex "C(E|D)$")>; +def : InstRW<[WLat9, FPU, NormalGr], (instregex "C(E|D)R$")>; +def : InstRW<[WLat15, FPU2, NormalGr], (instregex "CXR$")>; // ------------------------ Decimal floating point -------------------------- // @@ -958,120 +1025,121 @@ //===----------------------------------------------------------------------===// // Load and Test -def : InstRW<[DFU, Lat20], (instregex "LTDTR$")>; -def : InstRW<[DFU2, DFU2, Lat20, GroupAlone], (instregex "LTXTR$")>; +def : InstRW<[WLat4, WLat4, DFU, NormalGr], (instregex "LTDTR$")>; +def : InstRW<[WLat6, WLat6, DFU4, GroupAlone], (instregex "LTXTR$")>; //===----------------------------------------------------------------------===// // DFP: Conversion instructions //===----------------------------------------------------------------------===// // Load rounded -def : InstRW<[DFU, Lat30], (instregex "LEDTR$")>; -def : InstRW<[DFU, DFU, Lat30], (instregex "LDXTR$")>; +def : InstRW<[WLat30, DFU, NormalGr], (instregex "LEDTR$")>; +def : InstRW<[WLat30, DFU2, NormalGr], (instregex "LDXTR$")>; // Load lengthened -def : InstRW<[DFU, Lat20], (instregex "LDETR$")>; -def : InstRW<[DFU2, DFU2, Lat20, GroupAlone], (instregex "LXDTR$")>; +def : InstRW<[WLat7, DFU, NormalGr], (instregex "LDETR$")>; +def : InstRW<[WLat6, DFU4, GroupAlone], (instregex "LXDTR$")>; // Convert from fixed / logical -def : InstRW<[FXU, DFU, Lat9, GroupAlone], (instregex "CDFTR$")>; -def : InstRW<[FXU, DFU, Lat30, GroupAlone], (instregex "CDGTR(A)?$")>; -def : InstRW<[FXU, DFU2, DFU2, GroupAlone], (instregex "CXFTR$")>; -def : InstRW<[FXU, DFU2, DFU2, Lat30, GroupAlone], (instregex "CXGTR(A)?$")>; -def : InstRW<[FXU, DFU, Lat11, GroupAlone], (instregex "CDL(F|G)TR$")>; -def : InstRW<[FXU, DFU2, DFU2, Lat11, GroupAlone], (instregex "CXLFTR$")>; -def : InstRW<[FXU, DFU2, DFU2, Lat6, GroupAlone], (instregex "CXLGTR$")>; +def : InstRW<[WLat9, FXU, DFU, GroupAlone], (instregex "CDFTR$")>; +def : InstRW<[WLat30, FXU, DFU, GroupAlone], (instregex "CDGTR(A)?$")>; +def : InstRW<[WLat5, FXU, DFU4, GroupAlone], (instregex "CXFTR(A)?$")>; +def : InstRW<[WLat30, FXU, DFU4, GroupAlone], (instregex "CXGTR(A)?$")>; +def : InstRW<[WLat9, FXU, DFU, GroupAlone], (instregex "CDL(F|G)TR$")>; +def : InstRW<[WLat9, FXU, DFU4, GroupAlone], (instregex "CXLFTR$")>; +def : InstRW<[WLat5, FXU, DFU4, GroupAlone], (instregex "CXLGTR$")>; // Convert to fixed / logical -def : InstRW<[FXU, DFU, Lat11, GroupAlone], (instregex "CFDTR(A)?$")>; -def : InstRW<[FXU, DFU, Lat30, GroupAlone], (instregex "CGDTR(A)?$")>; -def : InstRW<[FXU, DFU, DFU, Lat11, GroupAlone], (instregex "CFXTR$")>; -def : InstRW<[FXU, DFU, DFU, Lat30, GroupAlone], (instregex "CGXTR(A)?$")>; -def : InstRW<[FXU, DFU, Lat11, GroupAlone], (instregex "CL(F|G)DTR$")>; -def : InstRW<[FXU, DFU, DFU, Lat11, GroupAlone], (instregex "CL(F|G)XTR$")>; +def : InstRW<[WLat11, WLat11, FXU, DFU, GroupAlone], (instregex "CFDTR(A)?$")>; +def : InstRW<[WLat30, WLat30, FXU, DFU, GroupAlone], (instregex "CGDTR(A)?$")>; +def : InstRW<[WLat7, WLat7, FXU, DFU2, GroupAlone], (instregex "CFXTR$")>; +def : InstRW<[WLat30, WLat30, FXU, DFU2, GroupAlone], (instregex "CGXTR(A)?$")>; +def : InstRW<[WLat11, WLat11, FXU, DFU, GroupAlone], (instregex "CL(F|G)DTR$")>; +def : InstRW<[WLat7, WLat7, FXU, DFU2, GroupAlone], (instregex "CL(F|G)XTR$")>; // Convert from / to signed / unsigned packed -def : InstRW<[FXU, DFU, Lat12, GroupAlone], (instregex "CD(S|U)TR$")>; -def : InstRW<[FXU, FXU, DFU2, DFU2, Lat20, GroupAlone], (instregex "CX(S|U)TR$")>; -def : InstRW<[FXU, DFU, Lat12, GroupAlone], (instregex "C(S|U)DTR$")>; -def : InstRW<[FXU, FXU, DFU2, DFU2, Lat20, GroupAlone], (instregex "C(S|U)XTR$")>; +def : InstRW<[WLat5, FXU, DFU, GroupAlone], (instregex "CD(S|U)TR$")>; +def : InstRW<[WLat8, FXU2, DFU4, GroupAlone], (instregex "CX(S|U)TR$")>; +def : InstRW<[WLat7, FXU, DFU, GroupAlone], (instregex "C(S|U)DTR$")>; +def : InstRW<[WLat12, FXU2, DFU4, GroupAlone], (instregex "C(S|U)XTR$")>; // Convert from / to zoned -def : InstRW<[LSU, DFU2, Lat7, GroupAlone], (instregex "CDZT$")>; -def : InstRW<[LSU, LSU, DFU2, DFU2, Lat10, GroupAlone], (instregex "CXZT$")>; -def : InstRW<[FXU, LSU, DFU, DFU, Lat11, GroupAlone], (instregex "CZDT$")>; -def : InstRW<[FXU, LSU, DFU, DFU, Lat15, GroupAlone], (instregex "CZXT$")>; +def : InstRW<[WLat4LSU, LSU, DFU2, GroupAlone], (instregex "CDZT$")>; +def : InstRW<[WLat11LSU, LSU2, DFU4, GroupAlone], (instregex "CXZT$")>; +def : InstRW<[WLat1, FXU, LSU, DFU2, GroupAlone], (instregex "CZDT$")>; +def : InstRW<[WLat1, FXU, LSU, DFU2, GroupAlone], (instregex "CZXT$")>; // Perform floating-point operation -def : InstRW<[FXU, Lat30], (instregex "PFPO$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "PFPO$")>; //===----------------------------------------------------------------------===// // DFP: Unary arithmetic //===----------------------------------------------------------------------===// // Load FP integer -def : InstRW<[DFU, Lat20], (instregex "FIDTR$")>; -def : InstRW<[DFU2, DFU2, Lat20, GroupAlone], (instregex "FIXTR$")>; +def : InstRW<[WLat8, DFU, NormalGr], (instregex "FIDTR$")>; +def : InstRW<[WLat10, DFU4, GroupAlone], (instregex "FIXTR$")>; // Extract biased exponent -def : InstRW<[FXU, DFU, Lat15, GroupAlone], (instregex "EEDTR$")>; -def : InstRW<[FXU, DFU2, Lat15, GroupAlone], (instregex "EEXTR$")>; +def : InstRW<[WLat7, FXU, DFU, GroupAlone], (instregex "EEDTR$")>; +def : InstRW<[WLat8, FXU, DFU2, GroupAlone], (instregex "EEXTR$")>; // Extract significance -def : InstRW<[FXU, DFU, Lat15, GroupAlone], (instregex "ESDTR$")>; -def : InstRW<[FXU, DFU, DFU, Lat20, GroupAlone], (instregex "ESXTR$")>; +def : InstRW<[WLat7, FXU, DFU, GroupAlone], (instregex "ESDTR$")>; +def : InstRW<[WLat8, FXU, DFU2, GroupAlone], (instregex "ESXTR$")>; //===----------------------------------------------------------------------===// // DFP: Binary arithmetic //===----------------------------------------------------------------------===// // Addition -def : InstRW<[DFU, Lat30], (instregex "ADTR(A)?$")>; -def : InstRW<[DFU2, DFU2, Lat30, GroupAlone], (instregex "AXTR(A)?$")>; +def : InstRW<[WLat9, WLat9, DFU, NormalGr], (instregex "ADTR(A)?$")>; +def : InstRW<[WLat30, WLat30, DFU4, GroupAlone], (instregex "AXTR(A)?$")>; // Subtraction -def : InstRW<[DFU, Lat30], (instregex "SDTR(A)?$")>; -def : InstRW<[DFU2, DFU2, Lat30, GroupAlone], (instregex "SXTR(A)?$")>; +def : InstRW<[WLat9, WLat9, DFU, NormalGr], (instregex "SDTR(A)?$")>; +def : InstRW<[WLat30, WLat30, DFU4, GroupAlone], (instregex "SXTR(A)?$")>; // Multiply -def : InstRW<[DFU, Lat30], (instregex "MDTR(A)?$")>; -def : InstRW<[DFU2, DFU2, Lat30, GroupAlone], (instregex "MXTR(A)?$")>; +def : InstRW<[WLat30, DFU, NormalGr], (instregex "MDTR(A)?$")>; +def : InstRW<[WLat30, DFU4, GroupAlone], (instregex "MXTR(A)?$")>; // Division -def : InstRW<[DFU, Lat30], (instregex "DDTR(A)?$")>; -def : InstRW<[DFU2, DFU2, Lat30, GroupAlone], (instregex "DXTR(A)?$")>; +def : InstRW<[WLat30, DFU, NormalGr], (instregex "DDTR(A)?$")>; +def : InstRW<[WLat30, DFU4, GroupAlone], (instregex "DXTR(A)?$")>; // Quantize -def : InstRW<[DFU, Lat30], (instregex "QADTR$")>; -def : InstRW<[DFU2, DFU2, Lat30, GroupAlone], (instregex "QAXTR$")>; +def : InstRW<[WLat8, WLat8, DFU, NormalGr], (instregex "QADTR$")>; +def : InstRW<[WLat10, WLat10, DFU4, GroupAlone], (instregex "QAXTR$")>; // Reround -def : InstRW<[FXU, DFU, Lat30, GroupAlone], (instregex "RRDTR$")>; -def : InstRW<[FXU, DFU2, DFU2, Lat30, GroupAlone], (instregex "RRXTR$")>; +def : InstRW<[WLat11, WLat11, FXU, DFU, GroupAlone], (instregex "RRDTR$")>; +def : InstRW<[WLat30, WLat30, FXU, DFU4, GroupAlone], (instregex "RRXTR$")>; // Shift significand left/right -def : InstRW<[LSU, DFU, Lat11, GroupAlone], (instregex "S(L|R)DT$")>; -def : InstRW<[LSU, DFU2, DFU2, Lat15, GroupAlone], (instregex "S(L|R)XT$")>; +def : InstRW<[WLat7LSU, LSU, DFU, GroupAlone], (instregex "S(L|R)DT$")>; +def : InstRW<[WLat11LSU, LSU, DFU4, GroupAlone], (instregex "S(L|R)XT$")>; // Insert biased exponent -def : InstRW<[FXU, DFU, Lat11, GroupAlone], (instregex "IEDTR$")>; -def : InstRW<[FXU, DFU2, DFU2, Lat15, GroupAlone], (instregex "IEXTR$")>; +def : InstRW<[WLat5, FXU, DFU, GroupAlone], (instregex "IEDTR$")>; +def : InstRW<[WLat7, FXU, DFU4, GroupAlone], (instregex "IEXTR$")>; //===----------------------------------------------------------------------===// // DFP: Comparisons //===----------------------------------------------------------------------===// // Compare -def : InstRW<[DFU, Lat11], (instregex "(K|C)DTR$")>; -def : InstRW<[DFU, DFU, Lat15], (instregex "(K|C)XTR$")>; +def : InstRW<[WLat9, DFU, NormalGr], (instregex "(K|C)DTR$")>; +def : InstRW<[WLat10, DFU2, NormalGr], (instregex "(K|C)XTR$")>; // Compare biased exponent -def : InstRW<[DFU, Lat8], (instregex "CEDTR$")>; -def : InstRW<[DFU, DFU, Lat9], (instregex "CEXTR$")>; +def : InstRW<[WLat4, DFU, NormalGr], (instregex "CEDTR$")>; +def : InstRW<[WLat5, DFU2, NormalGr], (instregex "CEXTR$")>; // Test Data Class/Group -def : InstRW<[LSU, DFU, Lat15], (instregex "TD(C|G)(E|D)T$")>; -def : InstRW<[LSU, DFU2, Lat15], (instregex "TD(C|G)XT$")>; +def : InstRW<[WLat9, LSU, DFU, NormalGr], (instregex "TD(C|G)DT$")>; +def : InstRW<[WLat10, LSU, DFU, NormalGr], (instregex "TD(C|G)ET$")>; +def : InstRW<[WLat10, LSU, DFU2, NormalGr], (instregex "TD(C|G)XT$")>; // -------------------------------- System ---------------------------------- // @@ -1080,157 +1148,152 @@ // System: Program-Status Word Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, Lat30], (instregex "EPSW$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "LPSW(E)?$")>; -def : InstRW<[FXU, Lat3, GroupAlone], (instregex "IPK$")>; -def : InstRW<[LSU, EndGroup], (instregex "SPKA$")>; -def : InstRW<[LSU, EndGroup], (instregex "SSM$")>; -def : InstRW<[FXU, LSU, GroupAlone], (instregex "ST(N|O)SM$")>; -def : InstRW<[FXU, Lat3], (instregex "IAC$")>; -def : InstRW<[LSU, EndGroup], (instregex "SAC(F)?$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "EPSW$")>; +def : InstRW<[WLat30, MCD], (instregex "LPSW(E)?$")>; +def : InstRW<[WLat3, FXU, GroupAlone], (instregex "IPK$")>; +def : InstRW<[WLat1, LSU, EndGroup], (instregex "SPKA$")>; +def : InstRW<[WLat1, LSU, EndGroup], (instregex "SSM$")>; +def : InstRW<[WLat1, FXU, LSU, GroupAlone], (instregex "ST(N|O)SM$")>; +def : InstRW<[WLat3, FXU, NormalGr], (instregex "IAC$")>; +def : InstRW<[WLat1, LSU, EndGroup], (instregex "SAC(F)?$")>; //===----------------------------------------------------------------------===// // System: Control Register Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat30], (instregex "LCTL(G)?$")>; -def : InstRW<[FXU, LSU, LSU, LSU, LSU, Lat30, GroupAlone], - (instregex "STCT(L|G)$")>; -def : InstRW<[LSU], (instregex "E(P|S)A(I)?R$")>; -def : InstRW<[FXU, Lat30], (instregex "SSA(I)?R$")>; -def : InstRW<[FXU, Lat30], (instregex "ESEA$")>; +def : InstRW<[WLat10, WLat10, FXU, LSU, NormalGr], (instregex "LCTL(G)?$")>; +def : InstRW<[WLat1, FXU5, LSU5, GroupAlone], (instregex "STCT(L|G)$")>; +def : InstRW<[LSULatency, LSU, NormalGr], (instregex "E(P|S)A(I)?R$")>; +def : InstRW<[WLat30, MCD], (instregex "SSA(I)?R$")>; +def : InstRW<[WLat30, MCD], (instregex "ESEA$")>; //===----------------------------------------------------------------------===// // System: Prefix-Register Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat30], (instregex "SPX$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "STPX$")>; +def : InstRW<[WLat30, MCD], (instregex "S(T)?PX$")>; //===----------------------------------------------------------------------===// // System: Storage-Key and Real Memory Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, Lat30], (instregex "ISKE$")>; -def : InstRW<[FXU, Lat30], (instregex "IVSK$")>; -def : InstRW<[FXU, Lat30], (instregex "SSKE(Opt)?$")>; -def : InstRW<[FXU, Lat30], (instregex "RRB(E|M)$")>; -def : InstRW<[FXU, Lat30], (instregex "PFMF$")>; -def : InstRW<[FXU, Lat30], (instregex "TB$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "PGIN$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "PGOUT$")>; +def : InstRW<[WLat30, MCD], (instregex "ISKE$")>; +def : InstRW<[WLat30, MCD], (instregex "IVSK$")>; +def : InstRW<[WLat30, MCD], (instregex "SSKE(Opt)?$")>; +def : InstRW<[WLat30, MCD], (instregex "RRB(E|M)$")>; +def : InstRW<[WLat30, MCD], (instregex "PFMF$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "TB$")>; +def : InstRW<[WLat30, MCD], (instregex "PGIN$")>; +def : InstRW<[WLat30, MCD], (instregex "PGOUT$")>; //===----------------------------------------------------------------------===// // System: Dynamic-Address-Translation Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat30], (instregex "IPTE(Opt)?(Opt)?$")>; -def : InstRW<[FXU, Lat30], (instregex "IDTE(Opt)?$")>; -def : InstRW<[FXU, Lat30], (instregex "CRDTE(Opt)?$")>; -def : InstRW<[FXU, Lat30], (instregex "PTLB$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "CSP(G)?$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "LPTEA$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "LRA(Y|G)?$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "STRAG$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "LURA(G)?$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "STUR(A|G)$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "TPROT$")>; +def : InstRW<[WLat30, MCD], (instregex "IPTE(Opt)?(Opt)?$")>; +def : InstRW<[WLat30, MCD], (instregex "IDTE(Opt)?$")>; +def : InstRW<[WLat30, MCD], (instregex "CRDTE(Opt)?$")>; +def : InstRW<[WLat30, MCD], (instregex "PTLB$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "CSP(G)?$")>; +def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "LPTEA$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "LRA(Y|G)?$")>; +def : InstRW<[WLat30, MCD], (instregex "STRAG$")>; +def : InstRW<[WLat30, MCD], (instregex "LURA(G)?$")>; +def : InstRW<[WLat30, MCD], (instregex "STUR(A|G)$")>; +def : InstRW<[WLat30, MCD], (instregex "TPROT$")>; //===----------------------------------------------------------------------===// // System: Memory-move Instructions //===----------------------------------------------------------------------===// -def : InstRW<[LSU, Lat8, GroupAlone], (instregex "MVC(K|P|S)$")>; -def : InstRW<[LSU, Lat6, Lat30, GroupAlone], (instregex "MVCSK$")>; -def : InstRW<[LSU, Lat6, GroupAlone], (instregex "MVCDK$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "MVCOS$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MVPG$")>; +def : InstRW<[WLat30, MCD], (instregex "MVC(K|P|S)$")>; +def : InstRW<[WLat30, MCD], (instregex "MVC(S|D)K$")>; +def : InstRW<[WLat30, MCD], (instregex "MVCOS$")>; +def : InstRW<[WLat30, MCD], (instregex "MVPG$")>; //===----------------------------------------------------------------------===// // System: Address-Space Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat30], (instregex "LASP$")>; -def : InstRW<[LSU, GroupAlone], (instregex "PALB$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "PC$")>; -def : InstRW<[FXU, Lat30], (instregex "PR$")>; -def : InstRW<[FXU, Lat30], (instregex "PT(I)?$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "RP$")>; -def : InstRW<[FXU, Lat30], (instregex "BS(G|A)$")>; -def : InstRW<[FXU, Lat20], (instregex "TAR$")>; +def : InstRW<[WLat30, MCD], (instregex "LASP$")>; +def : InstRW<[WLat1, LSU, GroupAlone], (instregex "PALB$")>; +def : InstRW<[WLat30, MCD], (instregex "PC$")>; +def : InstRW<[WLat30, MCD], (instregex "PR$")>; +def : InstRW<[WLat30, MCD], (instregex "PT(I)?$")>; +def : InstRW<[WLat30, MCD], (instregex "RP$")>; +def : InstRW<[WLat30, MCD], (instregex "BS(G|A)$")>; +def : InstRW<[WLat30, MCD], (instregex "TAR$")>; //===----------------------------------------------------------------------===// // System: Linkage-Stack Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat30, EndGroup], (instregex "BAKR$")>; -def : InstRW<[FXU, Lat30], (instregex "EREG(G)?$")>; -def : InstRW<[FXU, Lat30], (instregex "(E|M)STA$")>; +def : InstRW<[WLat30, MCD], (instregex "BAKR$")>; +def : InstRW<[WLat30, MCD], (instregex "EREG(G)?$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "(E|M)STA$")>; //===----------------------------------------------------------------------===// // System: Time-Related Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, Lat30], (instregex "PTFF$")>; -def : InstRW<[FXU, LSU, Lat20], (instregex "SCK$")>; -def : InstRW<[FXU, Lat30], (instregex "SCKPF$")>; -def : InstRW<[FXU, LSU, Lat20], (instregex "SCKC$")>; -def : InstRW<[FXU, LSU, Lat20], (instregex "SPT$")>; -def : InstRW<[FXU, LSU, LSU, Lat9, GroupAlone], (instregex "STCK(F)?$")>; -def : InstRW<[LSU, LSU, LSU, LSU, FXU, FXU, Lat20, GroupAlone], - (instregex "STCKE$")>; -def : InstRW<[FXU, LSU, Lat9], (instregex "STCKC$")>; -def : InstRW<[FXU, LSU, Lat8], (instregex "STPT$")>; +def : InstRW<[WLat30, MCD], (instregex "PTFF$")>; +def : InstRW<[WLat30, MCD], (instregex "SCK$")>; +def : InstRW<[WLat30, MCD], (instregex "SCKPF$")>; +def : InstRW<[WLat30, MCD], (instregex "SCKC$")>; +def : InstRW<[WLat30, MCD], (instregex "SPT$")>; +def : InstRW<[WLat9, FXU, LSU2, GroupAlone], (instregex "STCK(F)?$")>; +def : InstRW<[WLat20, LSU4, FXU2, GroupAlone], (instregex "STCKE$")>; +def : InstRW<[WLat30, MCD], (instregex "STCKC$")>; +def : InstRW<[WLat30, MCD], (instregex "STPT$")>; //===----------------------------------------------------------------------===// // System: CPU-Related Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, LSU, Lat30], (instregex "STAP$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "STIDP$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "STSI$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "STFL(E)?$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "ECAG$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "ECTG$")>; -def : InstRW<[FXU, Lat30], (instregex "PTF$")>; -def : InstRW<[FXU, Lat30], (instregex "PCKMO$")>; +def : InstRW<[WLat30, MCD], (instregex "STAP$")>; +def : InstRW<[WLat30, MCD], (instregex "STIDP$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "STSI$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "STFL(E)?$")>; +def : InstRW<[WLat30, MCD], (instregex "ECAG$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "ECTG$")>; +def : InstRW<[WLat30, MCD], (instregex "PTF$")>; +def : InstRW<[WLat30, MCD], (instregex "PCKMO$")>; //===----------------------------------------------------------------------===// // System: Miscellaneous Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, Lat30], (instregex "SVC$")>; -def : InstRW<[FXU, GroupAlone], (instregex "MC$")>; -def : InstRW<[FXU, Lat30], (instregex "DIAG$")>; -def : InstRW<[FXU], (instregex "TRAC(E|G)$")>; -def : InstRW<[FXU, Lat30], (instregex "TRAP(2|4)$")>; -def : InstRW<[FXU, Lat30], (instregex "SIGP$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "SIGA$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "SIE$")>; +def : InstRW<[WLat30, MCD], (instregex "SVC$")>; +def : InstRW<[WLat1, FXU, GroupAlone], (instregex "MC$")>; +def : InstRW<[WLat30, MCD], (instregex "DIAG$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "TRAC(E|G)$")>; +def : InstRW<[WLat30, MCD], (instregex "TRAP(2|4)$")>; +def : InstRW<[WLat30, MCD], (instregex "SIG(P|A)$")>; +def : InstRW<[WLat30, MCD], (instregex "SIE$")>; //===----------------------------------------------------------------------===// // System: CPU-Measurement Facility Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU], (instregex "LPP$")>; -def : InstRW<[FXU, Lat30], (instregex "ECPGA$")>; -def : InstRW<[FXU, Lat30], (instregex "E(C|P)CTR$")>; -def : InstRW<[FXU, Lat30], (instregex "LCCTL$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "L(P|S)CTL$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "Q(S|CTR)I$")>; -def : InstRW<[FXU, Lat30], (instregex "S(C|P)CTR$")>; +def : InstRW<[WLat1, FXU, NormalGr], (instregex "LPP$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "ECPGA$")>; +def : InstRW<[WLat30, WLat30, MCD], (instregex "E(C|P)CTR$")>; +def : InstRW<[WLat30, MCD], (instregex "LCCTL$")>; +def : InstRW<[WLat30, MCD], (instregex "L(P|S)CTL$")>; +def : InstRW<[WLat30, MCD], (instregex "Q(S|CTR)I$")>; +def : InstRW<[WLat30, MCD], (instregex "S(C|P)CTR$")>; //===----------------------------------------------------------------------===// // System: I/O Instructions //===----------------------------------------------------------------------===// -def : InstRW<[FXU, Lat30], (instregex "(C|H|R|X)SCH$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "(M|S|ST|T)SCH$")>; -def : InstRW<[FXU, Lat30], (instregex "RCHP$")>; -def : InstRW<[FXU, Lat30], (instregex "SCHM$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "STC(PS|RW)$")>; -def : InstRW<[FXU, LSU, Lat30], (instregex "TPI$")>; -def : InstRW<[FXU, Lat30], (instregex "SAL$")>; +def : InstRW<[WLat30, MCD], (instregex "(C|H|R|X)SCH$")>; +def : InstRW<[WLat30, MCD], (instregex "(M|S|ST|T)SCH$")>; +def : InstRW<[WLat30, MCD], (instregex "RCHP$")>; +def : InstRW<[WLat30, MCD], (instregex "SCHM$")>; +def : InstRW<[WLat30, MCD], (instregex "STC(PS|RW)$")>; +def : InstRW<[WLat30, MCD], (instregex "TPI$")>; +def : InstRW<[WLat30, MCD], (instregex "SAL$")>; } Index: test/CodeGen/SystemZ/int-conv-11.ll =================================================================== --- test/CodeGen/SystemZ/int-conv-11.ll +++ test/CodeGen/SystemZ/int-conv-11.ll @@ -6,7 +6,7 @@ ; to use LLC(H) if possible. define void @f1(i32 *%ptr) { ; CHECK-LABEL: f1: -; CHECK: llc{{h?}} {{%r[0-9]+}}, 16{{[37]}}(%r15) +; CHECK: llc{{h?}} {{%r[0-9]+}}, 1{{[67]}}{{[379]}}(%r15) ; CHECK: br %r14 %val0 = load volatile i32 , i32 *%ptr %val1 = load volatile i32 , i32 *%ptr @@ -179,7 +179,7 @@ ; Same again with i16, which should use LLH(H). define void @f2(i32 *%ptr) { ; CHECK-LABEL: f2: -; CHECK: llh{{h?}} {{%r[0-9]+}}, 16{{[26]}}(%r15) +; CHECK: llh{{h?}} {{%r[0-9]+}}, 1{{[67]}}{{[268]}}(%r15) ; CHECK: br %r14 %val0 = load volatile i32 , i32 *%ptr %val1 = load volatile i32 , i32 *%ptr Index: test/CodeGen/SystemZ/int-uadd-08.ll =================================================================== --- test/CodeGen/SystemZ/int-uadd-08.ll +++ test/CodeGen/SystemZ/int-uadd-08.ll @@ -100,8 +100,8 @@ ; CHECK-LABEL: f7: ; CHECK: alhsik [[REG1:%r[0-5]]], %r3, 1 ; CHECK-DAG: st [[REG1]], 0(%r4) -; CHECK: bler %r14 -; CHECK: jg foo@PLT +; CHECK: jgnle foo@PLT +; CHECK: br %r14 %t = call {i32, i1} @llvm.uadd.with.overflow.i32(i32 %a, i32 1) %val = extractvalue {i32, i1} %t, 0 %obit = extractvalue {i32, i1} %t, 1 @@ -121,8 +121,8 @@ ; CHECK-LABEL: f8: ; CHECK: alhsik [[REG1:%r[0-5]]], %r3, 1 ; CHECK-DAG: st [[REG1]], 0(%r4) -; CHECK: bnler %r14 -; CHECK: jg foo@PLT +; CHECK: jgle foo@PLT +; CHECK: br %r14 %t = call {i32, i1} @llvm.uadd.with.overflow.i32(i32 %a, i32 1) %val = extractvalue {i32, i1} %t, 0 %obit = extractvalue {i32, i1} %t, 1 Index: test/CodeGen/SystemZ/int-uadd-09.ll =================================================================== --- test/CodeGen/SystemZ/int-uadd-09.ll +++ test/CodeGen/SystemZ/int-uadd-09.ll @@ -98,8 +98,8 @@ ; CHECK-LABEL: f7: ; CHECK: alghsik [[REG1:%r[0-5]]], %r3, 1 ; CHECK-DAG: stg [[REG1]], 0(%r4) -; CHECK: bler %r14 -; CHECK: jg foo@PLT +; CHECK: jgnle foo@PLT +; CHECK: br %r14 %t = call {i64, i1} @llvm.uadd.with.overflow.i64(i64 %a, i64 1) %val = extractvalue {i64, i1} %t, 0 %obit = extractvalue {i64, i1} %t, 1 @@ -119,8 +119,8 @@ ; CHECK-LABEL: f8: ; CHECK: alghsik [[REG1:%r[0-5]]], %r3, 1 ; CHECK-DAG: stg [[REG1]], 0(%r4) -; CHECK: bnler %r14 -; CHECK: jg foo@PLT +; CHECK: jgle foo@PLT +; CHECK: br %r14 %t = call {i64, i1} @llvm.uadd.with.overflow.i64(i64 %a, i64 1) %val = extractvalue {i64, i1} %t, 0 %obit = extractvalue {i64, i1} %t, 1 Index: test/CodeGen/SystemZ/int-usub-08.ll =================================================================== --- test/CodeGen/SystemZ/int-usub-08.ll +++ test/CodeGen/SystemZ/int-usub-08.ll @@ -106,8 +106,8 @@ ; CHECK-LABEL: f7: ; CHECK: alhsik [[REG1:%r[0-5]]], %r3, -1 ; CHECK-DAG: st [[REG1]], 0(%r4) -; CHECK: bnler %r14 -; CHECK: jg foo@PLT +; CHECK: jgle foo@PLT +; CHECK: br %r14 %t = call {i32, i1} @llvm.usub.with.overflow.i32(i32 %a, i32 1) %val = extractvalue {i32, i1} %t, 0 %obit = extractvalue {i32, i1} %t, 1 @@ -127,8 +127,8 @@ ; CHECK-LABEL: f8: ; CHECK: alhsik [[REG1:%r[0-5]]], %r3, -1 ; CHECK-DAG: st [[REG1]], 0(%r4) -; CHECK: bler %r14 -; CHECK: jg foo@PLT +; CHECK: jgnle foo@PLT +; CHECK: br %r14 %t = call {i32, i1} @llvm.usub.with.overflow.i32(i32 %a, i32 1) %val = extractvalue {i32, i1} %t, 0 %obit = extractvalue {i32, i1} %t, 1 Index: test/CodeGen/SystemZ/int-usub-09.ll =================================================================== --- test/CodeGen/SystemZ/int-usub-09.ll +++ test/CodeGen/SystemZ/int-usub-09.ll @@ -103,8 +103,8 @@ ; CHECK-LABEL: f7: ; CHECK: alghsik [[REG1:%r[0-5]]], %r3, -1 ; CHECK-DAG: stg [[REG1]], 0(%r4) -; CHECK: bnler %r14 -; CHECK: jg foo@PLT +; CHECK: jgle foo@PLT +; CHECK: br %r14 %t = call {i64, i1} @llvm.usub.with.overflow.i64(i64 %a, i64 1) %val = extractvalue {i64, i1} %t, 0 %obit = extractvalue {i64, i1} %t, 1 @@ -124,8 +124,8 @@ ; CHECK-LABEL: f8: ; CHECK: alghsik [[REG1:%r[0-5]]], %r3, -1 ; CHECK-DAG: stg [[REG1]], 0(%r4) -; CHECK: bler %r14 -; CHECK: jg foo@PLT +; CHECK: jgnle foo@PLT +; CHECK: br %r14 %t = call {i64, i1} @llvm.usub.with.overflow.i64(i64 %a, i64 1) %val = extractvalue {i64, i1} %t, 0 %obit = extractvalue {i64, i1} %t, 1 Index: test/CodeGen/SystemZ/pr36164.ll =================================================================== --- test/CodeGen/SystemZ/pr36164.ll +++ test/CodeGen/SystemZ/pr36164.ll @@ -46,9 +46,9 @@ ; CHECK-NEXT: lrl %r13, g_832 ; CHECK-NEXT: strl %r0, g_69 ; CHECK-NEXT: lrl %r13, g_832 -; CHECK-NEXT: lghi %r13, 24 -; CHECK-NEXT: strl %r2, g_69 -; CHECK-NEXT: ag %r13, 0(%r1) +; CHECK-DAG: lghi %r13, 24 +; CHECK-DAG: strl %r2, g_69 +; CHECK-DAG: ag %r13, 0(%r1) ; CHECK-NEXT: lrl %r12, g_832 ; CHECK-NEXT: strl %r3, g_69 ; CHECK-NEXT: lrl %r12, g_832 Index: test/CodeGen/SystemZ/store_nonbytesized_vecs.ll =================================================================== --- test/CodeGen/SystemZ/store_nonbytesized_vecs.ll +++ test/CodeGen/SystemZ/store_nonbytesized_vecs.ll @@ -1,4 +1,3 @@ -; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc -mtriple=s390x-linux-gnu -mcpu=z13 < %s | FileCheck %s ; Store a <4 x i31> vector. @@ -81,34 +80,33 @@ ; CHECK-NEXT: vlgvf %r1, %v26, 2 ; CHECK-NEXT: risbgn %r4, %r3, 0, 129, 62 ; CHECK-NEXT: rosbg %r4, %r1, 2, 32, 31 -; CHECK-NEXT: vlgvf %r0, %v26, 3 -; CHECK-NEXT: rosbg %r4, %r0, 33, 63, 0 -; CHECK-NEXT: stc %r0, 30(%r2) -; CHECK-NEXT: # kill: def $r0l killed $r0l killed $r0d def $r0d -; CHECK-NEXT: srl %r0, 8 -; CHECK-NEXT: vlgvf %r1, %v24, 1 -; CHECK-NEXT: vlgvf %r14, %v24, 0 -; CHECK-NEXT: sth %r0, 28(%r2) -; CHECK-NEXT: vlgvf %r0, %v24, 2 -; CHECK-NEXT: risbgn %r5, %r1, 0, 133, 58 -; CHECK-NEXT: rosbg %r5, %r0, 6, 36, 27 -; CHECK-NEXT: sllg %r14, %r14, 25 -; CHECK-NEXT: rosbg %r14, %r1, 39, 63, 58 -; CHECK-NEXT: vlgvf %r0, %v24, 3 -; CHECK-NEXT: rosbg %r5, %r0, 37, 63, 60 -; CHECK-NEXT: sllg %r1, %r14, 8 -; CHECK-NEXT: rosbg %r1, %r5, 56, 63, 8 -; CHECK-NEXT: stg %r1, 0(%r2) -; CHECK-NEXT: srlg %r1, %r4, 24 -; CHECK-NEXT: st %r1, 24(%r2) -; CHECK-NEXT: vlgvf %r1, %v26, 0 -; CHECK-NEXT: risbgn %r0, %r0, 0, 131, 60 -; CHECK-NEXT: rosbg %r0, %r1, 4, 34, 29 -; CHECK-NEXT: sllg %r1, %r5, 8 -; CHECK-NEXT: rosbg %r0, %r3, 35, 63, 62 -; CHECK-NEXT: rosbg %r1, %r0, 56, 63, 8 -; CHECK-NEXT: stg %r1, 8(%r2) -; CHECK-NEXT: sllg %r0, %r0, 8 +; CHECK-DAG: vlgvf %r0, %v26, 3 +; CHECK-DAG: rosbg %r4, %r0, 33, 63, 0 +; CHECK-DAG: stc %r0, 30(%r2) +; CHECK-DAG: srl %r0, 8 +; CHECK-DAG: vlgvf [[REG0:%r[0-9]+]], %v24, 1 +; CHECK-DAG: vlgvf [[REG1:%r[0-9]+]], %v24, 0 +; CHECK-DAG: sth %r0, 28(%r2) +; CHECK-DAG: vlgvf [[REG2:%r[0-9]+]], %v24, 2 +; CHECK-DAG: risbgn [[REG3:%r[0-9]+]], [[REG0]], 0, 133, 58 +; CHECK-DAG: rosbg [[REG3]], [[REG2]], 6, 36, 27 +; CHECK-DAG: sllg [[REG4:%r[0-9]+]], [[REG1]], 25 +; CHECK-DAG: rosbg [[REG4]], [[REG0]], 39, 63, 58 +; CHECK-DAG: vlgvf [[REG5:%r[0-9]+]], %v24, 3 +; CHECK-DAG: rosbg [[REG3]], [[REG5]], 37, 63, 60 +; CHECK-DAG: sllg [[REG6:%r[0-9]+]], [[REG4]], 8 +; CHECK-DAG: rosbg [[REG6]], [[REG3]], 56, 63, 8 +; CHECK-NEXT: stg [[REG6]], 0(%r2) +; CHECK-NEXT: srlg [[REG7:%r[0-9]+]], %r4, 24 +; CHECK-NEXT: st [[REG7]], 24(%r2) +; CHECK-NEXT: vlgvf [[REG8:%r[0-9]+]], %v26, 0 +; CHECK-NEXT: risbgn [[REG10:%r[0-9]+]], [[REG5]], 0, 131, 60 +; CHECK-NEXT: rosbg [[REG10]], [[REG8]], 4, 34, 29 +; CHECK-NEXT: sllg [[REG9:%r[0-9]+]], [[REG3]], 8 +; CHECK-NEXT: rosbg [[REG10]], %r3, 35, 63, 62 +; CHECK-NEXT: rosbg [[REG9]], [[REG10]], 56, 63, 8 +; CHECK-NEXT: stg [[REG9]], 8(%r2) +; CHECK-NEXT: sllg %r0, [[REG10]], 8 ; CHECK-NEXT: rosbg %r0, %r4, 56, 63, 8 ; CHECK-NEXT: stg %r0, 16(%r2) ; CHECK-NEXT: lmg %r14, %r15, 112(%r15) Index: test/CodeGen/SystemZ/vec-cmp-cmp-logic-select.ll =================================================================== --- test/CodeGen/SystemZ/vec-cmp-cmp-logic-select.ll +++ test/CodeGen/SystemZ/vec-cmp-cmp-logic-select.ll @@ -457,9 +457,9 @@ ; CHECK-NEXT: vceqf [[REG0:%v[0-9]+]], %v25, %v27 ; CHECK-NEXT: vuphf [[REG1:%v[0-9]+]], [[REG0]] ; CHECK-NEXT: vmrlg [[REG2:%v[0-9]+]], [[REG0]], [[REG0]] -; CHECK-NEXT: vceqg [[REG3:%v[0-9]+]], %v24, %v28 -; CHECK-NEXT: vceqg [[REG4:%v[0-9]+]], %v26, %v30 -; CHECK-NEXT: vuphf [[REG5:%v[0-9]+]], [[REG2]] +; CHECK-DAG: vceqg [[REG3:%v[0-9]+]], %v24, %v28 +; CHECK-DAG: vceqg [[REG4:%v[0-9]+]], %v26, %v30 +; CHECK-DAG: vuphf [[REG5:%v[0-9]+]], [[REG2]] ; CHECK-DAG: vl [[REG6:%v[0-9]+]], 176(%r15) ; CHECK-DAG: vl [[REG7:%v[0-9]+]], 160(%r15) ; CHECK-DAG: vx [[REG8:%v[0-9]+]], [[REG4]], [[REG5]] @@ -711,14 +711,14 @@ ; CHECK-Z14-NEXT: vfchdb %v6, %v25, %v6 ; CHECK-Z14-NEXT: vfchdb %v5, %v31, %v5 ; CHECK-Z14-NEXT: vfchdb %v4, %v29, %v4 -; CHECK-Z14-NEXT: vfchsb %v16, %v24, %v28 -; CHECK-Z14-NEXT: vfchsb %v17, %v26, %v30 -; CHECK-Z14-NEXT: vpkg %v6, %v6, %v7 -; CHECK-Z14-NEXT: vpkg %v4, %v4, %v5 -; CHECK-Z14-NEXT: vl %v0, 272(%r15) -; CHECK-Z14-NEXT: vl %v1, 240(%r15) -; CHECK-Z14-NEXT: vl %v2, 256(%r15) -; CHECK-Z14-NEXT: vl %v3, 224(%r15) +; CHECK-Z14-DAG: vfchsb %v16, %v24, %v28 +; CHECK-Z14-DAG: vfchsb %v17, %v26, %v30 +; CHECK-Z14-DAG: vpkg %v6, %v6, %v7 +; CHECK-Z14-DAG: vpkg %v4, %v4, %v5 +; CHECK-Z14-DAG: vl %v0, 272(%r15) +; CHECK-Z14-DAG: vl %v1, 240(%r15) +; CHECK-Z14-DAG: vl %v2, 256(%r15) +; CHECK-Z14-DAG: vl %v3, 224(%r15) ; CHECK-Z14-NEXT: vn %v4, %v17, %v4 ; CHECK-Z14-NEXT: vn %v5, %v16, %v6 ; CHECK-Z14-NEXT: vsel %v24, %v3, %v2, %v5 @@ -831,11 +831,11 @@ ; CHECK-Z14-NEXT: vfchsb %v4, %v25, %v27 ; CHECK-Z14-NEXT: vuphf %v5, %v4 ; CHECK-Z14-NEXT: vmrlg %v4, %v4, %v4 -; CHECK-Z14-NEXT: vfchdb %v2, %v24, %v28 -; CHECK-Z14-NEXT: vfchdb %v3, %v26, %v30 -; CHECK-Z14-NEXT: vuphf %v4, %v4 -; CHECK-Z14-NEXT: vl %v0, 176(%r15) -; CHECK-Z14-NEXT: vl %v1, 160(%r15) +; CHECK-Z14-DAG: vfchdb %v2, %v24, %v28 +; CHECK-Z14-DAG: vfchdb %v3, %v26, %v30 +; CHECK-Z14-DAG: vuphf %v4, %v4 +; CHECK-Z14-DAG: vl %v0, 176(%r15) +; CHECK-Z14-DAG: vl %v1, 160(%r15) ; CHECK-Z14-NEXT: vn %v3, %v3, %v4 ; CHECK-Z14-NEXT: vn %v2, %v2, %v5 ; CHECK-Z14-NEXT: vsel %v24, %v29, %v1, %v2 Index: test/CodeGen/SystemZ/vec-move-17.ll =================================================================== --- test/CodeGen/SystemZ/vec-move-17.ll +++ test/CodeGen/SystemZ/vec-move-17.ll @@ -65,8 +65,8 @@ ; CHECK-LABEL: f7: ; CHECK: # %bb.0: ; CHECK-NEXT: vlgvg %r0, %v24, 0 -; CHECK-NEXT: sll %r0, 1 -; CHECK-NEXT: vlgvg %r1, %v24, 1 +; CHECK-DAG: sll %r0, 1 +; CHECK-DAG: vlgvg %r1, %v24, 1 ; CHECK-NEXT: rosbg %r0, %r1, 63, 63, 0 ; CHECK-NEXT: nilf %r0, 3 ; CHECK-NEXT: stc %r0, 0(%r2) Index: test/CodeGen/SystemZ/vec-trunc-to-i1.ll =================================================================== --- test/CodeGen/SystemZ/vec-trunc-to-i1.ll +++ test/CodeGen/SystemZ/vec-trunc-to-i1.ll @@ -5,12 +5,12 @@ define void @pr32275(<4 x i8> %B15) { ; CHECK-LABEL: pr32275: ; CHECK: # %bb.0: # %BB -; CHECK-NEXT: vrepif [[REG0:%v[0-9]]], 1 ; CHECK: vlgvb %r0, %v24, 3 ; CHECK-NEXT: vlgvb %r1, %v24, 1 ; CHECK-NEXT: vlvgp [[REG1:%v[0-9]]], %r1, %r0 ; CHECK-NEXT: vlgvb %r0, %v24, 0 ; CHECK-NEXT: vlgvb [[REG3:%r[0-9]]], %v24, 2 +; CHECK-NEXT: vrepif [[REG0:%v[0-9]]], 1 ; CHECK: .LBB0_1: ; CHECK-DAG: vlr [[REG2:%v[0-9]]], [[REG1]] ; CHECK-DAG: vlvgf [[REG2]], %r0, 0