2012-02-18 20:03:15 +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 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 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 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
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// MBlaze processors supported.
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2011-04-12 06:31:52 +08:00
|
|
|
def : Processor<"mblaze", MBlazeGenericItineraries, []>;
|
|
|
|
def : Processor<"mblaze3", MBlazePipe3Itineraries, []>;
|
|
|
|
def : Processor<"mblaze5", MBlazePipe5Itineraries, []>;
|
2010-02-24 03:15:24 +08:00
|
|
|
|
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
|
|
|
}
|