mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-01 16:33:37 +01:00
c50372298d
1. A delay slot filler that searches for valid instructions to fill the delay slot with. Previously NOPs would always be inserted into delay slots. 2. Support for MC based instruction printer added. 3. Support for MC based machine code generation and ELF file generation. ELF file generation does not yet completely work as much of the ELF support infrastructure is still x86/x86-64 specific. 4. General clean up of the MBlaze backend code. Much of the tablegen code has been cleanup and simplified. Bug Fixes: 1. Removed duplicate periods from subtarget feature descriptions. 2. Many of the instructions had bad machine code information in the tablegen files. Much of this has been fixed. llvm-svn: 116986
95 lines
4.4 KiB
TableGen
95 lines
4.4 KiB
TableGen
//===- MBlaze.td - Describe the MBlaze Target Machine ------*- tablegen -*-===//
|
|
//
|
|
// 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"
|
|
|
|
def MBlazeInstrInfo : InstrInfo;
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// Microblaze Subtarget features //
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
def FeaturePipe3 : SubtargetFeature<"pipe3", "HasPipe3", "true",
|
|
"Implements 3-stage pipeline">;
|
|
def FeatureBarrel : SubtargetFeature<"barrel", "HasBarrel", "true",
|
|
"Implements barrel shifter">;
|
|
def FeatureDiv : SubtargetFeature<"div", "HasDiv", "true",
|
|
"Implements hardware divider">;
|
|
def FeatureMul : SubtargetFeature<"mul", "HasMul", "true",
|
|
"Implements hardware multiplier">;
|
|
def FeatureFSL : SubtargetFeature<"fsl", "HasFSL", "true",
|
|
"Implements FSL instructions">;
|
|
def FeatureEFSL : SubtargetFeature<"efsl", "HasEFSL", "true",
|
|
"Implements extended FSL instructions">;
|
|
def FeatureMSRSet : SubtargetFeature<"msrset", "HasMSRSet", "true",
|
|
"Implements MSR register set and clear">;
|
|
def FeatureException : SubtargetFeature<"exception", "HasException", "true",
|
|
"Implements hardware exception support">;
|
|
def FeaturePatCmp : SubtargetFeature<"patcmp", "HasPatCmp", "true",
|
|
"Implements pattern compare instruction">;
|
|
def FeatureFPU : SubtargetFeature<"fpu", "HasFPU", "true",
|
|
"Implements floating point unit">;
|
|
def FeatureESR : SubtargetFeature<"esr", "HasESR", "true",
|
|
"Implements ESR and EAR registers">;
|
|
def FeaturePVR : SubtargetFeature<"pvr", "HasPVR", "true",
|
|
"Implements processor version register">;
|
|
def FeatureMul64 : SubtargetFeature<"mul64", "HasMul64", "true",
|
|
"Implements multiplier with 64-bit result">;
|
|
def FeatureSqrt : SubtargetFeature<"sqrt", "HasSqrt", "true",
|
|
"Implements sqrt and floating point convert">;
|
|
def FeatureMMU : SubtargetFeature<"mmu", "HasMMU", "true",
|
|
"Implements memory management unit">;
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// 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", []>;
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// Instruction Descriptions
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
def MBlazeAsmWriter : AsmWriter {
|
|
string AsmWriterClassName = "InstPrinter";
|
|
bit isMCAsmWriter = 1;
|
|
}
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// Target Declaration
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
def MBlaze : Target {
|
|
let InstructionSet = MBlazeInstrInfo;
|
|
let AssemblyWriters = [MBlazeAsmWriter];
|
|
}
|