NaplesPU.td

From NaplesPU Documentation
Revision as of 16:55, 21 June 2019 by Francesco (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The NaplesPU.td file contains the definition of the Target class NaplesPU (defined in "compiler/include/llvm/Target/Target.td"). The file also contains the definition of the NaplesPUInstrInfo, NaplesPUAsmParser and NaplesPUAsmWriter required by the Target class. In addition, we avoid using instruction itineraries for scheduling. Itineraries are details reservation tables for each instruction class.

//===-- NaplesPU.td - Describe the NaplesPU Target Machine -------*- tablegen -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//MCCodeEmitter/===----------------------------------------------------------------------===//
//
//
//===----------------------------------------------------------------------===//

//===----------------------------------------------------------------------===//
// Target-independent interfaces which we are implementing
//===----------------------------------------------------------------------===//

include "llvm/Target/Target.td"

//===----------------------------------------------------------------------===//
// Register File, Calling Conv, Instruction Descriptions
//===----------------------------------------------------------------------===//

include "NaplesPURegisterInfo.td"
include "NaplesPUCallingConv.td"
include "NaplesPUInstrInfo.td"

def NaplesPUInstrInfo : InstrInfo;

def NaplesPUAsmParser : AsmParser {
  bit ShouldEmitMatchRegisterName = 1;
}

//===----------------------------------------------------------------------===//
// Declare the target which we are implementing
//===----------------------------------------------------------------------===//

def NaplesPUAsmWriter : AsmWriter {
  string AsmWriterClassName  = "InstPrinter";
  bit isMCAsmWriter = 1;
}

def : Processor<"naplespu", NoItineraries, []>;

def NaplesPU : Target {
  // Pull in Instruction Info:
  let InstructionSet = NaplesPUInstrInfo;
  let AssemblyParsers  = [NaplesPUAsmParser];
  let AssemblyWriters = [NaplesPUAsmWriter];
}