LLVM API Documentation

MSP430Subtarget.cpp
Go to the documentation of this file.
00001 //===-- MSP430Subtarget.cpp - MSP430 Subtarget Information ----------------===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file implements the MSP430 specific subclass of TargetSubtargetInfo.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #include "MSP430Subtarget.h"
00015 #include "MSP430.h"
00016 #include "llvm/Support/TargetRegistry.h"
00017 
00018 using namespace llvm;
00019 
00020 #define DEBUG_TYPE "msp430-subtarget"
00021 
00022 #define GET_SUBTARGETINFO_TARGET_DESC
00023 #define GET_SUBTARGETINFO_CTOR
00024 #include "MSP430GenSubtargetInfo.inc"
00025 
00026 void MSP430Subtarget::anchor() { }
00027 
00028 MSP430Subtarget &MSP430Subtarget::initializeSubtargetDependencies(StringRef CPU, StringRef FS) {
00029   ParseSubtargetFeatures("generic", FS);
00030   return *this;
00031 }
00032 
00033 MSP430Subtarget::MSP430Subtarget(const std::string &TT, const std::string &CPU,
00034                                  const std::string &FS, const TargetMachine &TM)
00035     : MSP430GenSubtargetInfo(TT, CPU, FS),
00036       // FIXME: Check DataLayout string.
00037       DL("e-m:e-p:16:16-i32:16:32-n8:16"), FrameLowering(),
00038       InstrInfo(initializeSubtargetDependencies(CPU, FS)), TLInfo(TM),
00039       TSInfo(DL) {}