2010-08-18 00:20:04 +08:00
|
|
|
//===- MBlaze.td - Describe the MBlaze Target Machine ------*- tablegen -*-===//
|
2010-02-24 03:15:24 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// This is the top level entry point for the MBlaze target.
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Target-independent interfaces
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
include "llvm/Target/Target.td"
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Register File, Calling Conv, Instruction Descriptions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
include "MBlazeRegisterInfo.td"
|
|
|
|
include "MBlazeSchedule.td"
|
|
|
|
include "MBlazeIntrinsics.td"
|
|
|
|
include "MBlazeInstrInfo.td"
|
|
|
|
include "MBlazeCallingConv.td"
|
|
|
|
|
2010-04-05 11:10:20 +08:00
|
|
|
def MBlazeInstrInfo : InstrInfo;
|
2010-02-24 03:15:24 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Microblaze Subtarget features //
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
def FeaturePipe3 : SubtargetFeature<"pipe3", "HasPipe3", "true",
|
2010-10-21 11:57:26 +08:00
|
|
|
"Implements 3-stage pipeline">;
|
2010-02-24 03:15:24 +08:00
|
|
|
def FeatureBarrel : SubtargetFeature<"barrel", "HasBarrel", "true",
|
2010-10-21 11:57:26 +08:00
|
|
|
"Implements barrel shifter">;
|
2010-02-24 03:15:24 +08:00
|
|
|
def FeatureDiv : SubtargetFeature<"div", "HasDiv", "true",
|
2010-10-21 11:57:26 +08:00
|
|
|
"Implements hardware divider">;
|
2010-02-24 03:15:24 +08:00
|
|
|
def FeatureMul : SubtargetFeature<"mul", "HasMul", "true",
|
2010-10-21 11:57:26 +08:00
|
|
|
"Implements hardware multiplier">;
|
2010-02-24 03:15:24 +08:00
|
|
|
def FeatureFSL : SubtargetFeature<"fsl", "HasFSL", "true",
|
2010-10-21 11:57:26 +08:00
|
|
|
"Implements FSL instructions">;
|
2010-02-24 03:15:24 +08:00
|
|
|
def FeatureEFSL : SubtargetFeature<"efsl", "HasEFSL", "true",
|
2010-10-21 11:57:26 +08:00
|
|
|
"Implements extended FSL instructions">;
|
2010-02-24 03:15:24 +08:00
|
|
|
def FeatureMSRSet : SubtargetFeature<"msrset", "HasMSRSet", "true",
|
2010-10-21 11:57:26 +08:00
|
|
|
"Implements MSR register set and clear">;
|
2010-02-24 03:15:24 +08:00
|
|
|
def FeatureException : SubtargetFeature<"exception", "HasException", "true",
|
2010-10-21 11:57:26 +08:00
|
|
|
"Implements hardware exception support">;
|
2010-02-24 03:15:24 +08:00
|
|
|
def FeaturePatCmp : SubtargetFeature<"patcmp", "HasPatCmp", "true",
|
2010-10-21 11:57:26 +08:00
|
|
|
"Implements pattern compare instruction">;
|
2010-02-24 03:15:24 +08:00
|
|
|
def FeatureFPU : SubtargetFeature<"fpu", "HasFPU", "true",
|
2010-10-21 11:57:26 +08:00
|
|
|
"Implements floating point unit">;
|
2010-02-24 03:15:24 +08:00
|
|
|
def FeatureESR : SubtargetFeature<"esr", "HasESR", "true",
|
|
|
|
"Implements ESR and EAR registers">;
|
|
|
|
def FeaturePVR : SubtargetFeature<"pvr", "HasPVR", "true",
|
2010-10-21 11:57:26 +08:00
|
|
|
"Implements processor version register">;
|
2010-02-24 03:15:24 +08:00
|
|
|
def FeatureMul64 : SubtargetFeature<"mul64", "HasMul64", "true",
|
|
|
|
"Implements multiplier with 64-bit result">;
|
|
|
|
def FeatureSqrt : SubtargetFeature<"sqrt", "HasSqrt", "true",
|
2010-10-21 11:57:26 +08:00
|
|
|
"Implements sqrt and floating point convert">;
|
2010-02-24 03:15:24 +08:00
|
|
|
def FeatureMMU : SubtargetFeature<"mmu", "HasMMU", "true",
|
2010-10-21 11:57:26 +08:00
|
|
|
"Implements memory management unit">;
|
2010-02-24 03:15:24 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// MBlaze processors supported.
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
class Proc<string Name, list<SubtargetFeature> Features>
|
|
|
|
: Processor<Name, MBlazeGenericItineraries, Features>;
|
|
|
|
|
|
|
|
def : Proc<"v400", []>;
|
|
|
|
def : Proc<"v500", []>;
|
|
|
|
def : Proc<"v600", []>;
|
|
|
|
def : Proc<"v700", []>;
|
|
|
|
def : Proc<"v710", []>;
|
|
|
|
|
2010-10-21 11:57:26 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Instruction Descriptions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
def MBlazeAsmWriter : AsmWriter {
|
|
|
|
string AsmWriterClassName = "InstPrinter";
|
|
|
|
bit isMCAsmWriter = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Target Declaration
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2010-02-24 03:15:24 +08:00
|
|
|
def MBlaze : Target {
|
|
|
|
let InstructionSet = MBlazeInstrInfo;
|
2010-10-21 11:57:26 +08:00
|
|
|
let AssemblyWriters = [MBlazeAsmWriter];
|
2010-02-24 03:15:24 +08:00
|
|
|
}
|