2017-07-18 01:41:11 +08:00
|
|
|
//-- SystemZScheduleZ14.td - SystemZ Scheduling Definitions ----*- tblgen -*-=//
|
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2017-07-18 01:41:11 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file defines the machine model for Z14 to support instruction
|
|
|
|
// scheduling and other instruction cost heuristics.
|
|
|
|
//
|
2018-05-17 19:53:56 +08:00
|
|
|
// Pseudos expanded right after isel do not need to be modelled here.
|
|
|
|
//
|
2017-07-18 01:41:11 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
def Z14Model : SchedMachineModel {
|
|
|
|
|
|
|
|
let UnsupportedFeatures = Arch12UnsupportedFeatures.List;
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
let IssueWidth = 6; // Number of instructions decoded per cycle.
|
2017-07-18 01:41:11 +08:00
|
|
|
let MicroOpBufferSize = 60; // Issue queues
|
|
|
|
let LoadLatency = 1; // Optimistic load latency.
|
|
|
|
|
|
|
|
let PostRAScheduler = 1;
|
|
|
|
|
|
|
|
// Extra cycles for a mispredicted branch.
|
|
|
|
let MispredictPenalty = 20;
|
|
|
|
}
|
|
|
|
|
|
|
|
let SchedModel = Z14Model in {
|
2018-05-17 19:53:56 +08:00
|
|
|
// 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.
|
2018-07-20 17:40:43 +08:00
|
|
|
|
|
|
|
// Decoder grouping rules
|
|
|
|
let NumMicroOps = 1 in {
|
|
|
|
def : WriteRes<NormalGr, []>;
|
|
|
|
def : WriteRes<BeginGroup, []> { let BeginGroup = 1; }
|
|
|
|
def : WriteRes<EndGroup, []> { let EndGroup = 1; }
|
2017-07-18 01:41:11 +08:00
|
|
|
}
|
2018-07-20 17:40:43 +08:00
|
|
|
def : WriteRes<Cracked, []> {
|
|
|
|
let NumMicroOps = 2;
|
2017-07-18 01:41:11 +08:00
|
|
|
let BeginGroup = 1;
|
|
|
|
}
|
2018-07-20 17:40:43 +08:00
|
|
|
def : WriteRes<GroupAlone, []> {
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let BeginGroup = 1;
|
2017-07-18 01:41:11 +08:00
|
|
|
let EndGroup = 1;
|
|
|
|
}
|
2018-08-03 18:43:05 +08:00
|
|
|
def : WriteRes<GroupAlone2, []> {
|
|
|
|
let NumMicroOps = 6;
|
|
|
|
let BeginGroup = 1;
|
|
|
|
let EndGroup = 1;
|
|
|
|
}
|
|
|
|
def : WriteRes<GroupAlone3, []> {
|
|
|
|
let NumMicroOps = 9;
|
|
|
|
let BeginGroup = 1;
|
|
|
|
let EndGroup = 1;
|
|
|
|
}
|
2018-07-20 17:40:43 +08:00
|
|
|
|
|
|
|
// Incoming latency removed from the register operand which is used together
|
|
|
|
// with a memory operand by the instruction.
|
|
|
|
def : ReadAdvance<RegReadAdv, 4>;
|
|
|
|
|
|
|
|
// 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<LSULatency, []> { let Latency = 4; let NumMicroOps = 0; }
|
|
|
|
|
|
|
|
let NumMicroOps = 0 in {
|
2018-07-25 19:42:55 +08:00
|
|
|
foreach L = 1-30 in
|
|
|
|
def : WriteRes<!cast<SchedWrite>("WLat"#L), []> { let Latency = L; }
|
2018-07-20 17:40:43 +08:00
|
|
|
}
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Execution units.
|
|
|
|
def Z14_FXaUnit : ProcResource<2>;
|
|
|
|
def Z14_FXbUnit : ProcResource<2>;
|
|
|
|
def Z14_LSUnit : ProcResource<2>;
|
|
|
|
def Z14_VecUnit : ProcResource<2>;
|
|
|
|
def Z14_VecFPdUnit : ProcResource<2> { let BufferSize = 1; /* blocking */ }
|
|
|
|
def Z14_VBUnit : ProcResource<2>;
|
2018-07-20 17:40:43 +08:00
|
|
|
def Z14_MCD : ProcResource<1>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Subtarget specific definitions of scheduling resources.
|
2018-07-20 17:40:43 +08:00
|
|
|
let NumMicroOps = 0 in {
|
2018-07-25 19:42:55 +08:00
|
|
|
def : WriteRes<FXa, [Z14_FXaUnit]>;
|
|
|
|
def : WriteRes<FXb, [Z14_FXbUnit]>;
|
|
|
|
def : WriteRes<LSU, [Z14_LSUnit]>;
|
|
|
|
def : WriteRes<VecBF, [Z14_VecUnit]>;
|
|
|
|
def : WriteRes<VecDF, [Z14_VecUnit]>;
|
|
|
|
def : WriteRes<VecDFX, [Z14_VecUnit]>;
|
2018-07-20 17:40:43 +08:00
|
|
|
def : WriteRes<VecMul, [Z14_VecUnit]>;
|
|
|
|
def : WriteRes<VecStr, [Z14_VecUnit]>;
|
|
|
|
def : WriteRes<VecXsPm, [Z14_VecUnit]>;
|
2018-07-25 19:42:55 +08:00
|
|
|
foreach Num = 2-5 in { let ResourceCycles = [Num] in {
|
|
|
|
def : WriteRes<!cast<SchedWrite>("FXa"#Num), [Z14_FXaUnit]>;
|
|
|
|
def : WriteRes<!cast<SchedWrite>("FXb"#Num), [Z14_FXbUnit]>;
|
|
|
|
def : WriteRes<!cast<SchedWrite>("LSU"#Num), [Z14_LSUnit]>;
|
|
|
|
def : WriteRes<!cast<SchedWrite>("VecBF"#Num), [Z14_VecUnit]>;
|
|
|
|
def : WriteRes<!cast<SchedWrite>("VecDF"#Num), [Z14_VecUnit]>;
|
|
|
|
def : WriteRes<!cast<SchedWrite>("VecDFX"#Num), [Z14_VecUnit]>;
|
|
|
|
def : WriteRes<!cast<SchedWrite>("VecMul"#Num), [Z14_VecUnit]>;
|
|
|
|
def : WriteRes<!cast<SchedWrite>("VecStr"#Num), [Z14_VecUnit]>;
|
|
|
|
def : WriteRes<!cast<SchedWrite>("VecXsPm"#Num), [Z14_VecUnit]>;
|
|
|
|
}}
|
|
|
|
|
|
|
|
def : WriteRes<VecFPd, [Z14_VecFPdUnit]> { let ResourceCycles = [30]; }
|
|
|
|
|
|
|
|
def : WriteRes<VBU, [Z14_VBUnit]>; // Virtual Branching Unit
|
2018-07-20 17:40:43 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
def : WriteRes<MCD, [Z14_MCD]> { let NumMicroOps = 3;
|
|
|
|
let BeginGroup = 1;
|
|
|
|
let EndGroup = 1; }
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// -------------------------- INSTRUCTIONS ---------------------------------- //
|
|
|
|
|
|
|
|
// InstRW constructs have been used in order to preserve the
|
|
|
|
// readability of the InstrInfo files.
|
|
|
|
|
|
|
|
// For each instruction, as matched by a regexp, provide a list of
|
|
|
|
// resources that it needs. These will be combined into a SchedClass.
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Stack allocation
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
// Pseudo -> LA / LAY
|
|
|
|
def : InstRW<[WLat1, FXa, NormalGr], (instregex "ADJDYNALLOC$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Branch instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Branch
|
2018-07-20 17:40:43 +08:00
|
|
|
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)?$")>;
|
2018-08-03 18:43:05 +08:00
|
|
|
def : InstRW<[WLat1, FXa2, FXb2, GroupAlone2],
|
2017-07-18 01:41:11 +08:00
|
|
|
(instregex "B(R)?X(H|L).*$")>;
|
|
|
|
|
|
|
|
// Compare and branch
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXb, NormalGr], (instregex "C(L)?(G)?(I|R)J(Asm.*)?$")>;
|
|
|
|
def : InstRW<[WLat1, FXb2, GroupAlone],
|
2017-07-18 01:41:11 +08:00
|
|
|
(instregex "C(L)?(G)?(I|R)B(Call|Return|Asm.*)?$")>;
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Trap instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Trap
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, VBU, NormalGr], (instregex "(Cond)?Trap$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Compare and trap
|
2018-07-20 17:40:43 +08:00
|
|
|
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.*)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Call and return instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Call
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Return
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXb, EndGroup], (instregex "Return$")>;
|
|
|
|
def : InstRW<[WLat1, FXb, NormalGr], (instregex "CondReturn$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Move instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Moves
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "MV(G|H)?HI$")>;
|
|
|
|
def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "MVI(Y)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Move character
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXb, LSU3, GroupAlone], (instregex "MVC$")>;
|
|
|
|
def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "MVCL(E|U)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Pseudo -> reg move
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Loads
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXa, NormalGr], (instregex "LLIH(F|H|L)$")>;
|
|
|
|
def : InstRW<[WLat1, FXa, NormalGr], (instregex "LLIL(F|H|L)$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Load and zero rightmost byte
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LZR(F|G)$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Load and trap
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "L(FH|G)?AT$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Load and test
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1LSU, WLat1LSU, LSU, FXa, NormalGr], (instregex "LT(G)?$")>;
|
|
|
|
def : InstRW<[WLat1, FXa, NormalGr], (instregex "LT(G)?R$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Stores
|
2018-07-20 17:40:43 +08:00
|
|
|
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)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// String moves.
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "MVST$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Conditional move instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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.*)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Sign extensions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXa, NormalGr], (instregex "L(B|H|G)R$")>;
|
|
|
|
def : InstRW<[WLat1, FXa, NormalGr], (instregex "LG(B|H|F)R$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1LSU, WLat1LSU, FXa, LSU, NormalGr], (instregex "LTGF$")>;
|
|
|
|
def : InstRW<[WLat1, FXa, NormalGr], (instregex "LTGFR$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Zero extensions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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)$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Load and zero rightmost byte
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLZRGF$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Load and trap
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1LSU, FXb, LSU, NormalGr], (instregex "LLG(F|T)?AT$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Truncations
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Multi-register moves
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Load multiple (estimated average of 5 ops)
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat10, WLat10, LSU5, GroupAlone], (instregex "LM(H|Y|G)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Load multiple disjoint
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat30, WLat30, MCD], (instregex "LMD$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
// Store multiple
|
|
|
|
def : InstRW<[WLat1, LSU2, FXb3, GroupAlone], (instregex "STM(G|H|Y)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Byte swaps
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Load address instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXa, NormalGr], (instregex "LA(Y|RL)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Load the Global Offset Table address ( -> larl )
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXa, NormalGr], (instregex "GOT$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Absolute and Negation
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Insertion
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Addition
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Logical addition with carry
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXa, LSU, GroupAlone],
|
|
|
|
(instregex "ALC(G)?$")>;
|
|
|
|
def : InstRW<[WLat2, WLat2, FXa, GroupAlone], (instregex "ALC(G)?R$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Add with sign extension (16/32 -> 64)
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXa, LSU, NormalGr],
|
|
|
|
(instregex "AG(F|H)$")>;
|
|
|
|
def : InstRW<[WLat2, WLat2, FXa, NormalGr], (instregex "AGFR$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Subtraction
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Subtraction with borrow
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXa, LSU, GroupAlone],
|
|
|
|
(instregex "SLB(G)?$")>;
|
|
|
|
def : InstRW<[WLat2, WLat2, FXa, GroupAlone], (instregex "SLB(G)?R$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Subtraction with sign extension (16/32 -> 64)
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXa, LSU, NormalGr],
|
|
|
|
(instregex "SG(F|H)$")>;
|
|
|
|
def : InstRW<[WLat2, WLat2, FXa, NormalGr], (instregex "SGFR$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// AND
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// OR
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// XOR
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Multiplication
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Division and remainder
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat20, FXa4, GroupAlone], (instregex "DR$")>;
|
2018-08-03 18:43:05 +08:00
|
|
|
def : InstRW<[WLat30, RegReadAdv, FXa4, LSU, GroupAlone2], (instregex "D$")>;
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat30, FXa2, GroupAlone], (instregex "DSG(F)?R$")>;
|
2018-08-03 18:43:05 +08:00
|
|
|
def : InstRW<[WLat30, RegReadAdv, FXa2, LSU, GroupAlone2],
|
2018-07-20 17:40:43 +08:00
|
|
|
(instregex "DSG(F)?$")>;
|
|
|
|
def : InstRW<[WLat20, FXa4, GroupAlone], (instregex "DLR$")>;
|
|
|
|
def : InstRW<[WLat30, FXa4, GroupAlone], (instregex "DLGR$")>;
|
2018-08-03 18:43:05 +08:00
|
|
|
def : InstRW<[WLat30, RegReadAdv, FXa4, LSU, GroupAlone2],
|
|
|
|
(instregex "DL(G)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Shifts
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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)?$")>;
|
2018-08-03 18:43:05 +08:00
|
|
|
def : InstRW<[WLat5LSU, WLat5LSU, FXa4, LSU, GroupAlone2],
|
2017-07-18 01:41:11 +08:00
|
|
|
(instregex "S(L|R)D(A|L)$")>;
|
|
|
|
|
|
|
|
// Rotate
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat2LSU, FXa, LSU, NormalGr], (instregex "RLL(G)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Rotate and insert
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Rotate and Select
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat2, WLat2, FXa2, Cracked], (instregex "R(N|O|X)SBG$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Comparison
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Compare halfword
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Compare with sign extension (32 -> 64)
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat2LSU, RegReadAdv, FXb, LSU, NormalGr], (instregex "CGF$")>;
|
|
|
|
def : InstRW<[WLat2LSU, FXb, LSU, NormalGr], (instregex "CGFRL$")>;
|
|
|
|
def : InstRW<[WLat2, FXb, NormalGr], (instregex "CGFR$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Compare logical character
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Test under mask
|
2018-07-20 17:40:43 +08:00
|
|
|
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)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Compare logical characters under mask
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat2LSU, RegReadAdv, FXb, LSU, NormalGr],
|
|
|
|
(instregex "CLM(H|Y)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Prefetch and execution hint
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, LSU, NormalGr], (instregex "PFD(RL)?$")>;
|
|
|
|
def : InstRW<[WLat1, FXb, NormalGr], (instregex "BPP$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
def : InstRW<[FXb, EndGroup], (instregex "BPRP$")>;
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXb, NormalGr], (instregex "NIAI$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Atomic operations
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXb, EndGroup], (instregex "Serialize$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Test and set
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat2LSU, FXb, LSU, EndGroup], (instregex "TS$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Compare and swap
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat3LSU, WLat3LSU, FXa, FXb, LSU, GroupAlone],
|
|
|
|
(instregex "CS(G|Y)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Compare double and swap
|
2018-08-03 18:43:05 +08:00
|
|
|
def : InstRW<[WLat6LSU, WLat6LSU, FXa3, FXb2, LSU, GroupAlone2],
|
2017-07-18 01:41:11 +08:00
|
|
|
(instregex "CDS(Y)?$")>;
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat15, WLat15, FXa2, FXb4, LSU3,
|
2018-12-12 16:26:24 +08:00
|
|
|
GroupAlone3], (instregex "CDSG$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Compare and swap and store
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat30, MCD], (instregex "CSST$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Perform locked operation
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat30, MCD], (instregex "PLO$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Load/store pair from/to quadword
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat4LSU, LSU2, GroupAlone], (instregex "LPQ$")>;
|
|
|
|
def : InstRW<[WLat1, FXb2, LSU, GroupAlone], (instregex "STPQ$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Load pair disjoint
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1LSU, WLat1LSU, LSU2, GroupAlone], (instregex "LPD(G)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Translate and convert
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, LSU5, GroupAlone], (instregex "TR$")>;
|
2018-08-03 18:43:05 +08:00
|
|
|
def : InstRW<[WLat30, WLat30, WLat30, FXa3, LSU2, GroupAlone2],
|
2018-07-20 17:40:43 +08:00
|
|
|
(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)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Message-security assist
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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)$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Guarded storage
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LGG$")>;
|
|
|
|
def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLGFSG$")>;
|
|
|
|
def : InstRW<[WLat30, MCD], (instregex "(L|ST)GSC$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Decimal arithmetic
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-08-03 18:43:05 +08:00
|
|
|
def : InstRW<[WLat30, RegReadAdv, FXb, VecDF2, LSU2, GroupAlone2],
|
2017-07-18 01:41:11 +08:00
|
|
|
(instregex "CVBG$")>;
|
2018-08-03 18:43:05 +08:00
|
|
|
def : InstRW<[WLat30, RegReadAdv, FXb, VecDF, LSU, GroupAlone2],
|
2018-07-20 17:40:43 +08:00
|
|
|
(instregex "CVB(Y)?$")>;
|
2018-08-03 18:43:05 +08:00
|
|
|
def : InstRW<[WLat1, FXb3, VecDF4, LSU, GroupAlone3], (instregex "CVDG$")>;
|
|
|
|
def : InstRW<[WLat1, FXb2, VecDF, LSU, GroupAlone2], (instregex "CVD(Y)?$")>;
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
|
|
|
|
2018-12-12 16:26:24 +08:00
|
|
|
def : InstRW<[WLat5LSU, FXb, VecDFX, LSU3, GroupAlone2],
|
2017-07-18 01:41:11 +08:00
|
|
|
(instregex "(A|S|ZA)P$")>;
|
2018-12-12 16:26:24 +08:00
|
|
|
def : InstRW<[WLat1, FXb, VecDFX4, LSU3, GroupAlone2], (instregex "(M|D)P$")>;
|
|
|
|
def : InstRW<[WLat15, FXb, VecDFX2, LSU2, GroupAlone3], (instregex "SRP$")>;
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat8, VecDFX, LSU, LSU, GroupAlone], (instregex "CP$")>;
|
|
|
|
def : InstRW<[WLat3LSU, VecDFX, LSU, Cracked], (instregex "TP$")>;
|
|
|
|
def : InstRW<[WLat30, MCD], (instregex "ED(MK)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Access registers
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Extract/set/copy access register
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat3, LSU, NormalGr], (instregex "(EAR|SAR|CPYA)$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Load address extended
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat5, LSU, FXa, Cracked], (instregex "LAE(Y)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Load/store access multiple (not modeled precisely)
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat20, WLat20, LSU5, GroupAlone], (instregex "LAM(Y)?$")>;
|
2018-12-12 16:26:24 +08:00
|
|
|
def : InstRW<[WLat1, LSU5, FXb, GroupAlone2], (instregex "STAM(Y)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Program mask and addressing mode
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Insert Program Mask
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat3, FXa, EndGroup], (instregex "IPM$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Set Program Mask
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat3, LSU, EndGroup], (instregex "SPM$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Branch and link
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXa2, FXb, GroupAlone], (instregex "BAL(R)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Test addressing mode
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXb, NormalGr], (instregex "TAM$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Set addressing mode
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXb, EndGroup], (instregex "SAM(24|31|64)$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Branch (and save) and set mode.
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXa, FXb, GroupAlone], (instregex "BSM$")>;
|
|
|
|
def : InstRW<[WLat1, FXa2, FXb, GroupAlone], (instregex "BASSM$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Transactional execution
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Transaction begin
|
2018-08-03 18:43:05 +08:00
|
|
|
def : InstRW<[WLat9, LSU2, FXb5, GroupAlone2], (instregex "TBEGIN(C)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Transaction end
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXb, GroupAlone], (instregex "TEND$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Transaction abort
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat30, MCD], (instregex "TABORT$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Extract Transaction Nesting Depth
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXa, NormalGr], (instregex "ETND$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Nontransactional store
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "NTSTG$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Processor assist
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXb, GroupAlone], (instregex "PPA$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Miscellaneous Instructions.
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Find leftmost one
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat5, WLat5, FXa2, GroupAlone], (instregex "FLOGR$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Population count
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat3, WLat3, FXa, NormalGr], (instregex "POPCNT$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// String instructions
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "SRST(U)?$")>;
|
|
|
|
def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CUSE$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Various complex instructions
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Execute
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXb, GroupAlone], (instregex "EX(RL)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// .insn directive instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// An "empty" sched-class will be assigned instead of the "invalid sched-class".
|
|
|
|
// getNumDecoderSlots() will then return 1 instead of 0.
|
|
|
|
def : InstRW<[], (instregex "Insn.*")>;
|
|
|
|
|
|
|
|
|
|
|
|
// ----------------------------- Floating point ----------------------------- //
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// FP: Move instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Load zero
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXb, NormalGr], (instregex "LZ(DR|ER)$")>;
|
|
|
|
def : InstRW<[WLat2, FXb2, Cracked], (instregex "LZXR$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Load
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Load and Test
|
2018-07-20 17:40:43 +08:00
|
|
|
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)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Copy sign
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat2, VecXsPm, NormalGr], (instregex "CPSDR(d|s)(d|s)$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// FP: Load instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// FP: Store instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "ST(E|D)(Y)?$")>;
|
|
|
|
def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "STX$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// FP: Conversion instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Load rounded
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat7, VecBF, NormalGr], (instregex "LEDBR(A)?$")>;
|
|
|
|
def : InstRW<[WLat9, VecDF2, NormalGr], (instregex "L(E|D)XBR(A)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Load lengthened
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Convert from fixed / logical
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat8, FXb, VecBF, Cracked], (instregex "C(E|D)(F|G)BR(A)?$")>;
|
2018-08-03 18:43:05 +08:00
|
|
|
def : InstRW<[WLat11, FXb, VecDF4, GroupAlone2], (instregex "CX(F|G)BR(A)?$")>;
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat8, FXb, VecBF, Cracked], (instregex "C(E|D)L(F|G)BR$")>;
|
2018-08-03 18:43:05 +08:00
|
|
|
def : InstRW<[WLat11, FXb, VecDF4, GroupAlone2], (instregex "CXL(F|G)BR$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Convert to fixed / logical
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// FP: Unary arithmetic
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Load Complement / Negative / Positive
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Square root
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Load FP integer
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat7, VecBF, NormalGr], (instregex "FI(E|D)BR(A)?$")>;
|
|
|
|
def : InstRW<[WLat10, VecDF4, GroupAlone], (instregex "FIXBR(A)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// FP: Binary arithmetic
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Addition
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Subtraction
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Multiply
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Multiply and add / subtract
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Division
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Divide to integer
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "DI(E|D)BR$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// FP: Comparisons
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Compare
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Test Data Class
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat5, LSU, VecXsPm, NormalGr], (instregex "TC(E|D)B$")>;
|
2018-12-12 16:26:24 +08:00
|
|
|
def : InstRW<[WLat10, LSU, VecDF4, GroupAlone], (instregex "TCXB$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// FP: Floating-point control register instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
|
|
|
|
// --------------------- Hexadecimal floating point ------------------------- //
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// HFP: Move instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Load and Test
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat3, WLat3, VecXsPm, NormalGr], (instregex "LT(E|D)R$")>;
|
|
|
|
def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "LTXR$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// HFP: Conversion instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Load rounded
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat7, VecBF, NormalGr], (instregex "(LEDR|LRER)$")>;
|
|
|
|
def : InstRW<[WLat7, VecBF, NormalGr], (instregex "LEXR$")>;
|
|
|
|
def : InstRW<[WLat9, VecDF2, NormalGr], (instregex "(LDXR|LRDR)$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Load lengthened
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Convert from fixed
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat8, FXb, VecBF, Cracked], (instregex "C(E|D)(F|G)R$")>;
|
2018-08-03 18:43:05 +08:00
|
|
|
def : InstRW<[WLat11, FXb, VecDF4, GroupAlone2], (instregex "CX(F|G)R$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Convert to fixed
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Convert BFP to HFP / HFP to BFP.
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat7, WLat7, VecBF, NormalGr], (instregex "THD(E)?R$")>;
|
|
|
|
def : InstRW<[WLat7, WLat7, VecBF, NormalGr], (instregex "TB(E)?DR$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// HFP: Unary arithmetic
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Load Complement / Negative / Positive
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Halve
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat7, VecBF, NormalGr], (instregex "H(E|D)R$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Square root
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Load FP integer
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat7, VecBF, NormalGr], (instregex "FI(E|D)R$")>;
|
|
|
|
def : InstRW<[WLat10, VecDF4, GroupAlone], (instregex "FIXR$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// HFP: Binary arithmetic
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Addition
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Subtraction
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Multiply
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Multiply and add / subtract
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Division
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// HFP: Comparisons
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Compare
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
|
|
|
|
// ------------------------ Decimal floating point -------------------------- //
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// DFP: Move instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Load and Test
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat8, WLat8, VecDF, NormalGr], (instregex "LTDTR$")>;
|
|
|
|
def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "LTXTR$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// DFP: Conversion instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Load rounded
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat15, VecDF, NormalGr], (instregex "LEDTR$")>;
|
|
|
|
def : InstRW<[WLat15, VecDF2, NormalGr], (instregex "LDXTR$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Load lengthened
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat8, VecDF, NormalGr], (instregex "LDETR$")>;
|
|
|
|
def : InstRW<[WLat10, VecDF4, GroupAlone], (instregex "LXDTR$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Convert from fixed / logical
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat30, FXb, VecDF, Cracked], (instregex "CD(F|G)TR(A)?$")>;
|
2018-08-03 18:43:05 +08:00
|
|
|
def : InstRW<[WLat30, FXb, VecDF4, GroupAlone2], (instregex "CX(F|G)TR(A)?$")>;
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat30, FXb, VecDF, Cracked], (instregex "CDL(F|G)TR$")>;
|
2018-08-03 18:43:05 +08:00
|
|
|
def : InstRW<[WLat30, FXb, VecDF4, GroupAlone2], (instregex "CXL(F|G)TR$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Convert to fixed / logical
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Convert from / to signed / unsigned packed
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat9, FXb, VecDF, Cracked], (instregex "CD(S|U)TR$")>;
|
2018-08-03 18:43:05 +08:00
|
|
|
def : InstRW<[WLat12, FXb2, VecDF4, GroupAlone2], (instregex "CX(S|U)TR$")>;
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat11, FXb, VecDF, Cracked], (instregex "C(S|U)DTR$")>;
|
2018-08-03 18:43:05 +08:00
|
|
|
def : InstRW<[WLat15, FXb2, VecDF4, GroupAlone2], (instregex "C(S|U)XTR$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Convert from / to zoned
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat8LSU, LSU, VecDF, Cracked], (instregex "CDZT$")>;
|
2018-08-03 18:43:05 +08:00
|
|
|
def : InstRW<[WLat16LSU, LSU2, VecDF4, GroupAlone3], (instregex "CXZT$")>;
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXb, LSU, VecDF, Cracked], (instregex "CZDT$")>;
|
|
|
|
def : InstRW<[WLat1, FXb, LSU, VecDF2, GroupAlone], (instregex "CZXT$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Convert from / to packed
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat8LSU, LSU, VecDF, Cracked], (instregex "CDPT$")>;
|
2018-08-03 18:43:05 +08:00
|
|
|
def : InstRW<[WLat16LSU, LSU2, VecDF4, GroupAlone3], (instregex "CXPT$")>;
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXb, LSU, VecDF, Cracked], (instregex "CPDT$")>;
|
|
|
|
def : InstRW<[WLat1, FXb, LSU, VecDF2, GroupAlone], (instregex "CPXT$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Perform floating-point operation
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "PFPO$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// DFP: Unary arithmetic
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Load FP integer
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat8, VecDF, NormalGr], (instregex "FIDTR$")>;
|
|
|
|
def : InstRW<[WLat10, VecDF4, GroupAlone], (instregex "FIXTR$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Extract biased exponent
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat11, FXb, VecDF, Cracked], (instregex "EEDTR$")>;
|
|
|
|
def : InstRW<[WLat11, FXb, VecDF, Cracked], (instregex "EEXTR$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Extract significance
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat11, FXb, VecDF, Cracked], (instregex "ESDTR$")>;
|
|
|
|
def : InstRW<[WLat12, FXb, VecDF2, Cracked], (instregex "ESXTR$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// DFP: Binary arithmetic
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Addition
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat8, WLat8, VecDF, NormalGr], (instregex "ADTR(A)?$")>;
|
|
|
|
def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "AXTR(A)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Subtraction
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat8, WLat8, VecDF, NormalGr], (instregex "SDTR(A)?$")>;
|
|
|
|
def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "SXTR(A)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Multiply
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat30, VecDF, NormalGr], (instregex "MDTR(A)?$")>;
|
|
|
|
def : InstRW<[WLat30, VecDF4, GroupAlone], (instregex "MXTR(A)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Division
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat30, VecDF, NormalGr], (instregex "DDTR(A)?$")>;
|
|
|
|
def : InstRW<[WLat30, VecDF4, GroupAlone], (instregex "DXTR(A)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Quantize
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat8, WLat8, VecDF, NormalGr], (instregex "QADTR$")>;
|
|
|
|
def : InstRW<[WLat10, WLat10, VecDF4, GroupAlone], (instregex "QAXTR$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Reround
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat9, WLat9, FXb, VecDF, Cracked], (instregex "RRDTR$")>;
|
2018-08-03 18:43:05 +08:00
|
|
|
def : InstRW<[WLat11, WLat11, FXb, VecDF4, GroupAlone2], (instregex "RRXTR$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Shift significand left/right
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat11LSU, LSU, VecDF, GroupAlone], (instregex "S(L|R)DT$")>;
|
|
|
|
def : InstRW<[WLat11LSU, LSU, VecDF4, GroupAlone], (instregex "S(L|R)XT$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Insert biased exponent
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat9, FXb, VecDF, Cracked], (instregex "IEDTR$")>;
|
2018-08-03 18:43:05 +08:00
|
|
|
def : InstRW<[WLat11, FXb, VecDF4, GroupAlone2], (instregex "IEXTR$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// DFP: Comparisons
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Compare
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat8, VecDF, NormalGr], (instregex "(K|C)DTR$")>;
|
|
|
|
def : InstRW<[WLat9, VecDF2, GroupAlone], (instregex "(K|C)XTR$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Compare biased exponent
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat8, VecDF, NormalGr], (instregex "CEDTR$")>;
|
|
|
|
def : InstRW<[WLat8, VecDF, NormalGr], (instregex "CEXTR$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Test Data Class/Group
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat15, LSU, VecDF, NormalGr], (instregex "TD(C|G)(E|D)T$")>;
|
|
|
|
def : InstRW<[WLat15, LSU, VecDF2, GroupAlone], (instregex "TD(C|G)XT$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
|
|
|
|
// --------------------------------- Vector --------------------------------- //
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Vector: Move instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Vector: Immediate instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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)$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Vector: Loads
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2019-06-19 22:20:00 +08:00
|
|
|
def : InstRW<[LSULatency, LSU, NormalGr], (instregex "VL(Align)?$")>;
|
|
|
|
def : InstRW<[LSULatency, LSU, NormalGr], (instregex "VL(L|BB)$")>;
|
2018-07-20 17:40:43 +08:00
|
|
|
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)$")>;
|
2019-06-19 22:20:00 +08:00
|
|
|
def : InstRW<[WLat4LSU, WLat4LSU, LSU5, GroupAlone],
|
|
|
|
(instregex "VLM(Align)?$")>;
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[LSULatency, LSU, NormalGr], (instregex "VLRL(R)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Vector: Stores
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2019-06-19 22:20:00 +08:00
|
|
|
def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "VST(Align|L|32|64)?$")>;
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "VSTE(F|G)$")>;
|
|
|
|
def : InstRW<[WLat1, FXb, LSU, VecXsPm, Cracked], (instregex "VSTE(B|H)$")>;
|
2019-06-19 22:20:00 +08:00
|
|
|
def : InstRW<[WLat1, LSU2, FXb3, GroupAlone2], (instregex "VSTM(Align)?$")>;
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXb2, LSU, Cracked], (instregex "VSCE(F|G)$")>;
|
|
|
|
def : InstRW<[WLat1, FXb, LSU, NormalGr], (instregex "VSTRL(R)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Vector: Selects and permutes
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Vector: Widening and narrowing
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Vector: Integer arithmetic
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Vector: Integer comparison
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Vector: Floating-point arithmetic
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// Conversion and rounding
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Sign operations
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Minimum / maximum
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Test data class
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Add / subtract
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Multiply / multiply-and-add/subtract
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
// Divide / square root
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Vector: Floating-point comparison
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Vector: Floating-point insertion and extraction
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat1, FXb, NormalGr], (instregex "LEFR$")>;
|
|
|
|
def : InstRW<[WLat3, FXb, NormalGr], (instregex "LFER$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Vector: String instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Vector: Packed-decimal instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat10, VecDF2, NormalGr], (instregex "VLIP$")>;
|
2018-08-03 18:43:05 +08:00
|
|
|
def : InstRW<[WLat6, VecDFX, LSU, GroupAlone2], (instregex "VPKZ$")>;
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
|
|
|
|
// -------------------------------- System ---------------------------------- //
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// System: Program-Status Word Instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat30, WLat30, MCD], (instregex "EPSW$")>;
|
2018-12-12 16:26:24 +08:00
|
|
|
def : InstRW<[WLat20, GroupAlone3], (instregex "LPSW(E)?$")>;
|
2018-07-20 17:40:43 +08:00
|
|
|
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)?$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// System: Control Register Instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat4LSU, WLat4LSU, LSU2, GroupAlone], (instregex "LCTL(G)?$")>;
|
2018-12-12 16:26:24 +08:00
|
|
|
def : InstRW<[WLat1, LSU5, FXb, GroupAlone2], (instregex "STCT(L|G)$")>;
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// System: Prefix-Register Instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat30, MCD], (instregex "S(T)?PX$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// System: Storage-Key and Real Memory Instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// System: Dynamic-Address-Translation Instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// System: Memory-move Instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-12-12 16:26:24 +08:00
|
|
|
def : InstRW<[WLat4LSU, FXa2, FXb, LSU5, GroupAlone2], (instregex "MVC(K|P|S)$")>;
|
|
|
|
def : InstRW<[WLat1, FXa, LSU5, GroupAlone2], (instregex "MVC(S|D)K$")>;
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat30, MCD], (instregex "MVCOS$")>;
|
|
|
|
def : InstRW<[WLat30, MCD], (instregex "MVPG$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// System: Address-Space Instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// System: Linkage-Stack Instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat30, MCD], (instregex "BAKR$")>;
|
|
|
|
def : InstRW<[WLat30, MCD], (instregex "EREG(G)?$")>;
|
|
|
|
def : InstRW<[WLat30, WLat30, MCD], (instregex "(E|M)STA$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// System: Time-Related Instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat30, MCD], (instregex "PTFF$")>;
|
|
|
|
def : InstRW<[WLat30, MCD], (instregex "SCK(PF|C)?$")>;
|
|
|
|
def : InstRW<[WLat1, LSU2, GroupAlone], (instregex "SPT$")>;
|
2018-08-03 18:43:05 +08:00
|
|
|
def : InstRW<[WLat15, LSU3, FXa2, FXb, GroupAlone2], (instregex "STCK(F)?$")>;
|
|
|
|
def : InstRW<[WLat20, LSU4, FXa2, FXb2, GroupAlone3], (instregex "STCKE$")>;
|
2018-07-20 17:40:43 +08:00
|
|
|
def : InstRW<[WLat30, MCD], (instregex "STCKC$")>;
|
|
|
|
def : InstRW<[WLat1, LSU2, FXb, Cracked], (instregex "STPT$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// System: CPU-Related Instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// System: Miscellaneous Instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// System: CPU-Measurement Facility Instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// System: I/O Instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2018-07-20 17:40:43 +08:00
|
|
|
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$")>;
|
2017-07-18 01:41:11 +08:00
|
|
|
|
|
|
|
}
|
|
|
|
|