Skip to content

Commit 5cc5051

Browse files
author
Simon Dardis
committedJul 12, 2017
[mips][mt][3/7] Add IAS support for emt, dmt instructions.
Reviewers: slthakur, atanasyan Differential Revision: https://reviews.llvm.org/D35250 llvm-svn: 307774
1 parent fa73e34 commit 5cc5051

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed
 

‎llvm/lib/Target/Mips/MipsInstrInfo.td

+10-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ def HasMSA : Predicate<"Subtarget->hasMSA()">,
240240
AssemblerPredicate<"FeatureMSA">;
241241
def HasMadd4 : Predicate<"!Subtarget->disableMadd4()">,
242242
AssemblerPredicate<"!FeatureMadd4">;
243-
243+
def HasMT : Predicate<"Subtarget->hasMT()">,
244+
AssemblerPredicate<"FeatureMT">;
244245

245246
//===----------------------------------------------------------------------===//
246247
// Mips GPR size adjectives.
@@ -382,6 +383,10 @@ class ASE_MSA64 {
382383
list<Predicate> InsnPredicates = [HasMSA, HasMips64];
383384
}
384385

386+
class ASE_MT {
387+
list <Predicate> InsnPredicates = [HasMT];
388+
}
389+
385390
// Class used for separating microMIPSr6 and microMIPS (r3) instruction.
386391
// It can be used only on instructions that doesn't inherit PredicateControl.
387392
class ISA_MICROMIPS_NOT_32R6_64R6 : PredicateControl {
@@ -2919,6 +2924,10 @@ include "MipsMSAInstrInfo.td"
29192924
include "MipsEVAInstrFormats.td"
29202925
include "MipsEVAInstrInfo.td"
29212926

2927+
// MT
2928+
include "MipsMTInstrFormats.td"
2929+
include "MipsMTInstrInfo.td"
2930+
29222931
// Micromips
29232932
include "MicroMipsInstrFormats.td"
29242933
include "MicroMipsInstrInfo.td"

‎llvm/lib/Target/Mips/MipsSchedule.td

+4
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ def II_DIVU : InstrItinClass;
8484
def II_DIV_D : InstrItinClass;
8585
def II_DIV_S : InstrItinClass;
8686
def II_DMFC0 : InstrItinClass;
87+
def II_DMT : InstrItinClass;
8788
def II_DMTC0 : InstrItinClass;
8889
def II_DMFC1 : InstrItinClass;
8990
def II_DMTC1 : InstrItinClass;
@@ -113,6 +114,7 @@ def II_DSBH : InstrItinClass;
113114
def II_DSHD : InstrItinClass;
114115
def II_DSUBU : InstrItinClass;
115116
def II_DSUB : InstrItinClass;
117+
def II_EMT : InstrItinClass;
116118
def II_EXT : InstrItinClass; // Any EXT instruction
117119
def II_FLOOR : InstrItinClass;
118120
def II_INS : InstrItinClass; // Any INS instruction
@@ -386,6 +388,7 @@ def MipsGenericItineraries : ProcessorItineraries<[ALU, IMULDIV], [], [
386388
InstrItinData<II_DCLZ , [InstrStage<1, [ALU]>]>,
387389
InstrItinData<II_DMOD , [InstrStage<17, [IMULDIV]>]>,
388390
InstrItinData<II_DMODU , [InstrStage<17, [IMULDIV]>]>,
391+
InstrItinData<II_DMT , [InstrStage<2, [ALU]>]>,
389392
InstrItinData<II_DSLL , [InstrStage<1, [ALU]>]>,
390393
InstrItinData<II_DSLL32 , [InstrStage<1, [ALU]>]>,
391394
InstrItinData<II_DSRL , [InstrStage<1, [ALU]>]>,
@@ -404,6 +407,7 @@ def MipsGenericItineraries : ProcessorItineraries<[ALU, IMULDIV], [], [
404407
InstrItinData<II_DSHD , [InstrStage<1, [ALU]>]>,
405408
InstrItinData<II_DCLO , [InstrStage<1, [ALU]>]>,
406409
InstrItinData<II_DCLZ , [InstrStage<1, [ALU]>]>,
410+
InstrItinData<II_EMT , [InstrStage<2, [ALU]>]>,
407411
InstrItinData<II_EXT , [InstrStage<1, [ALU]>]>,
408412
InstrItinData<II_INS , [InstrStage<1, [ALU]>]>,
409413
InstrItinData<II_LUI , [InstrStage<1, [ALU]>]>,

‎llvm/lib/Target/Mips/MipsScheduleGeneric.td

+6
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,12 @@ def : ItinRW<[GenericWriteLoad], [II_LBE, II_LBUE, II_LHE, II_LHUE, II_LWE,
261261

262262
def : ItinRW<[GenericWriteLoad], [II_LWLE, II_LWRE]>;
263263

264+
// MIPS MT instructions
265+
// ====================
266+
267+
def : ItinRW<[GenericWriteMove], [II_DMT, II_EMT]>;
268+
269+
264270
// MIPS32R6 and MIPS16e
265271
// ====================
266272

‎llvm/lib/Target/Mips/MipsScheduleP5600.td

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def MipsP5600Model : SchedMachineModel {
1919
HasMips64, HasMips64r2, HasCnMips,
2020
InMicroMips, InMips16Mode,
2121
HasMicroMips32r6, HasMicroMips64r6,
22-
HasDSP, HasDSPR2];
22+
HasDSP, HasDSPR2, HasMT];
2323

2424
}
2525

0 commit comments

Comments
 (0)
Please sign in to comment.