2015-12-20 13:16:20 +01:00
|
|
|
//===-- AVR.td - Describe the AVR Target Machine ----------*- tablegen -*-===//
|
|
|
|
//
|
2019-01-19 09:50:56 +01: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 13:16:20 +01: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 12:28:45 +02:00
|
|
|
// AVR Device Definitions
|
2015-12-20 13:16:20 +01:00
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
|
2016-10-05 12:28:45 +02:00
|
|
|
include "AVRDevices.td"
|
2015-12-20 13:16:20 +01:00
|
|
|
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
// Register File Description
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
include "AVRRegisterInfo.td"
|
|
|
|
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
// Instruction Descriptions
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
|
2016-02-10 09:55:23 +01:00
|
|
|
include "AVRInstrInfo.td"
|
2015-12-20 13:16:20 +01:00
|
|
|
|
2016-02-10 09:55:23 +01:00
|
|
|
def AVRInstrInfo : InstrInfo;
|
2015-12-20 13:16:20 +01:00
|
|
|
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
// Calling Conventions
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
|
2015-12-21 00:17:44 +01:00
|
|
|
include "AVRCallingConv.td"
|
2015-12-20 13:16:20 +01:00
|
|
|
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
// Assembly Printers
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
|
2016-10-05 12:23:38 +02:00
|
|
|
def AVRAsmWriter : AsmWriter {
|
|
|
|
string AsmWriterClassName = "InstPrinter";
|
|
|
|
bit isMCAsmWriter = 1;
|
|
|
|
}
|
2015-12-20 13:16:20 +01:00
|
|
|
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
// Assembly Parsers
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
|
2016-09-28 16:34:42 +02:00
|
|
|
def AVRAsmParser : AsmParser {
|
|
|
|
let ShouldEmitMatchRegisterName = 1;
|
|
|
|
let ShouldEmitMatchRegisterAltName = 1;
|
|
|
|
}
|
2015-12-20 13:16:20 +01:00
|
|
|
|
2016-09-28 16:34:42 +02:00
|
|
|
def AVRAsmParserVariant : AsmParserVariant {
|
|
|
|
int Variant = 0;
|
|
|
|
|
|
|
|
// Recognize hard coded registers.
|
|
|
|
string RegisterPrefix = "$";
|
|
|
|
string TokenizingCharacters = "+";
|
|
|
|
}
|
2015-12-20 13:16:20 +01:00
|
|
|
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
// Target Declaration
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
def AVR : Target {
|
2016-09-28 16:34:42 +02:00
|
|
|
let InstructionSet = AVRInstrInfo;
|
2016-10-05 12:23:38 +02:00
|
|
|
let AssemblyWriters = [AVRAsmWriter];
|
2016-09-28 16:34:42 +02:00
|
|
|
|
|
|
|
let AssemblyParsers = [AVRAsmParser];
|
|
|
|
let AssemblyParserVariants = [AVRAsmParserVariant];
|
2015-12-20 13:16:20 +01:00
|
|
|
}
|
|
|
|
|