Jia Liu | b22310f | 2012-02-18 12:03:15 +0000 | [diff] [blame^] | 1 | //===-- MSP430Subtarget.h - Define Subtarget for the MSP430 ----*- C++ -*--===// |
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 declares the MSP430 specific subclass of TargetSubtargetInfo. |
Anton Korobeynikov | 1013800 | 2009-05-03 12:57:15 +0000 | [diff] [blame] | 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef LLVM_TARGET_MSP430_SUBTARGET_H |
| 15 | #define LLVM_TARGET_MSP430_SUBTARGET_H |
| 16 | |
Evan Cheng | 0d639a2 | 2011-07-01 21:01:15 +0000 | [diff] [blame] | 17 | #include "llvm/Target/TargetSubtargetInfo.h" |
Anton Korobeynikov | 1013800 | 2009-05-03 12:57:15 +0000 | [diff] [blame] | 18 | |
Evan Cheng | 54b68e3 | 2011-07-01 20:45:01 +0000 | [diff] [blame] | 19 | #define GET_SUBTARGETINFO_HEADER |
Evan Cheng | c9c090d | 2011-07-01 22:36:09 +0000 | [diff] [blame] | 20 | #include "MSP430GenSubtargetInfo.inc" |
Evan Cheng | 54b68e3 | 2011-07-01 20:45:01 +0000 | [diff] [blame] | 21 | |
Anton Korobeynikov | 1013800 | 2009-05-03 12:57:15 +0000 | [diff] [blame] | 22 | #include <string> |
| 23 | |
| 24 | namespace llvm { |
Evan Cheng | 1a72add6 | 2011-07-07 07:07:08 +0000 | [diff] [blame] | 25 | class StringRef; |
Anton Korobeynikov | 1013800 | 2009-05-03 12:57:15 +0000 | [diff] [blame] | 26 | |
Evan Cheng | 54b68e3 | 2011-07-01 20:45:01 +0000 | [diff] [blame] | 27 | class MSP430Subtarget : public MSP430GenSubtargetInfo { |
David Blaikie | a379b181 | 2011-12-20 02:50:00 +0000 | [diff] [blame] | 28 | virtual void anchor(); |
Anton Korobeynikov | 1013800 | 2009-05-03 12:57:15 +0000 | [diff] [blame] | 29 | bool ExtendedInsts; |
| 30 | public: |
| 31 | /// This constructor initializes the data members to match that |
Daniel Dunbar | 31b44e8 | 2009-08-02 22:11:08 +0000 | [diff] [blame] | 32 | /// of the specified triple. |
Anton Korobeynikov | 1013800 | 2009-05-03 12:57:15 +0000 | [diff] [blame] | 33 | /// |
Evan Cheng | fe6e405 | 2011-06-30 01:53:36 +0000 | [diff] [blame] | 34 | MSP430Subtarget(const std::string &TT, const std::string &CPU, |
| 35 | const std::string &FS); |
Anton Korobeynikov | 1013800 | 2009-05-03 12:57:15 +0000 | [diff] [blame] | 36 | |
| 37 | /// ParseSubtargetFeatures - Parses features string setting specified |
| 38 | /// subtarget options. Definition of function is auto generated by tblgen. |
Evan Cheng | 1a72add6 | 2011-07-07 07:07:08 +0000 | [diff] [blame] | 39 | void ParseSubtargetFeatures(StringRef CPU, StringRef FS); |
Anton Korobeynikov | 1013800 | 2009-05-03 12:57:15 +0000 | [diff] [blame] | 40 | }; |
| 41 | } // End llvm namespace |
| 42 | |
| 43 | #endif // LLVM_TARGET_MSP430_SUBTARGET_H |