Anton Korobeynikov | f2c3e17 | 2009-05-03 12:57:15 +0000 | [diff] [blame] | 1 | //===- MSP430.td - Describe the MSP430 Target Machine ---------*- tblgen -*-==// |
| 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 MSP430 target. |
| 10 | //===----------------------------------------------------------------------===// |
| 11 | |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | // Target-independent interfaces |
| 14 | //===----------------------------------------------------------------------===// |
| 15 | |
| 16 | include "llvm/Target/Target.td" |
| 17 | |
| 18 | //===----------------------------------------------------------------------===// |
| 19 | // Subtarget Features. |
| 20 | //===----------------------------------------------------------------------===// |
| 21 | def FeatureX |
| 22 | : SubtargetFeature<"ext", "ExtendedInsts", "true", |
| 23 | "Enable MSP430-X extensions">; |
| 24 | |
| 25 | //===----------------------------------------------------------------------===// |
| 26 | // MSP430 supported processors. |
| 27 | //===----------------------------------------------------------------------===// |
| 28 | class Proc<string Name, list<SubtargetFeature> Features> |
| 29 | : Processor<Name, NoItineraries, Features>; |
| 30 | |
| 31 | def : Proc<"generic", []>; |
| 32 | |
| 33 | //===----------------------------------------------------------------------===// |
| 34 | // Register File Description |
| 35 | //===----------------------------------------------------------------------===// |
| 36 | |
| 37 | include "MSP430RegisterInfo.td" |
| 38 | |
| 39 | //===----------------------------------------------------------------------===// |
Anton Korobeynikov | c8fbb6a | 2009-05-03 12:59:33 +0000 | [diff] [blame] | 40 | // Calling Convention Description |
| 41 | //===----------------------------------------------------------------------===// |
| 42 | |
| 43 | include "MSP430CallingConv.td" |
| 44 | |
| 45 | //===----------------------------------------------------------------------===// |
Anton Korobeynikov | f2c3e17 | 2009-05-03 12:57:15 +0000 | [diff] [blame] | 46 | // Instruction Descriptions |
| 47 | //===----------------------------------------------------------------------===// |
| 48 | |
| 49 | include "MSP430InstrInfo.td" |
| 50 | |
Anton Korobeynikov | 05011a8 | 2010-01-15 21:18:39 +0000 | [diff] [blame] | 51 | def MSP430InstrInfo : InstrInfo { |
| 52 | // Define how we want to layout our TargetSpecific information field... This |
| 53 | // should be kept up-to-date with the fields in the MSP430InstrInfo.h file. |
| 54 | let TSFlagsFields = ["FormBits", |
| 55 | "Size"]; |
| 56 | let TSFlagsShifts = [0, |
| 57 | 2]; |
| 58 | } |
Anton Korobeynikov | b7790e1 | 2009-11-07 17:12:21 +0000 | [diff] [blame] | 59 | |
| 60 | def MSP430InstPrinter : AsmWriter { |
| 61 | string AsmWriterClassName = "InstPrinter"; |
| 62 | } |
| 63 | |
Anton Korobeynikov | f2c3e17 | 2009-05-03 12:57:15 +0000 | [diff] [blame] | 64 | //===----------------------------------------------------------------------===// |
| 65 | // Target Declaration |
| 66 | //===----------------------------------------------------------------------===// |
| 67 | |
| 68 | def MSP430 : Target { |
| 69 | let InstructionSet = MSP430InstrInfo; |
Anton Korobeynikov | b7790e1 | 2009-11-07 17:12:21 +0000 | [diff] [blame] | 70 | let AssemblyWriters = [MSP430InstPrinter]; |
Anton Korobeynikov | f2c3e17 | 2009-05-03 12:57:15 +0000 | [diff] [blame] | 71 | } |
| 72 | |