mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
[mips] Use register operands instead of register classes in DSP instruction
definitions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188343 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7d6355226c
commit
88373c29fe
@ -115,6 +115,12 @@ class MipsAsmParser : public MCTargetAsmParser {
|
|||||||
MipsAsmParser::OperandMatchResultTy
|
MipsAsmParser::OperandMatchResultTy
|
||||||
parseACC64DSP(SmallVectorImpl<MCParsedAsmOperand*> &Operands);
|
parseACC64DSP(SmallVectorImpl<MCParsedAsmOperand*> &Operands);
|
||||||
|
|
||||||
|
MipsAsmParser::OperandMatchResultTy
|
||||||
|
parseLO32DSP(SmallVectorImpl<MCParsedAsmOperand*> &Operands);
|
||||||
|
|
||||||
|
MipsAsmParser::OperandMatchResultTy
|
||||||
|
parseHI32DSP(SmallVectorImpl<MCParsedAsmOperand*> &Operands);
|
||||||
|
|
||||||
bool searchSymbolAlias(SmallVectorImpl<MCParsedAsmOperand*> &Operands,
|
bool searchSymbolAlias(SmallVectorImpl<MCParsedAsmOperand*> &Operands,
|
||||||
unsigned RegKind);
|
unsigned RegKind);
|
||||||
|
|
||||||
@ -222,7 +228,9 @@ public:
|
|||||||
Kind_AFGR64Regs,
|
Kind_AFGR64Regs,
|
||||||
Kind_CCRRegs,
|
Kind_CCRRegs,
|
||||||
Kind_FCCRegs,
|
Kind_FCCRegs,
|
||||||
Kind_ACC64DSP
|
Kind_ACC64DSP,
|
||||||
|
Kind_LO32DSP,
|
||||||
|
Kind_HI32DSP
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -408,6 +416,14 @@ public:
|
|||||||
return Kind == k_Register && Reg.Kind == Kind_ACC64DSP;
|
return Kind == k_Register && Reg.Kind == Kind_ACC64DSP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isLO32DSPAsm() const {
|
||||||
|
return Kind == k_Register && Reg.Kind == Kind_LO32DSP;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isHI32DSPAsm() const {
|
||||||
|
return Kind == k_Register && Reg.Kind == Kind_HI32DSP;
|
||||||
|
}
|
||||||
|
|
||||||
/// getStartLoc - Get the location of the first token of this operand.
|
/// getStartLoc - Get the location of the first token of this operand.
|
||||||
SMLoc getStartLoc() const {
|
SMLoc getStartLoc() const {
|
||||||
return StartLoc;
|
return StartLoc;
|
||||||
@ -1409,6 +1425,72 @@ MipsAsmParser::parseACC64DSP(SmallVectorImpl<MCParsedAsmOperand*> &Operands) {
|
|||||||
return parseRegs(Operands, (int) MipsOperand::Kind_ACC64DSP);
|
return parseRegs(Operands, (int) MipsOperand::Kind_ACC64DSP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MipsAsmParser::OperandMatchResultTy
|
||||||
|
MipsAsmParser::parseLO32DSP(SmallVectorImpl<MCParsedAsmOperand*> &Operands) {
|
||||||
|
// If the first token is not '$' we have an error.
|
||||||
|
if (Parser.getTok().isNot(AsmToken::Dollar))
|
||||||
|
return MatchOperand_NoMatch;
|
||||||
|
|
||||||
|
SMLoc S = Parser.getTok().getLoc();
|
||||||
|
Parser.Lex(); // Eat the '$'
|
||||||
|
|
||||||
|
const AsmToken &Tok = Parser.getTok(); // Get next token.
|
||||||
|
|
||||||
|
if (Tok.isNot(AsmToken::Identifier))
|
||||||
|
return MatchOperand_NoMatch;
|
||||||
|
|
||||||
|
if (!Tok.getIdentifier().startswith("ac"))
|
||||||
|
return MatchOperand_NoMatch;
|
||||||
|
|
||||||
|
StringRef NumString = Tok.getIdentifier().substr(2);
|
||||||
|
|
||||||
|
unsigned IntVal;
|
||||||
|
if (NumString.getAsInteger(10, IntVal))
|
||||||
|
return MatchOperand_NoMatch;
|
||||||
|
|
||||||
|
unsigned Reg = matchRegisterByNumber(IntVal, Mips::LO32DSPRegClassID);
|
||||||
|
|
||||||
|
MipsOperand *Op = MipsOperand::CreateReg(Reg, S, Parser.getTok().getLoc());
|
||||||
|
Op->setRegKind(MipsOperand::Kind_LO32DSP);
|
||||||
|
Operands.push_back(Op);
|
||||||
|
|
||||||
|
Parser.Lex(); // Eat the register number.
|
||||||
|
return MatchOperand_Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
MipsAsmParser::OperandMatchResultTy
|
||||||
|
MipsAsmParser::parseHI32DSP(SmallVectorImpl<MCParsedAsmOperand*> &Operands) {
|
||||||
|
// If the first token is not '$' we have an error.
|
||||||
|
if (Parser.getTok().isNot(AsmToken::Dollar))
|
||||||
|
return MatchOperand_NoMatch;
|
||||||
|
|
||||||
|
SMLoc S = Parser.getTok().getLoc();
|
||||||
|
Parser.Lex(); // Eat the '$'
|
||||||
|
|
||||||
|
const AsmToken &Tok = Parser.getTok(); // Get next token.
|
||||||
|
|
||||||
|
if (Tok.isNot(AsmToken::Identifier))
|
||||||
|
return MatchOperand_NoMatch;
|
||||||
|
|
||||||
|
if (!Tok.getIdentifier().startswith("ac"))
|
||||||
|
return MatchOperand_NoMatch;
|
||||||
|
|
||||||
|
StringRef NumString = Tok.getIdentifier().substr(2);
|
||||||
|
|
||||||
|
unsigned IntVal;
|
||||||
|
if (NumString.getAsInteger(10, IntVal))
|
||||||
|
return MatchOperand_NoMatch;
|
||||||
|
|
||||||
|
unsigned Reg = matchRegisterByNumber(IntVal, Mips::HI32DSPRegClassID);
|
||||||
|
|
||||||
|
MipsOperand *Op = MipsOperand::CreateReg(Reg, S, Parser.getTok().getLoc());
|
||||||
|
Op->setRegKind(MipsOperand::Kind_HI32DSP);
|
||||||
|
Operands.push_back(Op);
|
||||||
|
|
||||||
|
Parser.Lex(); // Eat the register number.
|
||||||
|
return MatchOperand_Success;
|
||||||
|
}
|
||||||
|
|
||||||
bool MipsAsmParser::searchSymbolAlias(
|
bool MipsAsmParser::searchSymbolAlias(
|
||||||
SmallVectorImpl<MCParsedAsmOperand*> &Operands, unsigned RegKind) {
|
SmallVectorImpl<MCParsedAsmOperand*> &Operands, unsigned RegKind) {
|
||||||
|
|
||||||
|
@ -256,203 +256,203 @@ class PREPEND_ENC : APPEND_FMT<0b00001>;
|
|||||||
|
|
||||||
// Instruction desc.
|
// Instruction desc.
|
||||||
class ADDU_QB_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
class ADDU_QB_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
||||||
InstrItinClass itin, RegisterClass RCD,
|
InstrItinClass itin, RegisterOperand ROD,
|
||||||
RegisterClass RCS, RegisterClass RCT = RCS> {
|
RegisterOperand ROS, RegisterOperand ROT = ROS> {
|
||||||
dag OutOperandList = (outs RCD:$rd);
|
dag OutOperandList = (outs ROD:$rd);
|
||||||
dag InOperandList = (ins RCS:$rs, RCT:$rt);
|
dag InOperandList = (ins ROS:$rs, ROT:$rt);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$rd, $rs, $rt");
|
string AsmString = !strconcat(instr_asm, "\t$rd, $rs, $rt");
|
||||||
list<dag> Pattern = [(set RCD:$rd, (OpNode RCS:$rs, RCT:$rt))];
|
list<dag> Pattern = [(set ROD:$rd, (OpNode ROS:$rs, ROT:$rt))];
|
||||||
InstrItinClass Itinerary = itin;
|
InstrItinClass Itinerary = itin;
|
||||||
}
|
}
|
||||||
|
|
||||||
class RADDU_W_QB_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
class RADDU_W_QB_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
||||||
InstrItinClass itin, RegisterClass RCD,
|
InstrItinClass itin, RegisterOperand ROD,
|
||||||
RegisterClass RCS = RCD> {
|
RegisterOperand ROS = ROD> {
|
||||||
dag OutOperandList = (outs RCD:$rd);
|
dag OutOperandList = (outs ROD:$rd);
|
||||||
dag InOperandList = (ins RCS:$rs);
|
dag InOperandList = (ins ROS:$rs);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$rd, $rs");
|
string AsmString = !strconcat(instr_asm, "\t$rd, $rs");
|
||||||
list<dag> Pattern = [(set RCD:$rd, (OpNode RCS:$rs))];
|
list<dag> Pattern = [(set ROD:$rd, (OpNode ROS:$rs))];
|
||||||
InstrItinClass Itinerary = itin;
|
InstrItinClass Itinerary = itin;
|
||||||
}
|
}
|
||||||
|
|
||||||
class CMP_EQ_QB_R2_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
class CMP_EQ_QB_R2_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
||||||
InstrItinClass itin, RegisterClass RCS,
|
InstrItinClass itin, RegisterOperand ROS,
|
||||||
RegisterClass RCT = RCS> {
|
RegisterOperand ROT = ROS> {
|
||||||
dag OutOperandList = (outs);
|
dag OutOperandList = (outs);
|
||||||
dag InOperandList = (ins RCS:$rs, RCT:$rt);
|
dag InOperandList = (ins ROS:$rs, ROT:$rt);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$rs, $rt");
|
string AsmString = !strconcat(instr_asm, "\t$rs, $rt");
|
||||||
list<dag> Pattern = [(OpNode RCS:$rs, RCT:$rt)];
|
list<dag> Pattern = [(OpNode ROS:$rs, ROT:$rt)];
|
||||||
InstrItinClass Itinerary = itin;
|
InstrItinClass Itinerary = itin;
|
||||||
}
|
}
|
||||||
|
|
||||||
class CMP_EQ_QB_R3_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
class CMP_EQ_QB_R3_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
||||||
InstrItinClass itin, RegisterClass RCD,
|
InstrItinClass itin, RegisterOperand ROD,
|
||||||
RegisterClass RCS, RegisterClass RCT = RCS> {
|
RegisterOperand ROS, RegisterOperand ROT = ROS> {
|
||||||
dag OutOperandList = (outs RCD:$rd);
|
dag OutOperandList = (outs ROD:$rd);
|
||||||
dag InOperandList = (ins RCS:$rs, RCT:$rt);
|
dag InOperandList = (ins ROS:$rs, ROT:$rt);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$rd, $rs, $rt");
|
string AsmString = !strconcat(instr_asm, "\t$rd, $rs, $rt");
|
||||||
list<dag> Pattern = [(set RCD:$rd, (OpNode RCS:$rs, RCT:$rt))];
|
list<dag> Pattern = [(set ROD:$rd, (OpNode ROS:$rs, ROT:$rt))];
|
||||||
InstrItinClass Itinerary = itin;
|
InstrItinClass Itinerary = itin;
|
||||||
}
|
}
|
||||||
|
|
||||||
class PRECR_SRA_PH_W_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
class PRECR_SRA_PH_W_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
||||||
InstrItinClass itin, RegisterClass RCT,
|
InstrItinClass itin, RegisterOperand ROT,
|
||||||
RegisterClass RCS = RCT> {
|
RegisterOperand ROS = ROT> {
|
||||||
dag OutOperandList = (outs RCT:$rt);
|
dag OutOperandList = (outs ROT:$rt);
|
||||||
dag InOperandList = (ins RCS:$rs, shamt:$sa, RCS:$src);
|
dag InOperandList = (ins ROS:$rs, shamt:$sa, ROS:$src);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$rt, $rs, $sa");
|
string AsmString = !strconcat(instr_asm, "\t$rt, $rs, $sa");
|
||||||
list<dag> Pattern = [(set RCT:$rt, (OpNode RCS:$src, RCS:$rs, immZExt5:$sa))];
|
list<dag> Pattern = [(set ROT:$rt, (OpNode ROS:$src, ROS:$rs, immZExt5:$sa))];
|
||||||
InstrItinClass Itinerary = itin;
|
InstrItinClass Itinerary = itin;
|
||||||
string Constraints = "$src = $rt";
|
string Constraints = "$src = $rt";
|
||||||
}
|
}
|
||||||
|
|
||||||
class ABSQ_S_PH_R2_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
class ABSQ_S_PH_R2_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
||||||
InstrItinClass itin, RegisterClass RCD,
|
InstrItinClass itin, RegisterOperand ROD,
|
||||||
RegisterClass RCT = RCD> {
|
RegisterOperand ROT = ROD> {
|
||||||
dag OutOperandList = (outs RCD:$rd);
|
dag OutOperandList = (outs ROD:$rd);
|
||||||
dag InOperandList = (ins RCT:$rt);
|
dag InOperandList = (ins ROT:$rt);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$rd, $rt");
|
string AsmString = !strconcat(instr_asm, "\t$rd, $rt");
|
||||||
list<dag> Pattern = [(set RCD:$rd, (OpNode RCT:$rt))];
|
list<dag> Pattern = [(set ROD:$rd, (OpNode ROT:$rt))];
|
||||||
InstrItinClass Itinerary = itin;
|
InstrItinClass Itinerary = itin;
|
||||||
}
|
}
|
||||||
|
|
||||||
class REPL_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
class REPL_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
||||||
ImmLeaf immPat, InstrItinClass itin, RegisterClass RC> {
|
ImmLeaf immPat, InstrItinClass itin, RegisterOperand RO> {
|
||||||
dag OutOperandList = (outs RC:$rd);
|
dag OutOperandList = (outs RO:$rd);
|
||||||
dag InOperandList = (ins uimm16:$imm);
|
dag InOperandList = (ins uimm16:$imm);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$rd, $imm");
|
string AsmString = !strconcat(instr_asm, "\t$rd, $imm");
|
||||||
list<dag> Pattern = [(set RC:$rd, (OpNode immPat:$imm))];
|
list<dag> Pattern = [(set RO:$rd, (OpNode immPat:$imm))];
|
||||||
InstrItinClass Itinerary = itin;
|
InstrItinClass Itinerary = itin;
|
||||||
}
|
}
|
||||||
|
|
||||||
class SHLL_QB_R3_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
class SHLL_QB_R3_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
||||||
InstrItinClass itin, RegisterClass RC> {
|
InstrItinClass itin, RegisterOperand RO> {
|
||||||
dag OutOperandList = (outs RC:$rd);
|
dag OutOperandList = (outs RO:$rd);
|
||||||
dag InOperandList = (ins RC:$rt, GPR32:$rs_sa);
|
dag InOperandList = (ins RO:$rt, GPR32Opnd:$rs_sa);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$rd, $rt, $rs_sa");
|
string AsmString = !strconcat(instr_asm, "\t$rd, $rt, $rs_sa");
|
||||||
list<dag> Pattern = [(set RC:$rd, (OpNode RC:$rt, GPR32:$rs_sa))];
|
list<dag> Pattern = [(set RO:$rd, (OpNode RO:$rt, GPR32Opnd:$rs_sa))];
|
||||||
InstrItinClass Itinerary = itin;
|
InstrItinClass Itinerary = itin;
|
||||||
}
|
}
|
||||||
|
|
||||||
class SHLL_QB_R2_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
class SHLL_QB_R2_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
||||||
SDPatternOperator ImmPat, InstrItinClass itin,
|
SDPatternOperator ImmPat, InstrItinClass itin,
|
||||||
RegisterClass RC> {
|
RegisterOperand RO> {
|
||||||
dag OutOperandList = (outs RC:$rd);
|
dag OutOperandList = (outs RO:$rd);
|
||||||
dag InOperandList = (ins RC:$rt, uimm16:$rs_sa);
|
dag InOperandList = (ins RO:$rt, uimm16:$rs_sa);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$rd, $rt, $rs_sa");
|
string AsmString = !strconcat(instr_asm, "\t$rd, $rt, $rs_sa");
|
||||||
list<dag> Pattern = [(set RC:$rd, (OpNode RC:$rt, ImmPat:$rs_sa))];
|
list<dag> Pattern = [(set RO:$rd, (OpNode RO:$rt, ImmPat:$rs_sa))];
|
||||||
InstrItinClass Itinerary = itin;
|
InstrItinClass Itinerary = itin;
|
||||||
bit hasSideEffects = 1;
|
bit hasSideEffects = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
class LX_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
class LX_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
||||||
InstrItinClass itin> {
|
InstrItinClass itin> {
|
||||||
dag OutOperandList = (outs GPR32:$rd);
|
dag OutOperandList = (outs GPR32Opnd:$rd);
|
||||||
dag InOperandList = (ins GPR32:$base, GPR32:$index);
|
dag InOperandList = (ins GPR32Opnd:$base, GPR32Opnd:$index);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$rd, ${index}(${base})");
|
string AsmString = !strconcat(instr_asm, "\t$rd, ${index}(${base})");
|
||||||
list<dag> Pattern = [(set GPR32:$rd,
|
list<dag> Pattern = [(set GPR32Opnd:$rd,
|
||||||
(OpNode GPR32:$base, GPR32:$index))];
|
(OpNode GPR32Opnd:$base, GPR32Opnd:$index))];
|
||||||
InstrItinClass Itinerary = itin;
|
InstrItinClass Itinerary = itin;
|
||||||
bit mayLoad = 1;
|
bit mayLoad = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
class ADDUH_QB_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
class ADDUH_QB_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
||||||
InstrItinClass itin, RegisterClass RCD,
|
InstrItinClass itin, RegisterOperand ROD,
|
||||||
RegisterClass RCS = RCD, RegisterClass RCT = RCD> {
|
RegisterOperand ROS = ROD, RegisterOperand ROT = ROD> {
|
||||||
dag OutOperandList = (outs RCD:$rd);
|
dag OutOperandList = (outs ROD:$rd);
|
||||||
dag InOperandList = (ins RCS:$rs, RCT:$rt);
|
dag InOperandList = (ins ROS:$rs, ROT:$rt);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$rd, $rs, $rt");
|
string AsmString = !strconcat(instr_asm, "\t$rd, $rs, $rt");
|
||||||
list<dag> Pattern = [(set RCD:$rd, (OpNode RCS:$rs, RCT:$rt))];
|
list<dag> Pattern = [(set ROD:$rd, (OpNode ROS:$rs, ROT:$rt))];
|
||||||
InstrItinClass Itinerary = itin;
|
InstrItinClass Itinerary = itin;
|
||||||
}
|
}
|
||||||
|
|
||||||
class APPEND_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
class APPEND_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
||||||
SDPatternOperator ImmOp, InstrItinClass itin> {
|
SDPatternOperator ImmOp, InstrItinClass itin> {
|
||||||
dag OutOperandList = (outs GPR32:$rt);
|
dag OutOperandList = (outs GPR32Opnd:$rt);
|
||||||
dag InOperandList = (ins GPR32:$rs, shamt:$sa, GPR32:$src);
|
dag InOperandList = (ins GPR32Opnd:$rs, shamt:$sa, GPR32Opnd:$src);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$rt, $rs, $sa");
|
string AsmString = !strconcat(instr_asm, "\t$rt, $rs, $sa");
|
||||||
list<dag> Pattern = [(set GPR32:$rt,
|
list<dag> Pattern = [(set GPR32Opnd:$rt,
|
||||||
(OpNode GPR32:$src, GPR32:$rs, ImmOp:$sa))];
|
(OpNode GPR32Opnd:$src, GPR32Opnd:$rs, ImmOp:$sa))];
|
||||||
InstrItinClass Itinerary = itin;
|
InstrItinClass Itinerary = itin;
|
||||||
string Constraints = "$src = $rt";
|
string Constraints = "$src = $rt";
|
||||||
}
|
}
|
||||||
|
|
||||||
class EXTR_W_TY1_R2_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
class EXTR_W_TY1_R2_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
||||||
InstrItinClass itin> {
|
InstrItinClass itin> {
|
||||||
dag OutOperandList = (outs GPR32:$rt);
|
dag OutOperandList = (outs GPR32Opnd:$rt);
|
||||||
dag InOperandList = (ins ACC64DSP:$ac, GPR32:$shift_rs);
|
dag InOperandList = (ins ACC64DSPOpnd:$ac, GPR32Opnd:$shift_rs);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$rt, $ac, $shift_rs");
|
string AsmString = !strconcat(instr_asm, "\t$rt, $ac, $shift_rs");
|
||||||
InstrItinClass Itinerary = itin;
|
InstrItinClass Itinerary = itin;
|
||||||
}
|
}
|
||||||
|
|
||||||
class EXTR_W_TY1_R1_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
class EXTR_W_TY1_R1_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
||||||
InstrItinClass itin> {
|
InstrItinClass itin> {
|
||||||
dag OutOperandList = (outs GPR32:$rt);
|
dag OutOperandList = (outs GPR32Opnd:$rt);
|
||||||
dag InOperandList = (ins ACC64DSP:$ac, uimm16:$shift_rs);
|
dag InOperandList = (ins ACC64DSPOpnd:$ac, uimm16:$shift_rs);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$rt, $ac, $shift_rs");
|
string AsmString = !strconcat(instr_asm, "\t$rt, $ac, $shift_rs");
|
||||||
InstrItinClass Itinerary = itin;
|
InstrItinClass Itinerary = itin;
|
||||||
}
|
}
|
||||||
|
|
||||||
class SHILO_R1_DESC_BASE<string instr_asm, SDPatternOperator OpNode> {
|
class SHILO_R1_DESC_BASE<string instr_asm, SDPatternOperator OpNode> {
|
||||||
dag OutOperandList = (outs ACC64DSP:$ac);
|
dag OutOperandList = (outs ACC64DSPOpnd:$ac);
|
||||||
dag InOperandList = (ins simm16:$shift, ACC64DSP:$acin);
|
dag InOperandList = (ins simm16:$shift, ACC64DSPOpnd:$acin);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$ac, $shift");
|
string AsmString = !strconcat(instr_asm, "\t$ac, $shift");
|
||||||
list<dag> Pattern = [(set ACC64DSP:$ac,
|
list<dag> Pattern = [(set ACC64DSPOpnd:$ac,
|
||||||
(OpNode immSExt6:$shift, ACC64DSP:$acin))];
|
(OpNode immSExt6:$shift, ACC64DSPOpnd:$acin))];
|
||||||
string Constraints = "$acin = $ac";
|
string Constraints = "$acin = $ac";
|
||||||
}
|
}
|
||||||
|
|
||||||
class SHILO_R2_DESC_BASE<string instr_asm, SDPatternOperator OpNode> {
|
class SHILO_R2_DESC_BASE<string instr_asm, SDPatternOperator OpNode> {
|
||||||
dag OutOperandList = (outs ACC64DSP:$ac);
|
dag OutOperandList = (outs ACC64DSPOpnd:$ac);
|
||||||
dag InOperandList = (ins GPR32:$rs, ACC64DSP:$acin);
|
dag InOperandList = (ins GPR32Opnd:$rs, ACC64DSPOpnd:$acin);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$ac, $rs");
|
string AsmString = !strconcat(instr_asm, "\t$ac, $rs");
|
||||||
list<dag> Pattern = [(set ACC64DSP:$ac,
|
list<dag> Pattern = [(set ACC64DSPOpnd:$ac,
|
||||||
(OpNode GPR32:$rs, ACC64DSP:$acin))];
|
(OpNode GPR32Opnd:$rs, ACC64DSPOpnd:$acin))];
|
||||||
string Constraints = "$acin = $ac";
|
string Constraints = "$acin = $ac";
|
||||||
}
|
}
|
||||||
|
|
||||||
class MTHLIP_DESC_BASE<string instr_asm, SDPatternOperator OpNode> {
|
class MTHLIP_DESC_BASE<string instr_asm, SDPatternOperator OpNode> {
|
||||||
dag OutOperandList = (outs ACC64DSP:$ac);
|
dag OutOperandList = (outs ACC64DSPOpnd:$ac);
|
||||||
dag InOperandList = (ins GPR32:$rs, ACC64DSP:$acin);
|
dag InOperandList = (ins GPR32Opnd:$rs, ACC64DSPOpnd:$acin);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$rs, $ac");
|
string AsmString = !strconcat(instr_asm, "\t$rs, $ac");
|
||||||
list<dag> Pattern = [(set ACC64DSP:$ac,
|
list<dag> Pattern = [(set ACC64DSPOpnd:$ac,
|
||||||
(OpNode GPR32:$rs, ACC64DSP:$acin))];
|
(OpNode GPR32Opnd:$rs, ACC64DSPOpnd:$acin))];
|
||||||
string Constraints = "$acin = $ac";
|
string Constraints = "$acin = $ac";
|
||||||
}
|
}
|
||||||
|
|
||||||
class RDDSP_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
class RDDSP_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
||||||
InstrItinClass itin> {
|
InstrItinClass itin> {
|
||||||
dag OutOperandList = (outs GPR32:$rd);
|
dag OutOperandList = (outs GPR32Opnd:$rd);
|
||||||
dag InOperandList = (ins uimm16:$mask);
|
dag InOperandList = (ins uimm16:$mask);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$rd, $mask");
|
string AsmString = !strconcat(instr_asm, "\t$rd, $mask");
|
||||||
list<dag> Pattern = [(set GPR32:$rd, (OpNode immZExt10:$mask))];
|
list<dag> Pattern = [(set GPR32Opnd:$rd, (OpNode immZExt10:$mask))];
|
||||||
InstrItinClass Itinerary = itin;
|
InstrItinClass Itinerary = itin;
|
||||||
}
|
}
|
||||||
|
|
||||||
class WRDSP_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
class WRDSP_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
||||||
InstrItinClass itin> {
|
InstrItinClass itin> {
|
||||||
dag OutOperandList = (outs);
|
dag OutOperandList = (outs);
|
||||||
dag InOperandList = (ins GPR32:$rs, uimm16:$mask);
|
dag InOperandList = (ins GPR32Opnd:$rs, uimm16:$mask);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$rs, $mask");
|
string AsmString = !strconcat(instr_asm, "\t$rs, $mask");
|
||||||
list<dag> Pattern = [(OpNode GPR32:$rs, immZExt10:$mask)];
|
list<dag> Pattern = [(OpNode GPR32Opnd:$rs, immZExt10:$mask)];
|
||||||
InstrItinClass Itinerary = itin;
|
InstrItinClass Itinerary = itin;
|
||||||
}
|
}
|
||||||
|
|
||||||
class DPA_W_PH_DESC_BASE<string instr_asm, SDPatternOperator OpNode> {
|
class DPA_W_PH_DESC_BASE<string instr_asm, SDPatternOperator OpNode> {
|
||||||
dag OutOperandList = (outs ACC64DSP:$ac);
|
dag OutOperandList = (outs ACC64DSPOpnd:$ac);
|
||||||
dag InOperandList = (ins GPR32:$rs, GPR32:$rt, ACC64DSP:$acin);
|
dag InOperandList = (ins GPR32Opnd:$rs, GPR32Opnd:$rt, ACC64DSPOpnd:$acin);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$ac, $rs, $rt");
|
string AsmString = !strconcat(instr_asm, "\t$ac, $rs, $rt");
|
||||||
list<dag> Pattern = [(set ACC64DSP:$ac,
|
list<dag> Pattern = [(set ACC64DSPOpnd:$ac,
|
||||||
(OpNode GPR32:$rs, GPR32:$rt, ACC64DSP:$acin))];
|
(OpNode GPR32Opnd:$rs, GPR32Opnd:$rt, ACC64DSPOpnd:$acin))];
|
||||||
string Constraints = "$acin = $ac";
|
string Constraints = "$acin = $ac";
|
||||||
}
|
}
|
||||||
|
|
||||||
class MULT_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
class MULT_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
||||||
InstrItinClass itin> {
|
InstrItinClass itin> {
|
||||||
dag OutOperandList = (outs ACC64DSP:$ac);
|
dag OutOperandList = (outs ACC64DSPOpnd:$ac);
|
||||||
dag InOperandList = (ins GPR32:$rs, GPR32:$rt);
|
dag InOperandList = (ins GPR32Opnd:$rs, GPR32Opnd:$rt);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$ac, $rs, $rt");
|
string AsmString = !strconcat(instr_asm, "\t$ac, $rs, $rt");
|
||||||
list<dag> Pattern = [(set ACC64DSP:$ac, (OpNode GPR32:$rs, GPR32:$rt))];
|
list<dag> Pattern = [(set ACC64DSPOpnd:$ac, (OpNode GPR32Opnd:$rs, GPR32Opnd:$rt))];
|
||||||
InstrItinClass Itinerary = itin;
|
InstrItinClass Itinerary = itin;
|
||||||
int AddedComplexity = 20;
|
int AddedComplexity = 20;
|
||||||
bit isCommutable = 1;
|
bit isCommutable = 1;
|
||||||
@ -460,32 +460,32 @@ class MULT_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
|||||||
|
|
||||||
class MADD_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
class MADD_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
||||||
InstrItinClass itin> {
|
InstrItinClass itin> {
|
||||||
dag OutOperandList = (outs ACC64DSP:$ac);
|
dag OutOperandList = (outs ACC64DSPOpnd:$ac);
|
||||||
dag InOperandList = (ins GPR32:$rs, GPR32:$rt, ACC64DSP:$acin);
|
dag InOperandList = (ins GPR32Opnd:$rs, GPR32Opnd:$rt, ACC64DSPOpnd:$acin);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$ac, $rs, $rt");
|
string AsmString = !strconcat(instr_asm, "\t$ac, $rs, $rt");
|
||||||
list<dag> Pattern = [(set ACC64DSP:$ac,
|
list<dag> Pattern = [(set ACC64DSPOpnd:$ac,
|
||||||
(OpNode GPR32:$rs, GPR32:$rt, ACC64DSP:$acin))];
|
(OpNode GPR32Opnd:$rs, GPR32Opnd:$rt, ACC64DSPOpnd:$acin))];
|
||||||
InstrItinClass Itinerary = itin;
|
InstrItinClass Itinerary = itin;
|
||||||
int AddedComplexity = 20;
|
int AddedComplexity = 20;
|
||||||
string Constraints = "$acin = $ac";
|
string Constraints = "$acin = $ac";
|
||||||
}
|
}
|
||||||
|
|
||||||
class MFHI_DESC_BASE<string instr_asm, RegisterClass RC, InstrItinClass itin> {
|
class MFHI_DESC_BASE<string instr_asm, RegisterOperand RO, InstrItinClass itin> {
|
||||||
dag OutOperandList = (outs GPR32:$rd);
|
dag OutOperandList = (outs GPR32Opnd:$rd);
|
||||||
dag InOperandList = (ins RC:$ac);
|
dag InOperandList = (ins RO:$ac);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$rd, $ac");
|
string AsmString = !strconcat(instr_asm, "\t$rd, $ac");
|
||||||
InstrItinClass Itinerary = itin;
|
InstrItinClass Itinerary = itin;
|
||||||
}
|
}
|
||||||
|
|
||||||
class MTHI_DESC_BASE<string instr_asm, RegisterClass RC, InstrItinClass itin> {
|
class MTHI_DESC_BASE<string instr_asm, RegisterOperand RO, InstrItinClass itin> {
|
||||||
dag OutOperandList = (outs RC:$ac);
|
dag OutOperandList = (outs RO:$ac);
|
||||||
dag InOperandList = (ins GPR32:$rs);
|
dag InOperandList = (ins GPR32Opnd:$rs);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$rs, $ac");
|
string AsmString = !strconcat(instr_asm, "\t$rs, $ac");
|
||||||
InstrItinClass Itinerary = itin;
|
InstrItinClass Itinerary = itin;
|
||||||
}
|
}
|
||||||
|
|
||||||
class BPOSGE32_PSEUDO_DESC_BASE<SDPatternOperator OpNode, InstrItinClass itin> :
|
class BPOSGE32_PSEUDO_DESC_BASE<SDPatternOperator OpNode, InstrItinClass itin> :
|
||||||
MipsPseudo<(outs GPR32:$dst), (ins), [(set GPR32:$dst, (OpNode))]> {
|
MipsPseudo<(outs GPR32Opnd:$dst), (ins), [(set GPR32Opnd:$dst, (OpNode))]> {
|
||||||
bit usesCustomInserter = 1;
|
bit usesCustomInserter = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -501,10 +501,10 @@ class BPOSGE32_DESC_BASE<string instr_asm, InstrItinClass itin> {
|
|||||||
|
|
||||||
class INSV_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
class INSV_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
||||||
InstrItinClass itin> {
|
InstrItinClass itin> {
|
||||||
dag OutOperandList = (outs GPR32:$rt);
|
dag OutOperandList = (outs GPR32Opnd:$rt);
|
||||||
dag InOperandList = (ins GPR32:$src, GPR32:$rs);
|
dag InOperandList = (ins GPR32Opnd:$src, GPR32Opnd:$rs);
|
||||||
string AsmString = !strconcat(instr_asm, "\t$rt, $rs");
|
string AsmString = !strconcat(instr_asm, "\t$rt, $rs");
|
||||||
list<dag> Pattern = [(set GPR32:$rt, (OpNode GPR32:$src, GPR32:$rs))];
|
list<dag> Pattern = [(set GPR32Opnd:$rt, (OpNode GPR32Opnd:$src, GPR32Opnd:$rs))];
|
||||||
InstrItinClass Itinerary = itin;
|
InstrItinClass Itinerary = itin;
|
||||||
string Constraints = "$src = $rt";
|
string Constraints = "$src = $rt";
|
||||||
}
|
}
|
||||||
@ -515,209 +515,209 @@ class INSV_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
|||||||
|
|
||||||
// Addition/subtraction
|
// Addition/subtraction
|
||||||
class ADDU_QB_DESC : ADDU_QB_DESC_BASE<"addu.qb", null_frag, NoItinerary,
|
class ADDU_QB_DESC : ADDU_QB_DESC_BASE<"addu.qb", null_frag, NoItinerary,
|
||||||
DSPR, DSPR>, IsCommutable,
|
DSPROpnd, DSPROpnd>, IsCommutable,
|
||||||
Defs<[DSPOutFlag20]>;
|
Defs<[DSPOutFlag20]>;
|
||||||
|
|
||||||
class ADDU_S_QB_DESC : ADDU_QB_DESC_BASE<"addu_s.qb", int_mips_addu_s_qb,
|
class ADDU_S_QB_DESC : ADDU_QB_DESC_BASE<"addu_s.qb", int_mips_addu_s_qb,
|
||||||
NoItinerary, DSPR, DSPR>,
|
NoItinerary, DSPROpnd, DSPROpnd>,
|
||||||
IsCommutable, Defs<[DSPOutFlag20]>;
|
IsCommutable, Defs<[DSPOutFlag20]>;
|
||||||
|
|
||||||
class SUBU_QB_DESC : ADDU_QB_DESC_BASE<"subu.qb", null_frag, NoItinerary,
|
class SUBU_QB_DESC : ADDU_QB_DESC_BASE<"subu.qb", null_frag, NoItinerary,
|
||||||
DSPR, DSPR>,
|
DSPROpnd, DSPROpnd>,
|
||||||
Defs<[DSPOutFlag20]>;
|
Defs<[DSPOutFlag20]>;
|
||||||
|
|
||||||
class SUBU_S_QB_DESC : ADDU_QB_DESC_BASE<"subu_s.qb", int_mips_subu_s_qb,
|
class SUBU_S_QB_DESC : ADDU_QB_DESC_BASE<"subu_s.qb", int_mips_subu_s_qb,
|
||||||
NoItinerary, DSPR, DSPR>,
|
NoItinerary, DSPROpnd, DSPROpnd>,
|
||||||
Defs<[DSPOutFlag20]>;
|
Defs<[DSPOutFlag20]>;
|
||||||
|
|
||||||
class ADDQ_PH_DESC : ADDU_QB_DESC_BASE<"addq.ph", null_frag, NoItinerary,
|
class ADDQ_PH_DESC : ADDU_QB_DESC_BASE<"addq.ph", null_frag, NoItinerary,
|
||||||
DSPR, DSPR>, IsCommutable,
|
DSPROpnd, DSPROpnd>, IsCommutable,
|
||||||
Defs<[DSPOutFlag20]>;
|
Defs<[DSPOutFlag20]>;
|
||||||
|
|
||||||
class ADDQ_S_PH_DESC : ADDU_QB_DESC_BASE<"addq_s.ph", int_mips_addq_s_ph,
|
class ADDQ_S_PH_DESC : ADDU_QB_DESC_BASE<"addq_s.ph", int_mips_addq_s_ph,
|
||||||
NoItinerary, DSPR, DSPR>,
|
NoItinerary, DSPROpnd, DSPROpnd>,
|
||||||
IsCommutable, Defs<[DSPOutFlag20]>;
|
IsCommutable, Defs<[DSPOutFlag20]>;
|
||||||
|
|
||||||
class SUBQ_PH_DESC : ADDU_QB_DESC_BASE<"subq.ph", null_frag, NoItinerary,
|
class SUBQ_PH_DESC : ADDU_QB_DESC_BASE<"subq.ph", null_frag, NoItinerary,
|
||||||
DSPR, DSPR>,
|
DSPROpnd, DSPROpnd>,
|
||||||
Defs<[DSPOutFlag20]>;
|
Defs<[DSPOutFlag20]>;
|
||||||
|
|
||||||
class SUBQ_S_PH_DESC : ADDU_QB_DESC_BASE<"subq_s.ph", int_mips_subq_s_ph,
|
class SUBQ_S_PH_DESC : ADDU_QB_DESC_BASE<"subq_s.ph", int_mips_subq_s_ph,
|
||||||
NoItinerary, DSPR, DSPR>,
|
NoItinerary, DSPROpnd, DSPROpnd>,
|
||||||
Defs<[DSPOutFlag20]>;
|
Defs<[DSPOutFlag20]>;
|
||||||
|
|
||||||
class ADDQ_S_W_DESC : ADDU_QB_DESC_BASE<"addq_s.w", int_mips_addq_s_w,
|
class ADDQ_S_W_DESC : ADDU_QB_DESC_BASE<"addq_s.w", int_mips_addq_s_w,
|
||||||
NoItinerary, GPR32, GPR32>,
|
NoItinerary, GPR32Opnd, GPR32Opnd>,
|
||||||
IsCommutable, Defs<[DSPOutFlag20]>;
|
IsCommutable, Defs<[DSPOutFlag20]>;
|
||||||
|
|
||||||
class SUBQ_S_W_DESC : ADDU_QB_DESC_BASE<"subq_s.w", int_mips_subq_s_w,
|
class SUBQ_S_W_DESC : ADDU_QB_DESC_BASE<"subq_s.w", int_mips_subq_s_w,
|
||||||
NoItinerary, GPR32, GPR32>,
|
NoItinerary, GPR32Opnd, GPR32Opnd>,
|
||||||
Defs<[DSPOutFlag20]>;
|
Defs<[DSPOutFlag20]>;
|
||||||
|
|
||||||
class ADDSC_DESC : ADDU_QB_DESC_BASE<"addsc", null_frag, NoItinerary,
|
class ADDSC_DESC : ADDU_QB_DESC_BASE<"addsc", null_frag, NoItinerary,
|
||||||
GPR32, GPR32>, IsCommutable,
|
GPR32Opnd, GPR32Opnd>, IsCommutable,
|
||||||
Defs<[DSPCarry]>;
|
Defs<[DSPCarry]>;
|
||||||
|
|
||||||
class ADDWC_DESC : ADDU_QB_DESC_BASE<"addwc", null_frag, NoItinerary,
|
class ADDWC_DESC : ADDU_QB_DESC_BASE<"addwc", null_frag, NoItinerary,
|
||||||
GPR32, GPR32>,
|
GPR32Opnd, GPR32Opnd>,
|
||||||
IsCommutable, Uses<[DSPCarry]>, Defs<[DSPOutFlag20]>;
|
IsCommutable, Uses<[DSPCarry]>, Defs<[DSPOutFlag20]>;
|
||||||
|
|
||||||
class MODSUB_DESC : ADDU_QB_DESC_BASE<"modsub", int_mips_modsub, NoItinerary,
|
class MODSUB_DESC : ADDU_QB_DESC_BASE<"modsub", int_mips_modsub, NoItinerary,
|
||||||
GPR32, GPR32>;
|
GPR32Opnd, GPR32Opnd>;
|
||||||
|
|
||||||
class RADDU_W_QB_DESC : RADDU_W_QB_DESC_BASE<"raddu.w.qb", int_mips_raddu_w_qb,
|
class RADDU_W_QB_DESC : RADDU_W_QB_DESC_BASE<"raddu.w.qb", int_mips_raddu_w_qb,
|
||||||
NoItinerary, GPR32, DSPR>;
|
NoItinerary, GPR32Opnd, DSPROpnd>;
|
||||||
|
|
||||||
// Absolute value
|
// Absolute value
|
||||||
class ABSQ_S_PH_DESC : ABSQ_S_PH_R2_DESC_BASE<"absq_s.ph", int_mips_absq_s_ph,
|
class ABSQ_S_PH_DESC : ABSQ_S_PH_R2_DESC_BASE<"absq_s.ph", int_mips_absq_s_ph,
|
||||||
NoItinerary, DSPR>,
|
NoItinerary, DSPROpnd>,
|
||||||
Defs<[DSPOutFlag20]>;
|
Defs<[DSPOutFlag20]>;
|
||||||
|
|
||||||
class ABSQ_S_W_DESC : ABSQ_S_PH_R2_DESC_BASE<"absq_s.w", int_mips_absq_s_w,
|
class ABSQ_S_W_DESC : ABSQ_S_PH_R2_DESC_BASE<"absq_s.w", int_mips_absq_s_w,
|
||||||
NoItinerary, GPR32>,
|
NoItinerary, GPR32Opnd>,
|
||||||
Defs<[DSPOutFlag20]>;
|
Defs<[DSPOutFlag20]>;
|
||||||
|
|
||||||
// Precision reduce/expand
|
// Precision reduce/expand
|
||||||
class PRECRQ_QB_PH_DESC : CMP_EQ_QB_R3_DESC_BASE<"precrq.qb.ph",
|
class PRECRQ_QB_PH_DESC : CMP_EQ_QB_R3_DESC_BASE<"precrq.qb.ph",
|
||||||
int_mips_precrq_qb_ph,
|
int_mips_precrq_qb_ph,
|
||||||
NoItinerary, DSPR, DSPR>;
|
NoItinerary, DSPROpnd, DSPROpnd>;
|
||||||
|
|
||||||
class PRECRQ_PH_W_DESC : CMP_EQ_QB_R3_DESC_BASE<"precrq.ph.w",
|
class PRECRQ_PH_W_DESC : CMP_EQ_QB_R3_DESC_BASE<"precrq.ph.w",
|
||||||
int_mips_precrq_ph_w,
|
int_mips_precrq_ph_w,
|
||||||
NoItinerary, DSPR, GPR32>;
|
NoItinerary, DSPROpnd, GPR32Opnd>;
|
||||||
|
|
||||||
class PRECRQ_RS_PH_W_DESC : CMP_EQ_QB_R3_DESC_BASE<"precrq_rs.ph.w",
|
class PRECRQ_RS_PH_W_DESC : CMP_EQ_QB_R3_DESC_BASE<"precrq_rs.ph.w",
|
||||||
int_mips_precrq_rs_ph_w,
|
int_mips_precrq_rs_ph_w,
|
||||||
NoItinerary, DSPR,
|
NoItinerary, DSPROpnd,
|
||||||
GPR32>,
|
GPR32Opnd>,
|
||||||
Defs<[DSPOutFlag22]>;
|
Defs<[DSPOutFlag22]>;
|
||||||
|
|
||||||
class PRECRQU_S_QB_PH_DESC : CMP_EQ_QB_R3_DESC_BASE<"precrqu_s.qb.ph",
|
class PRECRQU_S_QB_PH_DESC : CMP_EQ_QB_R3_DESC_BASE<"precrqu_s.qb.ph",
|
||||||
int_mips_precrqu_s_qb_ph,
|
int_mips_precrqu_s_qb_ph,
|
||||||
NoItinerary, DSPR,
|
NoItinerary, DSPROpnd,
|
||||||
DSPR>,
|
DSPROpnd>,
|
||||||
Defs<[DSPOutFlag22]>;
|
Defs<[DSPOutFlag22]>;
|
||||||
|
|
||||||
class PRECEQ_W_PHL_DESC : ABSQ_S_PH_R2_DESC_BASE<"preceq.w.phl",
|
class PRECEQ_W_PHL_DESC : ABSQ_S_PH_R2_DESC_BASE<"preceq.w.phl",
|
||||||
int_mips_preceq_w_phl,
|
int_mips_preceq_w_phl,
|
||||||
NoItinerary, GPR32, DSPR>;
|
NoItinerary, GPR32Opnd, DSPROpnd>;
|
||||||
|
|
||||||
class PRECEQ_W_PHR_DESC : ABSQ_S_PH_R2_DESC_BASE<"preceq.w.phr",
|
class PRECEQ_W_PHR_DESC : ABSQ_S_PH_R2_DESC_BASE<"preceq.w.phr",
|
||||||
int_mips_preceq_w_phr,
|
int_mips_preceq_w_phr,
|
||||||
NoItinerary, GPR32, DSPR>;
|
NoItinerary, GPR32Opnd, DSPROpnd>;
|
||||||
|
|
||||||
class PRECEQU_PH_QBL_DESC : ABSQ_S_PH_R2_DESC_BASE<"precequ.ph.qbl",
|
class PRECEQU_PH_QBL_DESC : ABSQ_S_PH_R2_DESC_BASE<"precequ.ph.qbl",
|
||||||
int_mips_precequ_ph_qbl,
|
int_mips_precequ_ph_qbl,
|
||||||
NoItinerary, DSPR>;
|
NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
class PRECEQU_PH_QBR_DESC : ABSQ_S_PH_R2_DESC_BASE<"precequ.ph.qbr",
|
class PRECEQU_PH_QBR_DESC : ABSQ_S_PH_R2_DESC_BASE<"precequ.ph.qbr",
|
||||||
int_mips_precequ_ph_qbr,
|
int_mips_precequ_ph_qbr,
|
||||||
NoItinerary, DSPR>;
|
NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
class PRECEQU_PH_QBLA_DESC : ABSQ_S_PH_R2_DESC_BASE<"precequ.ph.qbla",
|
class PRECEQU_PH_QBLA_DESC : ABSQ_S_PH_R2_DESC_BASE<"precequ.ph.qbla",
|
||||||
int_mips_precequ_ph_qbla,
|
int_mips_precequ_ph_qbla,
|
||||||
NoItinerary, DSPR>;
|
NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
class PRECEQU_PH_QBRA_DESC : ABSQ_S_PH_R2_DESC_BASE<"precequ.ph.qbra",
|
class PRECEQU_PH_QBRA_DESC : ABSQ_S_PH_R2_DESC_BASE<"precequ.ph.qbra",
|
||||||
int_mips_precequ_ph_qbra,
|
int_mips_precequ_ph_qbra,
|
||||||
NoItinerary, DSPR>;
|
NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
class PRECEU_PH_QBL_DESC : ABSQ_S_PH_R2_DESC_BASE<"preceu.ph.qbl",
|
class PRECEU_PH_QBL_DESC : ABSQ_S_PH_R2_DESC_BASE<"preceu.ph.qbl",
|
||||||
int_mips_preceu_ph_qbl,
|
int_mips_preceu_ph_qbl,
|
||||||
NoItinerary, DSPR>;
|
NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
class PRECEU_PH_QBR_DESC : ABSQ_S_PH_R2_DESC_BASE<"preceu.ph.qbr",
|
class PRECEU_PH_QBR_DESC : ABSQ_S_PH_R2_DESC_BASE<"preceu.ph.qbr",
|
||||||
int_mips_preceu_ph_qbr,
|
int_mips_preceu_ph_qbr,
|
||||||
NoItinerary, DSPR>;
|
NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
class PRECEU_PH_QBLA_DESC : ABSQ_S_PH_R2_DESC_BASE<"preceu.ph.qbla",
|
class PRECEU_PH_QBLA_DESC : ABSQ_S_PH_R2_DESC_BASE<"preceu.ph.qbla",
|
||||||
int_mips_preceu_ph_qbla,
|
int_mips_preceu_ph_qbla,
|
||||||
NoItinerary, DSPR>;
|
NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
class PRECEU_PH_QBRA_DESC : ABSQ_S_PH_R2_DESC_BASE<"preceu.ph.qbra",
|
class PRECEU_PH_QBRA_DESC : ABSQ_S_PH_R2_DESC_BASE<"preceu.ph.qbra",
|
||||||
int_mips_preceu_ph_qbra,
|
int_mips_preceu_ph_qbra,
|
||||||
NoItinerary, DSPR>;
|
NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
// Shift
|
// Shift
|
||||||
class SHLL_QB_DESC : SHLL_QB_R2_DESC_BASE<"shll.qb", null_frag, immZExt3,
|
class SHLL_QB_DESC : SHLL_QB_R2_DESC_BASE<"shll.qb", null_frag, immZExt3,
|
||||||
NoItinerary, DSPR>,
|
NoItinerary, DSPROpnd>,
|
||||||
Defs<[DSPOutFlag22]>;
|
Defs<[DSPOutFlag22]>;
|
||||||
|
|
||||||
class SHLLV_QB_DESC : SHLL_QB_R3_DESC_BASE<"shllv.qb", int_mips_shll_qb,
|
class SHLLV_QB_DESC : SHLL_QB_R3_DESC_BASE<"shllv.qb", int_mips_shll_qb,
|
||||||
NoItinerary, DSPR>,
|
NoItinerary, DSPROpnd>,
|
||||||
Defs<[DSPOutFlag22]>;
|
Defs<[DSPOutFlag22]>;
|
||||||
|
|
||||||
class SHRL_QB_DESC : SHLL_QB_R2_DESC_BASE<"shrl.qb", null_frag, immZExt3,
|
class SHRL_QB_DESC : SHLL_QB_R2_DESC_BASE<"shrl.qb", null_frag, immZExt3,
|
||||||
NoItinerary, DSPR>;
|
NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
class SHRLV_QB_DESC : SHLL_QB_R3_DESC_BASE<"shrlv.qb", int_mips_shrl_qb,
|
class SHRLV_QB_DESC : SHLL_QB_R3_DESC_BASE<"shrlv.qb", int_mips_shrl_qb,
|
||||||
NoItinerary, DSPR>;
|
NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
class SHLL_PH_DESC : SHLL_QB_R2_DESC_BASE<"shll.ph", null_frag, immZExt4,
|
class SHLL_PH_DESC : SHLL_QB_R2_DESC_BASE<"shll.ph", null_frag, immZExt4,
|
||||||
NoItinerary, DSPR>,
|
NoItinerary, DSPROpnd>,
|
||||||
Defs<[DSPOutFlag22]>;
|
Defs<[DSPOutFlag22]>;
|
||||||
|
|
||||||
class SHLLV_PH_DESC : SHLL_QB_R3_DESC_BASE<"shllv.ph", int_mips_shll_ph,
|
class SHLLV_PH_DESC : SHLL_QB_R3_DESC_BASE<"shllv.ph", int_mips_shll_ph,
|
||||||
NoItinerary, DSPR>,
|
NoItinerary, DSPROpnd>,
|
||||||
Defs<[DSPOutFlag22]>;
|
Defs<[DSPOutFlag22]>;
|
||||||
|
|
||||||
class SHLL_S_PH_DESC : SHLL_QB_R2_DESC_BASE<"shll_s.ph", int_mips_shll_s_ph,
|
class SHLL_S_PH_DESC : SHLL_QB_R2_DESC_BASE<"shll_s.ph", int_mips_shll_s_ph,
|
||||||
immZExt4, NoItinerary, DSPR>,
|
immZExt4, NoItinerary, DSPROpnd>,
|
||||||
Defs<[DSPOutFlag22]>;
|
Defs<[DSPOutFlag22]>;
|
||||||
|
|
||||||
class SHLLV_S_PH_DESC : SHLL_QB_R3_DESC_BASE<"shllv_s.ph", int_mips_shll_s_ph,
|
class SHLLV_S_PH_DESC : SHLL_QB_R3_DESC_BASE<"shllv_s.ph", int_mips_shll_s_ph,
|
||||||
NoItinerary, DSPR>,
|
NoItinerary, DSPROpnd>,
|
||||||
Defs<[DSPOutFlag22]>;
|
Defs<[DSPOutFlag22]>;
|
||||||
|
|
||||||
class SHRA_PH_DESC : SHLL_QB_R2_DESC_BASE<"shra.ph", null_frag, immZExt4,
|
class SHRA_PH_DESC : SHLL_QB_R2_DESC_BASE<"shra.ph", null_frag, immZExt4,
|
||||||
NoItinerary, DSPR>;
|
NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
class SHRAV_PH_DESC : SHLL_QB_R3_DESC_BASE<"shrav.ph", int_mips_shra_ph,
|
class SHRAV_PH_DESC : SHLL_QB_R3_DESC_BASE<"shrav.ph", int_mips_shra_ph,
|
||||||
NoItinerary, DSPR>;
|
NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
class SHRA_R_PH_DESC : SHLL_QB_R2_DESC_BASE<"shra_r.ph", int_mips_shra_r_ph,
|
class SHRA_R_PH_DESC : SHLL_QB_R2_DESC_BASE<"shra_r.ph", int_mips_shra_r_ph,
|
||||||
immZExt4, NoItinerary, DSPR>;
|
immZExt4, NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
class SHRAV_R_PH_DESC : SHLL_QB_R3_DESC_BASE<"shrav_r.ph", int_mips_shra_r_ph,
|
class SHRAV_R_PH_DESC : SHLL_QB_R3_DESC_BASE<"shrav_r.ph", int_mips_shra_r_ph,
|
||||||
NoItinerary, DSPR>;
|
NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
class SHLL_S_W_DESC : SHLL_QB_R2_DESC_BASE<"shll_s.w", int_mips_shll_s_w,
|
class SHLL_S_W_DESC : SHLL_QB_R2_DESC_BASE<"shll_s.w", int_mips_shll_s_w,
|
||||||
immZExt5, NoItinerary, GPR32>,
|
immZExt5, NoItinerary, GPR32Opnd>,
|
||||||
Defs<[DSPOutFlag22]>;
|
Defs<[DSPOutFlag22]>;
|
||||||
|
|
||||||
class SHLLV_S_W_DESC : SHLL_QB_R3_DESC_BASE<"shllv_s.w", int_mips_shll_s_w,
|
class SHLLV_S_W_DESC : SHLL_QB_R3_DESC_BASE<"shllv_s.w", int_mips_shll_s_w,
|
||||||
NoItinerary, GPR32>,
|
NoItinerary, GPR32Opnd>,
|
||||||
Defs<[DSPOutFlag22]>;
|
Defs<[DSPOutFlag22]>;
|
||||||
|
|
||||||
class SHRA_R_W_DESC : SHLL_QB_R2_DESC_BASE<"shra_r.w", int_mips_shra_r_w,
|
class SHRA_R_W_DESC : SHLL_QB_R2_DESC_BASE<"shra_r.w", int_mips_shra_r_w,
|
||||||
immZExt5, NoItinerary, GPR32>;
|
immZExt5, NoItinerary, GPR32Opnd>;
|
||||||
|
|
||||||
class SHRAV_R_W_DESC : SHLL_QB_R3_DESC_BASE<"shrav_r.w", int_mips_shra_r_w,
|
class SHRAV_R_W_DESC : SHLL_QB_R3_DESC_BASE<"shrav_r.w", int_mips_shra_r_w,
|
||||||
NoItinerary, GPR32>;
|
NoItinerary, GPR32Opnd>;
|
||||||
|
|
||||||
// Multiplication
|
// Multiplication
|
||||||
class MULEU_S_PH_QBL_DESC : ADDU_QB_DESC_BASE<"muleu_s.ph.qbl",
|
class MULEU_S_PH_QBL_DESC : ADDU_QB_DESC_BASE<"muleu_s.ph.qbl",
|
||||||
int_mips_muleu_s_ph_qbl,
|
int_mips_muleu_s_ph_qbl,
|
||||||
NoItinerary, DSPR, DSPR>,
|
NoItinerary, DSPROpnd, DSPROpnd>,
|
||||||
Defs<[DSPOutFlag21]>;
|
Defs<[DSPOutFlag21]>;
|
||||||
|
|
||||||
class MULEU_S_PH_QBR_DESC : ADDU_QB_DESC_BASE<"muleu_s.ph.qbr",
|
class MULEU_S_PH_QBR_DESC : ADDU_QB_DESC_BASE<"muleu_s.ph.qbr",
|
||||||
int_mips_muleu_s_ph_qbr,
|
int_mips_muleu_s_ph_qbr,
|
||||||
NoItinerary, DSPR, DSPR>,
|
NoItinerary, DSPROpnd, DSPROpnd>,
|
||||||
Defs<[DSPOutFlag21]>;
|
Defs<[DSPOutFlag21]>;
|
||||||
|
|
||||||
class MULEQ_S_W_PHL_DESC : ADDU_QB_DESC_BASE<"muleq_s.w.phl",
|
class MULEQ_S_W_PHL_DESC : ADDU_QB_DESC_BASE<"muleq_s.w.phl",
|
||||||
int_mips_muleq_s_w_phl,
|
int_mips_muleq_s_w_phl,
|
||||||
NoItinerary, GPR32, DSPR>,
|
NoItinerary, GPR32Opnd, DSPROpnd>,
|
||||||
IsCommutable, Defs<[DSPOutFlag21]>;
|
IsCommutable, Defs<[DSPOutFlag21]>;
|
||||||
|
|
||||||
class MULEQ_S_W_PHR_DESC : ADDU_QB_DESC_BASE<"muleq_s.w.phr",
|
class MULEQ_S_W_PHR_DESC : ADDU_QB_DESC_BASE<"muleq_s.w.phr",
|
||||||
int_mips_muleq_s_w_phr,
|
int_mips_muleq_s_w_phr,
|
||||||
NoItinerary, GPR32, DSPR>,
|
NoItinerary, GPR32Opnd, DSPROpnd>,
|
||||||
IsCommutable, Defs<[DSPOutFlag21]>;
|
IsCommutable, Defs<[DSPOutFlag21]>;
|
||||||
|
|
||||||
class MULQ_RS_PH_DESC : ADDU_QB_DESC_BASE<"mulq_rs.ph", int_mips_mulq_rs_ph,
|
class MULQ_RS_PH_DESC : ADDU_QB_DESC_BASE<"mulq_rs.ph", int_mips_mulq_rs_ph,
|
||||||
NoItinerary, DSPR, DSPR>,
|
NoItinerary, DSPROpnd, DSPROpnd>,
|
||||||
IsCommutable, Defs<[DSPOutFlag21]>;
|
IsCommutable, Defs<[DSPOutFlag21]>;
|
||||||
|
|
||||||
class MULSAQ_S_W_PH_DESC : DPA_W_PH_DESC_BASE<"mulsaq_s.w.ph",
|
class MULSAQ_S_W_PH_DESC : DPA_W_PH_DESC_BASE<"mulsaq_s.w.ph",
|
||||||
@ -737,10 +737,10 @@ class MAQ_SA_W_PHR_DESC : DPA_W_PH_DESC_BASE<"maq_sa.w.phr", MipsMAQ_SA_W_PHR>,
|
|||||||
Defs<[DSPOutFlag16_19]>;
|
Defs<[DSPOutFlag16_19]>;
|
||||||
|
|
||||||
// Move from/to hi/lo.
|
// Move from/to hi/lo.
|
||||||
class MFHI_DESC : MFHI_DESC_BASE<"mfhi", HI32DSP, NoItinerary>;
|
class MFHI_DESC : MFHI_DESC_BASE<"mfhi", HI32DSPOpnd, NoItinerary>;
|
||||||
class MFLO_DESC : MFHI_DESC_BASE<"mflo", LO32DSP, NoItinerary>;
|
class MFLO_DESC : MFHI_DESC_BASE<"mflo", LO32DSPOpnd, NoItinerary>;
|
||||||
class MTHI_DESC : MTHI_DESC_BASE<"mthi", HI32DSP, NoItinerary>;
|
class MTHI_DESC : MTHI_DESC_BASE<"mthi", HI32DSPOpnd, NoItinerary>;
|
||||||
class MTLO_DESC : MTHI_DESC_BASE<"mtlo", LO32DSP, NoItinerary>;
|
class MTLO_DESC : MTHI_DESC_BASE<"mtlo", LO32DSPOpnd, NoItinerary>;
|
||||||
|
|
||||||
// Dot product with accumulate/subtract
|
// Dot product with accumulate/subtract
|
||||||
class DPAU_H_QBL_DESC : DPA_W_PH_DESC_BASE<"dpau.h.qbl", MipsDPAU_H_QBL>;
|
class DPAU_H_QBL_DESC : DPA_W_PH_DESC_BASE<"dpau.h.qbl", MipsDPAU_H_QBL>;
|
||||||
@ -773,67 +773,67 @@ class MSUBU_DSP_DESC : MADD_DESC_BASE<"msubu", MipsMSubu, NoItinerary>;
|
|||||||
// Comparison
|
// Comparison
|
||||||
class CMPU_EQ_QB_DESC : CMP_EQ_QB_R2_DESC_BASE<"cmpu.eq.qb",
|
class CMPU_EQ_QB_DESC : CMP_EQ_QB_R2_DESC_BASE<"cmpu.eq.qb",
|
||||||
int_mips_cmpu_eq_qb, NoItinerary,
|
int_mips_cmpu_eq_qb, NoItinerary,
|
||||||
DSPR>,
|
DSPROpnd>,
|
||||||
IsCommutable, Defs<[DSPCCond]>;
|
IsCommutable, Defs<[DSPCCond]>;
|
||||||
|
|
||||||
class CMPU_LT_QB_DESC : CMP_EQ_QB_R2_DESC_BASE<"cmpu.lt.qb",
|
class CMPU_LT_QB_DESC : CMP_EQ_QB_R2_DESC_BASE<"cmpu.lt.qb",
|
||||||
int_mips_cmpu_lt_qb, NoItinerary,
|
int_mips_cmpu_lt_qb, NoItinerary,
|
||||||
DSPR>, Defs<[DSPCCond]>;
|
DSPROpnd>, Defs<[DSPCCond]>;
|
||||||
|
|
||||||
class CMPU_LE_QB_DESC : CMP_EQ_QB_R2_DESC_BASE<"cmpu.le.qb",
|
class CMPU_LE_QB_DESC : CMP_EQ_QB_R2_DESC_BASE<"cmpu.le.qb",
|
||||||
int_mips_cmpu_le_qb, NoItinerary,
|
int_mips_cmpu_le_qb, NoItinerary,
|
||||||
DSPR>, Defs<[DSPCCond]>;
|
DSPROpnd>, Defs<[DSPCCond]>;
|
||||||
|
|
||||||
class CMPGU_EQ_QB_DESC : CMP_EQ_QB_R3_DESC_BASE<"cmpgu.eq.qb",
|
class CMPGU_EQ_QB_DESC : CMP_EQ_QB_R3_DESC_BASE<"cmpgu.eq.qb",
|
||||||
int_mips_cmpgu_eq_qb,
|
int_mips_cmpgu_eq_qb,
|
||||||
NoItinerary, GPR32, DSPR>,
|
NoItinerary, GPR32Opnd, DSPROpnd>,
|
||||||
IsCommutable;
|
IsCommutable;
|
||||||
|
|
||||||
class CMPGU_LT_QB_DESC : CMP_EQ_QB_R3_DESC_BASE<"cmpgu.lt.qb",
|
class CMPGU_LT_QB_DESC : CMP_EQ_QB_R3_DESC_BASE<"cmpgu.lt.qb",
|
||||||
int_mips_cmpgu_lt_qb,
|
int_mips_cmpgu_lt_qb,
|
||||||
NoItinerary, GPR32, DSPR>;
|
NoItinerary, GPR32Opnd, DSPROpnd>;
|
||||||
|
|
||||||
class CMPGU_LE_QB_DESC : CMP_EQ_QB_R3_DESC_BASE<"cmpgu.le.qb",
|
class CMPGU_LE_QB_DESC : CMP_EQ_QB_R3_DESC_BASE<"cmpgu.le.qb",
|
||||||
int_mips_cmpgu_le_qb,
|
int_mips_cmpgu_le_qb,
|
||||||
NoItinerary, GPR32, DSPR>;
|
NoItinerary, GPR32Opnd, DSPROpnd>;
|
||||||
|
|
||||||
class CMP_EQ_PH_DESC : CMP_EQ_QB_R2_DESC_BASE<"cmp.eq.ph", int_mips_cmp_eq_ph,
|
class CMP_EQ_PH_DESC : CMP_EQ_QB_R2_DESC_BASE<"cmp.eq.ph", int_mips_cmp_eq_ph,
|
||||||
NoItinerary, DSPR>,
|
NoItinerary, DSPROpnd>,
|
||||||
IsCommutable, Defs<[DSPCCond]>;
|
IsCommutable, Defs<[DSPCCond]>;
|
||||||
|
|
||||||
class CMP_LT_PH_DESC : CMP_EQ_QB_R2_DESC_BASE<"cmp.lt.ph", int_mips_cmp_lt_ph,
|
class CMP_LT_PH_DESC : CMP_EQ_QB_R2_DESC_BASE<"cmp.lt.ph", int_mips_cmp_lt_ph,
|
||||||
NoItinerary, DSPR>,
|
NoItinerary, DSPROpnd>,
|
||||||
Defs<[DSPCCond]>;
|
Defs<[DSPCCond]>;
|
||||||
|
|
||||||
class CMP_LE_PH_DESC : CMP_EQ_QB_R2_DESC_BASE<"cmp.le.ph", int_mips_cmp_le_ph,
|
class CMP_LE_PH_DESC : CMP_EQ_QB_R2_DESC_BASE<"cmp.le.ph", int_mips_cmp_le_ph,
|
||||||
NoItinerary, DSPR>,
|
NoItinerary, DSPROpnd>,
|
||||||
Defs<[DSPCCond]>;
|
Defs<[DSPCCond]>;
|
||||||
|
|
||||||
// Misc
|
// Misc
|
||||||
class BITREV_DESC : ABSQ_S_PH_R2_DESC_BASE<"bitrev", int_mips_bitrev,
|
class BITREV_DESC : ABSQ_S_PH_R2_DESC_BASE<"bitrev", int_mips_bitrev,
|
||||||
NoItinerary, GPR32>;
|
NoItinerary, GPR32Opnd>;
|
||||||
|
|
||||||
class PACKRL_PH_DESC : CMP_EQ_QB_R3_DESC_BASE<"packrl.ph", int_mips_packrl_ph,
|
class PACKRL_PH_DESC : CMP_EQ_QB_R3_DESC_BASE<"packrl.ph", int_mips_packrl_ph,
|
||||||
NoItinerary, DSPR, DSPR>;
|
NoItinerary, DSPROpnd, DSPROpnd>;
|
||||||
|
|
||||||
class REPL_QB_DESC : REPL_DESC_BASE<"repl.qb", int_mips_repl_qb, immZExt8,
|
class REPL_QB_DESC : REPL_DESC_BASE<"repl.qb", int_mips_repl_qb, immZExt8,
|
||||||
NoItinerary, DSPR>;
|
NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
class REPL_PH_DESC : REPL_DESC_BASE<"repl.ph", int_mips_repl_ph, immZExt10,
|
class REPL_PH_DESC : REPL_DESC_BASE<"repl.ph", int_mips_repl_ph, immZExt10,
|
||||||
NoItinerary, DSPR>;
|
NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
class REPLV_QB_DESC : ABSQ_S_PH_R2_DESC_BASE<"replv.qb", int_mips_repl_qb,
|
class REPLV_QB_DESC : ABSQ_S_PH_R2_DESC_BASE<"replv.qb", int_mips_repl_qb,
|
||||||
NoItinerary, DSPR, GPR32>;
|
NoItinerary, DSPROpnd, GPR32Opnd>;
|
||||||
|
|
||||||
class REPLV_PH_DESC : ABSQ_S_PH_R2_DESC_BASE<"replv.ph", int_mips_repl_ph,
|
class REPLV_PH_DESC : ABSQ_S_PH_R2_DESC_BASE<"replv.ph", int_mips_repl_ph,
|
||||||
NoItinerary, DSPR, GPR32>;
|
NoItinerary, DSPROpnd, GPR32Opnd>;
|
||||||
|
|
||||||
class PICK_QB_DESC : CMP_EQ_QB_R3_DESC_BASE<"pick.qb", int_mips_pick_qb,
|
class PICK_QB_DESC : CMP_EQ_QB_R3_DESC_BASE<"pick.qb", int_mips_pick_qb,
|
||||||
NoItinerary, DSPR, DSPR>,
|
NoItinerary, DSPROpnd, DSPROpnd>,
|
||||||
Uses<[DSPCCond]>;
|
Uses<[DSPCCond]>;
|
||||||
|
|
||||||
class PICK_PH_DESC : CMP_EQ_QB_R3_DESC_BASE<"pick.ph", int_mips_pick_ph,
|
class PICK_PH_DESC : CMP_EQ_QB_R3_DESC_BASE<"pick.ph", int_mips_pick_ph,
|
||||||
NoItinerary, DSPR, DSPR>,
|
NoItinerary, DSPROpnd, DSPROpnd>,
|
||||||
Uses<[DSPCCond]>;
|
Uses<[DSPCCond]>;
|
||||||
|
|
||||||
class LWX_DESC : LX_DESC_BASE<"lwx", int_mips_lwx, NoItinerary>;
|
class LWX_DESC : LX_DESC_BASE<"lwx", int_mips_lwx, NoItinerary>;
|
||||||
@ -905,97 +905,97 @@ class INSV_DESC : INSV_DESC_BASE<"insv", int_mips_insv, NoItinerary>,
|
|||||||
// MIPS DSP Rev 2
|
// MIPS DSP Rev 2
|
||||||
// Addition/subtraction
|
// Addition/subtraction
|
||||||
class ADDU_PH_DESC : ADDU_QB_DESC_BASE<"addu.ph", int_mips_addu_ph, NoItinerary,
|
class ADDU_PH_DESC : ADDU_QB_DESC_BASE<"addu.ph", int_mips_addu_ph, NoItinerary,
|
||||||
DSPR, DSPR>, IsCommutable,
|
DSPROpnd, DSPROpnd>, IsCommutable,
|
||||||
Defs<[DSPOutFlag20]>;
|
Defs<[DSPOutFlag20]>;
|
||||||
|
|
||||||
class ADDU_S_PH_DESC : ADDU_QB_DESC_BASE<"addu_s.ph", int_mips_addu_s_ph,
|
class ADDU_S_PH_DESC : ADDU_QB_DESC_BASE<"addu_s.ph", int_mips_addu_s_ph,
|
||||||
NoItinerary, DSPR, DSPR>,
|
NoItinerary, DSPROpnd, DSPROpnd>,
|
||||||
IsCommutable, Defs<[DSPOutFlag20]>;
|
IsCommutable, Defs<[DSPOutFlag20]>;
|
||||||
|
|
||||||
class SUBU_PH_DESC : ADDU_QB_DESC_BASE<"subu.ph", int_mips_subu_ph, NoItinerary,
|
class SUBU_PH_DESC : ADDU_QB_DESC_BASE<"subu.ph", int_mips_subu_ph, NoItinerary,
|
||||||
DSPR, DSPR>,
|
DSPROpnd, DSPROpnd>,
|
||||||
Defs<[DSPOutFlag20]>;
|
Defs<[DSPOutFlag20]>;
|
||||||
|
|
||||||
class SUBU_S_PH_DESC : ADDU_QB_DESC_BASE<"subu_s.ph", int_mips_subu_s_ph,
|
class SUBU_S_PH_DESC : ADDU_QB_DESC_BASE<"subu_s.ph", int_mips_subu_s_ph,
|
||||||
NoItinerary, DSPR, DSPR>,
|
NoItinerary, DSPROpnd, DSPROpnd>,
|
||||||
Defs<[DSPOutFlag20]>;
|
Defs<[DSPOutFlag20]>;
|
||||||
|
|
||||||
class ADDUH_QB_DESC : ADDUH_QB_DESC_BASE<"adduh.qb", int_mips_adduh_qb,
|
class ADDUH_QB_DESC : ADDUH_QB_DESC_BASE<"adduh.qb", int_mips_adduh_qb,
|
||||||
NoItinerary, DSPR>, IsCommutable;
|
NoItinerary, DSPROpnd>, IsCommutable;
|
||||||
|
|
||||||
class ADDUH_R_QB_DESC : ADDUH_QB_DESC_BASE<"adduh_r.qb", int_mips_adduh_r_qb,
|
class ADDUH_R_QB_DESC : ADDUH_QB_DESC_BASE<"adduh_r.qb", int_mips_adduh_r_qb,
|
||||||
NoItinerary, DSPR>, IsCommutable;
|
NoItinerary, DSPROpnd>, IsCommutable;
|
||||||
|
|
||||||
class SUBUH_QB_DESC : ADDUH_QB_DESC_BASE<"subuh.qb", int_mips_subuh_qb,
|
class SUBUH_QB_DESC : ADDUH_QB_DESC_BASE<"subuh.qb", int_mips_subuh_qb,
|
||||||
NoItinerary, DSPR>;
|
NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
class SUBUH_R_QB_DESC : ADDUH_QB_DESC_BASE<"subuh_r.qb", int_mips_subuh_r_qb,
|
class SUBUH_R_QB_DESC : ADDUH_QB_DESC_BASE<"subuh_r.qb", int_mips_subuh_r_qb,
|
||||||
NoItinerary, DSPR>;
|
NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
class ADDQH_PH_DESC : ADDUH_QB_DESC_BASE<"addqh.ph", int_mips_addqh_ph,
|
class ADDQH_PH_DESC : ADDUH_QB_DESC_BASE<"addqh.ph", int_mips_addqh_ph,
|
||||||
NoItinerary, DSPR>, IsCommutable;
|
NoItinerary, DSPROpnd>, IsCommutable;
|
||||||
|
|
||||||
class ADDQH_R_PH_DESC : ADDUH_QB_DESC_BASE<"addqh_r.ph", int_mips_addqh_r_ph,
|
class ADDQH_R_PH_DESC : ADDUH_QB_DESC_BASE<"addqh_r.ph", int_mips_addqh_r_ph,
|
||||||
NoItinerary, DSPR>, IsCommutable;
|
NoItinerary, DSPROpnd>, IsCommutable;
|
||||||
|
|
||||||
class SUBQH_PH_DESC : ADDUH_QB_DESC_BASE<"subqh.ph", int_mips_subqh_ph,
|
class SUBQH_PH_DESC : ADDUH_QB_DESC_BASE<"subqh.ph", int_mips_subqh_ph,
|
||||||
NoItinerary, DSPR>;
|
NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
class SUBQH_R_PH_DESC : ADDUH_QB_DESC_BASE<"subqh_r.ph", int_mips_subqh_r_ph,
|
class SUBQH_R_PH_DESC : ADDUH_QB_DESC_BASE<"subqh_r.ph", int_mips_subqh_r_ph,
|
||||||
NoItinerary, DSPR>;
|
NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
class ADDQH_W_DESC : ADDUH_QB_DESC_BASE<"addqh.w", int_mips_addqh_w,
|
class ADDQH_W_DESC : ADDUH_QB_DESC_BASE<"addqh.w", int_mips_addqh_w,
|
||||||
NoItinerary, GPR32>, IsCommutable;
|
NoItinerary, GPR32Opnd>, IsCommutable;
|
||||||
|
|
||||||
class ADDQH_R_W_DESC : ADDUH_QB_DESC_BASE<"addqh_r.w", int_mips_addqh_r_w,
|
class ADDQH_R_W_DESC : ADDUH_QB_DESC_BASE<"addqh_r.w", int_mips_addqh_r_w,
|
||||||
NoItinerary, GPR32>, IsCommutable;
|
NoItinerary, GPR32Opnd>, IsCommutable;
|
||||||
|
|
||||||
class SUBQH_W_DESC : ADDUH_QB_DESC_BASE<"subqh.w", int_mips_subqh_w,
|
class SUBQH_W_DESC : ADDUH_QB_DESC_BASE<"subqh.w", int_mips_subqh_w,
|
||||||
NoItinerary, GPR32>;
|
NoItinerary, GPR32Opnd>;
|
||||||
|
|
||||||
class SUBQH_R_W_DESC : ADDUH_QB_DESC_BASE<"subqh_r.w", int_mips_subqh_r_w,
|
class SUBQH_R_W_DESC : ADDUH_QB_DESC_BASE<"subqh_r.w", int_mips_subqh_r_w,
|
||||||
NoItinerary, GPR32>;
|
NoItinerary, GPR32Opnd>;
|
||||||
|
|
||||||
// Comparison
|
// Comparison
|
||||||
class CMPGDU_EQ_QB_DESC : CMP_EQ_QB_R3_DESC_BASE<"cmpgdu.eq.qb",
|
class CMPGDU_EQ_QB_DESC : CMP_EQ_QB_R3_DESC_BASE<"cmpgdu.eq.qb",
|
||||||
int_mips_cmpgdu_eq_qb,
|
int_mips_cmpgdu_eq_qb,
|
||||||
NoItinerary, GPR32, DSPR>,
|
NoItinerary, GPR32Opnd, DSPROpnd>,
|
||||||
IsCommutable, Defs<[DSPCCond]>;
|
IsCommutable, Defs<[DSPCCond]>;
|
||||||
|
|
||||||
class CMPGDU_LT_QB_DESC : CMP_EQ_QB_R3_DESC_BASE<"cmpgdu.lt.qb",
|
class CMPGDU_LT_QB_DESC : CMP_EQ_QB_R3_DESC_BASE<"cmpgdu.lt.qb",
|
||||||
int_mips_cmpgdu_lt_qb,
|
int_mips_cmpgdu_lt_qb,
|
||||||
NoItinerary, GPR32, DSPR>,
|
NoItinerary, GPR32Opnd, DSPROpnd>,
|
||||||
Defs<[DSPCCond]>;
|
Defs<[DSPCCond]>;
|
||||||
|
|
||||||
class CMPGDU_LE_QB_DESC : CMP_EQ_QB_R3_DESC_BASE<"cmpgdu.le.qb",
|
class CMPGDU_LE_QB_DESC : CMP_EQ_QB_R3_DESC_BASE<"cmpgdu.le.qb",
|
||||||
int_mips_cmpgdu_le_qb,
|
int_mips_cmpgdu_le_qb,
|
||||||
NoItinerary, GPR32, DSPR>,
|
NoItinerary, GPR32Opnd, DSPROpnd>,
|
||||||
Defs<[DSPCCond]>;
|
Defs<[DSPCCond]>;
|
||||||
|
|
||||||
// Absolute
|
// Absolute
|
||||||
class ABSQ_S_QB_DESC : ABSQ_S_PH_R2_DESC_BASE<"absq_s.qb", int_mips_absq_s_qb,
|
class ABSQ_S_QB_DESC : ABSQ_S_PH_R2_DESC_BASE<"absq_s.qb", int_mips_absq_s_qb,
|
||||||
NoItinerary, DSPR>,
|
NoItinerary, DSPROpnd>,
|
||||||
Defs<[DSPOutFlag20]>;
|
Defs<[DSPOutFlag20]>;
|
||||||
|
|
||||||
// Multiplication
|
// Multiplication
|
||||||
class MUL_PH_DESC : ADDUH_QB_DESC_BASE<"mul.ph", null_frag, NoItinerary,
|
class MUL_PH_DESC : ADDUH_QB_DESC_BASE<"mul.ph", null_frag, NoItinerary,
|
||||||
DSPR>, IsCommutable,
|
DSPROpnd>, IsCommutable,
|
||||||
Defs<[DSPOutFlag21]>;
|
Defs<[DSPOutFlag21]>;
|
||||||
|
|
||||||
class MUL_S_PH_DESC : ADDUH_QB_DESC_BASE<"mul_s.ph", int_mips_mul_s_ph,
|
class MUL_S_PH_DESC : ADDUH_QB_DESC_BASE<"mul_s.ph", int_mips_mul_s_ph,
|
||||||
NoItinerary, DSPR>, IsCommutable,
|
NoItinerary, DSPROpnd>, IsCommutable,
|
||||||
Defs<[DSPOutFlag21]>;
|
Defs<[DSPOutFlag21]>;
|
||||||
|
|
||||||
class MULQ_S_W_DESC : ADDUH_QB_DESC_BASE<"mulq_s.w", int_mips_mulq_s_w,
|
class MULQ_S_W_DESC : ADDUH_QB_DESC_BASE<"mulq_s.w", int_mips_mulq_s_w,
|
||||||
NoItinerary, GPR32>, IsCommutable,
|
NoItinerary, GPR32Opnd>, IsCommutable,
|
||||||
Defs<[DSPOutFlag21]>;
|
Defs<[DSPOutFlag21]>;
|
||||||
|
|
||||||
class MULQ_RS_W_DESC : ADDUH_QB_DESC_BASE<"mulq_rs.w", int_mips_mulq_rs_w,
|
class MULQ_RS_W_DESC : ADDUH_QB_DESC_BASE<"mulq_rs.w", int_mips_mulq_rs_w,
|
||||||
NoItinerary, GPR32>, IsCommutable,
|
NoItinerary, GPR32Opnd>, IsCommutable,
|
||||||
Defs<[DSPOutFlag21]>;
|
Defs<[DSPOutFlag21]>;
|
||||||
|
|
||||||
class MULQ_S_PH_DESC : ADDU_QB_DESC_BASE<"mulq_s.ph", int_mips_mulq_s_ph,
|
class MULQ_S_PH_DESC : ADDU_QB_DESC_BASE<"mulq_s.ph", int_mips_mulq_s_ph,
|
||||||
NoItinerary, DSPR, DSPR>,
|
NoItinerary, DSPROpnd, DSPROpnd>,
|
||||||
IsCommutable, Defs<[DSPOutFlag21]>;
|
IsCommutable, Defs<[DSPOutFlag21]>;
|
||||||
|
|
||||||
// Dot product with accumulate/subtract
|
// Dot product with accumulate/subtract
|
||||||
@ -1026,36 +1026,36 @@ class MULSA_W_PH_DESC : DPA_W_PH_DESC_BASE<"mulsa.w.ph", MipsMULSA_W_PH>;
|
|||||||
// Precision reduce/expand
|
// Precision reduce/expand
|
||||||
class PRECR_QB_PH_DESC : CMP_EQ_QB_R3_DESC_BASE<"precr.qb.ph",
|
class PRECR_QB_PH_DESC : CMP_EQ_QB_R3_DESC_BASE<"precr.qb.ph",
|
||||||
int_mips_precr_qb_ph,
|
int_mips_precr_qb_ph,
|
||||||
NoItinerary, DSPR, DSPR>;
|
NoItinerary, DSPROpnd, DSPROpnd>;
|
||||||
|
|
||||||
class PRECR_SRA_PH_W_DESC : PRECR_SRA_PH_W_DESC_BASE<"precr_sra.ph.w",
|
class PRECR_SRA_PH_W_DESC : PRECR_SRA_PH_W_DESC_BASE<"precr_sra.ph.w",
|
||||||
int_mips_precr_sra_ph_w,
|
int_mips_precr_sra_ph_w,
|
||||||
NoItinerary, DSPR,
|
NoItinerary, DSPROpnd,
|
||||||
GPR32>;
|
GPR32Opnd>;
|
||||||
|
|
||||||
class PRECR_SRA_R_PH_W_DESC : PRECR_SRA_PH_W_DESC_BASE<"precr_sra_r.ph.w",
|
class PRECR_SRA_R_PH_W_DESC : PRECR_SRA_PH_W_DESC_BASE<"precr_sra_r.ph.w",
|
||||||
int_mips_precr_sra_r_ph_w,
|
int_mips_precr_sra_r_ph_w,
|
||||||
NoItinerary, DSPR,
|
NoItinerary, DSPROpnd,
|
||||||
GPR32>;
|
GPR32Opnd>;
|
||||||
|
|
||||||
// Shift
|
// Shift
|
||||||
class SHRA_QB_DESC : SHLL_QB_R2_DESC_BASE<"shra.qb", null_frag, immZExt3,
|
class SHRA_QB_DESC : SHLL_QB_R2_DESC_BASE<"shra.qb", null_frag, immZExt3,
|
||||||
NoItinerary, DSPR>;
|
NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
class SHRAV_QB_DESC : SHLL_QB_R3_DESC_BASE<"shrav.qb", int_mips_shra_qb,
|
class SHRAV_QB_DESC : SHLL_QB_R3_DESC_BASE<"shrav.qb", int_mips_shra_qb,
|
||||||
NoItinerary, DSPR>;
|
NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
class SHRA_R_QB_DESC : SHLL_QB_R2_DESC_BASE<"shra_r.qb", int_mips_shra_r_qb,
|
class SHRA_R_QB_DESC : SHLL_QB_R2_DESC_BASE<"shra_r.qb", int_mips_shra_r_qb,
|
||||||
immZExt3, NoItinerary, DSPR>;
|
immZExt3, NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
class SHRAV_R_QB_DESC : SHLL_QB_R3_DESC_BASE<"shrav_r.qb", int_mips_shra_r_qb,
|
class SHRAV_R_QB_DESC : SHLL_QB_R3_DESC_BASE<"shrav_r.qb", int_mips_shra_r_qb,
|
||||||
NoItinerary, DSPR>;
|
NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
class SHRL_PH_DESC : SHLL_QB_R2_DESC_BASE<"shrl.ph", null_frag, immZExt4,
|
class SHRL_PH_DESC : SHLL_QB_R2_DESC_BASE<"shrl.ph", null_frag, immZExt4,
|
||||||
NoItinerary, DSPR>;
|
NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
class SHRLV_PH_DESC : SHLL_QB_R3_DESC_BASE<"shrlv.ph", int_mips_shrl_ph,
|
class SHRLV_PH_DESC : SHLL_QB_R3_DESC_BASE<"shrlv.ph", int_mips_shrl_ph,
|
||||||
NoItinerary, DSPR>;
|
NoItinerary, DSPROpnd>;
|
||||||
|
|
||||||
// Misc
|
// Misc
|
||||||
class APPEND_DESC : APPEND_DESC_BASE<"append", int_mips_append, immZExt5,
|
class APPEND_DESC : APPEND_DESC_BASE<"append", int_mips_append, immZExt5,
|
||||||
@ -1252,12 +1252,12 @@ let isPseudo = 1, isCodeGenOnly = 1 in {
|
|||||||
|
|
||||||
// Pseudo CMP and PICK instructions.
|
// Pseudo CMP and PICK instructions.
|
||||||
class PseudoCMP<Instruction RealInst> :
|
class PseudoCMP<Instruction RealInst> :
|
||||||
PseudoDSP<(outs DSPCC:$cmp), (ins DSPR:$rs, DSPR:$rt), []>,
|
PseudoDSP<(outs DSPCC:$cmp), (ins DSPROpnd:$rs, DSPROpnd:$rt), []>,
|
||||||
PseudoInstExpansion<(RealInst DSPR:$rs, DSPR:$rt)>, NeverHasSideEffects;
|
PseudoInstExpansion<(RealInst DSPROpnd:$rs, DSPROpnd:$rt)>, NeverHasSideEffects;
|
||||||
|
|
||||||
class PseudoPICK<Instruction RealInst> :
|
class PseudoPICK<Instruction RealInst> :
|
||||||
PseudoDSP<(outs DSPR:$rd), (ins DSPCC:$cmp, DSPR:$rs, DSPR:$rt), []>,
|
PseudoDSP<(outs DSPROpnd:$rd), (ins DSPCC:$cmp, DSPROpnd:$rs, DSPROpnd:$rt), []>,
|
||||||
PseudoInstExpansion<(RealInst DSPR:$rd, DSPR:$rs, DSPR:$rt)>,
|
PseudoInstExpansion<(RealInst DSPROpnd:$rd, DSPROpnd:$rs, DSPROpnd:$rt)>,
|
||||||
NeverHasSideEffects;
|
NeverHasSideEffects;
|
||||||
|
|
||||||
def PseudoCMP_EQ_PH : PseudoCMP<CMP_EQ_PH>;
|
def PseudoCMP_EQ_PH : PseudoCMP<CMP_EQ_PH>;
|
||||||
|
@ -392,6 +392,16 @@ def ACC64DSPAsmOperand : MipsAsmRegOperand {
|
|||||||
let ParserMethod = "parseACC64DSP";
|
let ParserMethod = "parseACC64DSP";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def LO32DSPAsmOperand : MipsAsmRegOperand {
|
||||||
|
let Name = "LO32DSPAsm";
|
||||||
|
let ParserMethod = "parseLO32DSP";
|
||||||
|
}
|
||||||
|
|
||||||
|
def HI32DSPAsmOperand : MipsAsmRegOperand {
|
||||||
|
let Name = "HI32DSPAsm";
|
||||||
|
let ParserMethod = "parseHI32DSP";
|
||||||
|
}
|
||||||
|
|
||||||
def CCRAsmOperand : MipsAsmRegOperand {
|
def CCRAsmOperand : MipsAsmRegOperand {
|
||||||
let Name = "CCRAsm";
|
let Name = "CCRAsm";
|
||||||
let ParserMethod = "parseCCRRegs";
|
let ParserMethod = "parseCCRRegs";
|
||||||
@ -458,6 +468,14 @@ def FCCRegsOpnd : RegisterOperand<FCC> {
|
|||||||
let ParserMatchClass = FCCRegsAsmOperand;
|
let ParserMatchClass = FCCRegsAsmOperand;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def LO32DSPOpnd : RegisterOperand<LO32DSP> {
|
||||||
|
let ParserMatchClass = LO32DSPAsmOperand;
|
||||||
|
}
|
||||||
|
|
||||||
|
def HI32DSPOpnd : RegisterOperand<HI32DSP> {
|
||||||
|
let ParserMatchClass = HI32DSPAsmOperand;
|
||||||
|
}
|
||||||
|
|
||||||
def ACC64DSPOpnd : RegisterOperand<ACC64DSP> {
|
def ACC64DSPOpnd : RegisterOperand<ACC64DSP> {
|
||||||
let ParserMatchClass = ACC64DSPAsmOperand;
|
let ParserMatchClass = ACC64DSPAsmOperand;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user