brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.4 KiB · cb39498 Raw
94 lines · plain
1//===-- MSP430.td - Describe the MSP430 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 MSP430 target.9//===----------------------------------------------------------------------===//10 11//===----------------------------------------------------------------------===//12// Target-independent interfaces13//===----------------------------------------------------------------------===//14 15include "llvm/Target/Target.td"16 17//===----------------------------------------------------------------------===//18// Subtarget Features. 19//===----------------------------------------------------------------------===//20def FeatureX21 : SubtargetFeature<"ext", "ExtendedInsts", "true",22                    "Enable MSP430-X extensions">;23 24def FeatureHWMult1625 : SubtargetFeature<"hwmult16", "HWMultMode", "HWMult16",26                    "Enable 16-bit hardware multiplier">;27 28def FeatureHWMult3229 : SubtargetFeature<"hwmult32", "HWMultMode", "HWMult32",30                    "Enable 32-bit hardware multiplier">;31 32def FeatureHWMultF533 : SubtargetFeature<"hwmultf5", "HWMultMode", "HWMultF5",34                    "Enable F5 series hardware multiplier">;35 36//===----------------------------------------------------------------------===//37// MSP430 supported processors.38//===----------------------------------------------------------------------===//39class Proc<string Name, list<SubtargetFeature> Features>40 : Processor<Name, NoItineraries, Features>;41 42def : Proc<"generic",         []>;43def : Proc<"msp430",          []>;44def : Proc<"msp430x",         [FeatureX]>;45 46//===----------------------------------------------------------------------===//47// Register File Description48//===----------------------------------------------------------------------===//49 50include "MSP430RegisterInfo.td"51 52//===----------------------------------------------------------------------===//53// Calling Convention Description54//===----------------------------------------------------------------------===//55 56include "MSP430CallingConv.td"57 58//===----------------------------------------------------------------------===//59// Instruction Descriptions60//===----------------------------------------------------------------------===//61 62include "MSP430InstrInfo.td"63 64defm : RemapAllTargetPseudoPointerOperands<GR16>;65 66def MSP430InstrInfo : InstrInfo;67 68//===---------------------------------------------------------------------===//69// Assembly Printers70//===---------------------------------------------------------------------===//71 72def MSP430AsmWriter : AsmWriter {73  string AsmWriterClassName = "InstPrinter";74}75 76//===---------------------------------------------------------------------===//77// Assembly Parsers78//===---------------------------------------------------------------------===//79 80def MSP430AsmParser : AsmParser {81  let AllowDuplicateRegisterNames = 1;82  let ShouldEmitMatchRegisterAltName = 1;83}84 85//===----------------------------------------------------------------------===//86// Target Declaration87//===----------------------------------------------------------------------===//88 89def MSP430 : Target {90  let InstructionSet = MSP430InstrInfo;91  let AssemblyParsers = [MSP430AsmParser];92}93 94