blob: 3dda3bf95e5e5a6be10621afa257feed1213e2ba [file] [log] [blame]
Jia Liub22310f2012-02-18 12:03:15 +00001//===-- MSP430Subtarget.cpp - MSP430 Subtarget Information ----------------===//
Anton Korobeynikov10138002009-05-03 12:57:15 +00002//
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//
Evan Cheng0d639a22011-07-01 21:01:15 +000010// This file implements the MSP430 specific subclass of TargetSubtargetInfo.
Anton Korobeynikov10138002009-05-03 12:57:15 +000011//
12//===----------------------------------------------------------------------===//
13
14#include "MSP430Subtarget.h"
15#include "MSP430.h"
Evan Cheng2bb40352011-08-24 18:08:43 +000016#include "llvm/Support/TargetRegistry.h"
Evan Cheng54b68e32011-07-01 20:45:01 +000017
Chandler Carruthd174b722014-04-22 02:03:14 +000018using namespace llvm;
19
Chandler Carruthe96dd892014-04-21 22:55:11 +000020#define DEBUG_TYPE "msp430-subtarget"
21
Evan Cheng54b68e32011-07-01 20:45:01 +000022#define GET_SUBTARGETINFO_TARGET_DESC
Evan Cheng4d1ca962011-07-08 01:53:10 +000023#define GET_SUBTARGETINFO_CTOR
Evan Chengc9c090d2011-07-01 22:36:09 +000024#include "MSP430GenSubtargetInfo.inc"
Anton Korobeynikov10138002009-05-03 12:57:15 +000025
David Blaikiea379b1812011-12-20 02:50:00 +000026void MSP430Subtarget::anchor() { }
27
Eric Christopher43768e32015-03-03 17:54:39 +000028MSP430Subtarget &
29MSP430Subtarget::initializeSubtargetDependencies(StringRef CPU, StringRef FS) {
Eric Christopher1f86cca2014-06-27 01:14:54 +000030 ParseSubtargetFeatures("generic", FS);
31 return *this;
Anton Korobeynikov10138002009-05-03 12:57:15 +000032}
Eric Christopher1f86cca2014-06-27 01:14:54 +000033
34MSP430Subtarget::MSP430Subtarget(const std::string &TT, const std::string &CPU,
35 const std::string &FS, const TargetMachine &TM)
Eric Christopher8b770652015-01-26 19:03:15 +000036 : MSP430GenSubtargetInfo(TT, CPU, FS), FrameLowering(),
Eric Christopher23a3a7c2015-02-26 00:00:24 +000037 InstrInfo(initializeSubtargetDependencies(CPU, FS)), TLInfo(TM, *this),
Eric Christopher8b770652015-01-26 19:03:15 +000038 TSInfo(*TM.getDataLayout()) {}