Difference between revisions of "NaplesPU.td"

From NaplesPU Documentation
Jump to: navigation, search
m (Francesco moved page NuPlus.td to NaplesPU.td)
 
Line 1: Line 1:
 
[[Category:Tablegen Files]]
 
[[Category:Tablegen Files]]
The NuPlus.td file contains the definition of the Target class '''NuPlus''' (defined in "compiler/include/llvm/Target/Target.td"). The file also contains the definition of the '''NuPlusInstrInfo''', '''NuPlusAsmParser''' and '''NuPlusAsmWriter''' required by the '''Target''' class. In addition, we avoid using instruction itineraries for scheduling. Itineraries are details reservation tables for each instruction class.  
+
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.  
  
 
<syntaxhighlight lang="c" line='line'>
 
<syntaxhighlight lang="c" line='line'>
//===-- NuPlus.td - Describe the NuPlus Target Machine -------*- tablegen -*-===//
+
//===-- NaplesPU.td - Describe the NaplesPU Target Machine -------*- tablegen -*-===//
 
//
 
//
 
//                    The LLVM Compiler Infrastructure
 
//                    The LLVM Compiler Infrastructure
Line 9: Line 9:
 
// This file is distributed under the University of Illinois Open Source
 
// This file is distributed under the University of Illinois Open Source
 
// License. See LICENSE.TXT for details.
 
// License. See LICENSE.TXT for details.
//
+
//MCCodeEmitter/===----------------------------------------------------------------------===//
//===----------------------------------------------------------------------===//
 
 
//
 
//
 
//
 
//
Line 25: Line 24:
 
//===----------------------------------------------------------------------===//
 
//===----------------------------------------------------------------------===//
  
include "NuPlusRegisterInfo.td"
+
include "NaplesPURegisterInfo.td"
include "NuPlusCallingConv.td"
+
include "NaplesPUCallingConv.td"
include "NuPlusInstrInfo.td"
+
include "NaplesPUInstrInfo.td"
  
def NuPlusInstrInfo : InstrInfo;
+
def NaplesPUInstrInfo : InstrInfo;
  
def NuPlusAsmParser : AsmParser {
+
def NaplesPUAsmParser : AsmParser {
 
   bit ShouldEmitMatchRegisterName = 1;
 
   bit ShouldEmitMatchRegisterName = 1;
 
}
 
}
Line 39: Line 38:
 
//===----------------------------------------------------------------------===//
 
//===----------------------------------------------------------------------===//
  
def NuPlusAsmWriter : AsmWriter {
+
def NaplesPUAsmWriter : AsmWriter {
 
   string AsmWriterClassName  = "InstPrinter";
 
   string AsmWriterClassName  = "InstPrinter";
 
   bit isMCAsmWriter = 1;
 
   bit isMCAsmWriter = 1;
 
}
 
}
  
def : Processor<"nuplus", NoItineraries, []>;
+
def : Processor<"naplespu", NoItineraries, []>;
  
def NuPlus : Target {
+
def NaplesPU : Target {
 
   // Pull in Instruction Info:
 
   // Pull in Instruction Info:
   let InstructionSet = NuPlusInstrInfo;
+
   let InstructionSet = NaplesPUInstrInfo;
   let AssemblyParsers  = [NuPlusAsmParser];
+
   let AssemblyParsers  = [NaplesPUAsmParser];
   let AssemblyWriters = [NuPlusAsmWriter];
+
   let AssemblyWriters = [NaplesPUAsmWriter];
 
}
 
}
  
 
</syntaxhighlight>
 
</syntaxhighlight>

Latest revision as of 16:55, 21 June 2019

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];
}