brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.8 KiB · f4ee119 Raw
82 lines · plain
1//===-- AVR.td - Describe the AVR Target Machine ----------*- tablegen -*-===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===---------------------------------------------------------------------===//8// This is the top level entry point for the AVR target.9//===---------------------------------------------------------------------===//10 11//===---------------------------------------------------------------------===//12// Target-independent interfaces which we are implementing13//===---------------------------------------------------------------------===//14 15include "llvm/Target/Target.td"16 17//===---------------------------------------------------------------------===//18// AVR Device Definitions19//===---------------------------------------------------------------------===//20 21include "AVRDevices.td"22 23//===---------------------------------------------------------------------===//24// Register File Description25//===---------------------------------------------------------------------===//26 27include "AVRRegisterInfo.td"28 29//===---------------------------------------------------------------------===//30// Instruction Descriptions31//===---------------------------------------------------------------------===//32 33include "AVRInstrInfo.td"34 35defm : RemapAllTargetPseudoPointerOperands<PTRDISPREGS>;36 37def AVRInstrInfo : InstrInfo;38 39//===---------------------------------------------------------------------===//40// Calling Conventions41//===---------------------------------------------------------------------===//42 43include "AVRCallingConv.td"44 45//===---------------------------------------------------------------------===//46// Assembly Printers47//===---------------------------------------------------------------------===//48 49def AVRAsmWriter : AsmWriter {50  string AsmWriterClassName = "InstPrinter";51  bit isMCAsmWriter = 1;52}53 54//===---------------------------------------------------------------------===//55// Assembly Parsers56//===---------------------------------------------------------------------===//57 58def AVRAsmParser : AsmParser {59  let ShouldEmitMatchRegisterName = 1;60  let ShouldEmitMatchRegisterAltName = 1;61}62 63def AVRAsmParserVariant : AsmParserVariant {64  int Variant = 0;65 66  // Recognize hard coded registers.67  string RegisterPrefix = "$";68  string TokenizingCharacters = "+";69}70 71//===---------------------------------------------------------------------===//72// Target Declaration73//===---------------------------------------------------------------------===//74 75def AVR : Target {76  let InstructionSet = AVRInstrInfo;77  let AssemblyWriters = [AVRAsmWriter];78 79  let AssemblyParsers = [AVRAsmParser];80  let AssemblyParserVariants = [AVRAsmParserVariant];81}82