1 //===-- AVR.td - Describe the AVR Target Machine ----------*- tablegen -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===---------------------------------------------------------------------===// 9 // This is the top level entry point for the AVR target. 10 //===---------------------------------------------------------------------===// 11 12 //===---------------------------------------------------------------------===// 13 // Target-independent interfaces which we are implementing 14 //===---------------------------------------------------------------------===// 15 16 include "llvm/Target/Target.td" 17 18 //===---------------------------------------------------------------------===// 19 // AVR Device Definitions 20 //===---------------------------------------------------------------------===// 21 22 include "AVRDevices.td" 23 24 //===---------------------------------------------------------------------===// 25 // Register File Description 26 //===---------------------------------------------------------------------===// 27 28 include "AVRRegisterInfo.td" 29 30 //===---------------------------------------------------------------------===// 31 // Instruction Descriptions 32 //===---------------------------------------------------------------------===// 33 34 include "AVRInstrInfo.td" 35 36 def AVRInstrInfo : InstrInfo; 37 38 //===---------------------------------------------------------------------===// 39 // Calling Conventions 40 //===---------------------------------------------------------------------===// 41 42 include "AVRCallingConv.td" 43 44 //===---------------------------------------------------------------------===// 45 // Assembly Printers 46 //===---------------------------------------------------------------------===// 47 48 def AVRAsmWriter : AsmWriter { 49 string AsmWriterClassName = "InstPrinter"; 50 bit isMCAsmWriter = 1; 51 } 52 53 //===---------------------------------------------------------------------===// 54 // Assembly Parsers 55 //===---------------------------------------------------------------------===// 56 57 def AVRAsmParser : AsmParser { 58 let ShouldEmitMatchRegisterName = 1; 59 let ShouldEmitMatchRegisterAltName = 1; 60 } 61 62 def AVRAsmParserVariant : AsmParserVariant { 63 int Variant = 0; 64 65 // Recognize hard coded registers. 66 string RegisterPrefix = "$"; 67 string TokenizingCharacters = "+"; 68 } 69 70 //===---------------------------------------------------------------------===// 71 // Target Declaration 72 //===---------------------------------------------------------------------===// 73 74 def AVR : Target { 75 let InstructionSet = AVRInstrInfo; 76 let AssemblyWriters = [AVRAsmWriter]; 77 78 let AssemblyParsers = [AVRAsmParser]; 79 let AssemblyParserVariants = [AVRAsmParserVariant]; 80 } 81 82