2015-12-20 20:16:20 +08:00
|
|
|
//===-- AVR.td - Describe the AVR Target Machine ----------*- tablegen -*-===//
|
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2015-12-20 20:16:20 +08:00
|
|
|
//
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
// This is the top level entry point for the AVR target.
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
// Target-independent interfaces which we are implementing
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
include "llvm/Target/Target.td"
|
|
|
|
|
|
|
|
//===---------------------------------------------------------------------===//
|
2016-10-05 18:28:45 +08:00
|
|
|
// AVR Device Definitions
|
2015-12-20 20:16:20 +08:00
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
|
2016-10-05 18:28:45 +08:00
|
|
|
include "AVRDevices.td"
|
2015-12-20 20:16:20 +08:00
|
|
|
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
// Register File Description
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
include "AVRRegisterInfo.td"
|
|
|
|
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
// Instruction Descriptions
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
|
2016-02-10 16:55:23 +08:00
|
|
|
include "AVRInstrInfo.td"
|
2015-12-20 20:16:20 +08:00
|
|
|
|
2016-02-10 16:55:23 +08:00
|
|
|
def AVRInstrInfo : InstrInfo;
|
2015-12-20 20:16:20 +08:00
|
|
|
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
// Calling Conventions
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
|
2015-12-21 07:17:44 +08:00
|
|
|
include "AVRCallingConv.td"
|
2015-12-20 20:16:20 +08:00
|
|
|
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
// Assembly Printers
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
|
2016-10-05 18:23:38 +08:00
|
|
|
def AVRAsmWriter : AsmWriter {
|
|
|
|
string AsmWriterClassName = "InstPrinter";
|
|
|
|
bit isMCAsmWriter = 1;
|
|
|
|
}
|
2015-12-20 20:16:20 +08:00
|
|
|
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
// Assembly Parsers
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
|
2016-09-28 22:34:42 +08:00
|
|
|
def AVRAsmParser : AsmParser {
|
|
|
|
let ShouldEmitMatchRegisterName = 1;
|
|
|
|
let ShouldEmitMatchRegisterAltName = 1;
|
|
|
|
}
|
2015-12-20 20:16:20 +08:00
|
|
|
|
2016-09-28 22:34:42 +08:00
|
|
|
def AVRAsmParserVariant : AsmParserVariant {
|
|
|
|
int Variant = 0;
|
|
|
|
|
|
|
|
// Recognize hard coded registers.
|
|
|
|
string RegisterPrefix = "$";
|
|
|
|
string TokenizingCharacters = "+";
|
|
|
|
}
|
2015-12-20 20:16:20 +08:00
|
|
|
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
// Target Declaration
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
def AVR : Target {
|
2016-09-28 22:34:42 +08:00
|
|
|
let InstructionSet = AVRInstrInfo;
|
2016-10-05 18:23:38 +08:00
|
|
|
let AssemblyWriters = [AVRAsmWriter];
|
2016-09-28 22:34:42 +08:00
|
|
|
|
|
|
|
let AssemblyParsers = [AVRAsmParser];
|
|
|
|
let AssemblyParserVariants = [AVRAsmParserVariant];
|
2015-12-20 20:16:20 +08:00
|
|
|
}
|
|
|
|
|