1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

[mips] Add instruction itineraries for LSA, DLSA

Reviewers: vkalintiris, dsanders

Differential Review: http://reviews.llvm.org/D21679

llvm-svn: 273883
This commit is contained in:
Simon Dardis 2016-06-27 14:55:07 +00:00
parent 63fdaaf0c0
commit ac069782ab

View File

@ -2318,19 +2318,18 @@ class LDI_W_DESC : MSA_I10_LDI_DESC_BASE<"ldi.w", MSA128WOpnd>;
class LDI_D_DESC : MSA_I10_LDI_DESC_BASE<"ldi.d", MSA128DOpnd>; class LDI_D_DESC : MSA_I10_LDI_DESC_BASE<"ldi.d", MSA128DOpnd>;
class LSA_DESC_BASE<string instr_asm, RegisterOperand RORD, class LSA_DESC_BASE<string instr_asm, RegisterOperand RORD,
RegisterOperand RORS = RORD, RegisterOperand RORT = RORD, InstrItinClass itin = NoItinerary> {
InstrItinClass itin = NoItinerary > {
dag OutOperandList = (outs RORD:$rd); dag OutOperandList = (outs RORD:$rd);
dag InOperandList = (ins RORS:$rs, RORT:$rt, uimm2_plus1:$sa); dag InOperandList = (ins RORD:$rs, RORD:$rt, uimm2_plus1:$sa);
string AsmString = !strconcat(instr_asm, "\t$rd, $rs, $rt, $sa"); string AsmString = !strconcat(instr_asm, "\t$rd, $rs, $rt, $sa");
list<dag> Pattern = [(set RORD:$rd, (add RORT:$rt, list<dag> Pattern = [(set RORD:$rd, (add RORD:$rt,
(shl RORS:$rs, (shl RORD:$rs,
immZExt2Lsa:$sa)))]; immZExt2Lsa:$sa)))];
InstrItinClass Itinerary = itin; InstrItinClass Itinerary = itin;
} }
class LSA_DESC : LSA_DESC_BASE<"lsa", GPR32Opnd>; class LSA_DESC : LSA_DESC_BASE<"lsa", GPR32Opnd, II_LSA>;
class DLSA_DESC : LSA_DESC_BASE<"dlsa", GPR64Opnd>; class DLSA_DESC : LSA_DESC_BASE<"dlsa", GPR64Opnd, II_DLSA>;
class MADD_Q_H_DESC : MSA_3RF_4RF_DESC_BASE<"madd_q.h", int_mips_madd_q_h, class MADD_Q_H_DESC : MSA_3RF_4RF_DESC_BASE<"madd_q.h", int_mips_madd_q_h,
MSA128HOpnd>; MSA128HOpnd>;