Jia Liu | b22310f | 2012-02-18 12:03:15 +0000 | [diff] [blame] | 1 | //===-- MSP430Subtarget.cpp - MSP430 Subtarget Information ----------------===// |
Anton Korobeynikov | 1013800 | 2009-05-03 12:57:15 +0000 | [diff] [blame] | 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 | // |
Evan Cheng | 0d639a2 | 2011-07-01 21:01:15 +0000 | [diff] [blame] | 10 | // This file implements the MSP430 specific subclass of TargetSubtargetInfo. |
Anton Korobeynikov | 1013800 | 2009-05-03 12:57:15 +0000 | [diff] [blame] | 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #include "MSP430Subtarget.h" |
| 15 | #include "MSP430.h" |
Evan Cheng | 2bb4035 | 2011-08-24 18:08:43 +0000 | [diff] [blame] | 16 | #include "llvm/Support/TargetRegistry.h" |
Evan Cheng | 54b68e3 | 2011-07-01 20:45:01 +0000 | [diff] [blame] | 17 | |
Chandler Carruth | d174b72 | 2014-04-22 02:03:14 +0000 | [diff] [blame] | 18 | using namespace llvm; |
| 19 | |
Chandler Carruth | e96dd89 | 2014-04-21 22:55:11 +0000 | [diff] [blame] | 20 | #define DEBUG_TYPE "msp430-subtarget" |
| 21 | |
Evan Cheng | 54b68e3 | 2011-07-01 20:45:01 +0000 | [diff] [blame] | 22 | #define GET_SUBTARGETINFO_TARGET_DESC |
Evan Cheng | 4d1ca96 | 2011-07-08 01:53:10 +0000 | [diff] [blame] | 23 | #define GET_SUBTARGETINFO_CTOR |
Evan Cheng | c9c090d | 2011-07-01 22:36:09 +0000 | [diff] [blame] | 24 | #include "MSP430GenSubtargetInfo.inc" |
Anton Korobeynikov | 1013800 | 2009-05-03 12:57:15 +0000 | [diff] [blame] | 25 | |
David Blaikie | a379b181 | 2011-12-20 02:50:00 +0000 | [diff] [blame] | 26 | void MSP430Subtarget::anchor() { } |
| 27 | |
Eric Christopher | 43768e3 | 2015-03-03 17:54:39 +0000 | [diff] [blame^] | 28 | MSP430Subtarget & |
| 29 | MSP430Subtarget::initializeSubtargetDependencies(StringRef CPU, StringRef FS) { |
Eric Christopher | 1f86cca | 2014-06-27 01:14:54 +0000 | [diff] [blame] | 30 | ParseSubtargetFeatures("generic", FS); |
| 31 | return *this; |
Anton Korobeynikov | 1013800 | 2009-05-03 12:57:15 +0000 | [diff] [blame] | 32 | } |
Eric Christopher | 1f86cca | 2014-06-27 01:14:54 +0000 | [diff] [blame] | 33 | |
| 34 | MSP430Subtarget::MSP430Subtarget(const std::string &TT, const std::string &CPU, |
| 35 | const std::string &FS, const TargetMachine &TM) |
Eric Christopher | 8b77065 | 2015-01-26 19:03:15 +0000 | [diff] [blame] | 36 | : MSP430GenSubtargetInfo(TT, CPU, FS), FrameLowering(), |
Eric Christopher | 23a3a7c | 2015-02-26 00:00:24 +0000 | [diff] [blame] | 37 | InstrInfo(initializeSubtargetDependencies(CPU, FS)), TLInfo(TM, *this), |
Eric Christopher | 8b77065 | 2015-01-26 19:03:15 +0000 | [diff] [blame] | 38 | TSInfo(*TM.getDataLayout()) {} |