blob: 4d8792eede7fc9d53aba436c52211695b3d3d27c [file] [log] [blame]
Jia Liu31d157a2012-02-18 12:03:15 +00001//===-- MSP430Subtarget.h - Define Subtarget for the MSP430 ----*- C++ -*--===//
Anton Korobeynikovf2c3e172009-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 Cheng5b1b44892011-07-01 21:01:15 +000010// This file declares the MSP430 specific subclass of TargetSubtargetInfo.
Anton Korobeynikovf2c3e172009-05-03 12:57:15 +000011//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_TARGET_MSP430_SUBTARGET_H
15#define LLVM_TARGET_MSP430_SUBTARGET_H
16
Evan Cheng5b1b44892011-07-01 21:01:15 +000017#include "llvm/Target/TargetSubtargetInfo.h"
Craig Topper79aa3412012-03-17 18:46:09 +000018#include <string>
Anton Korobeynikovf2c3e172009-05-03 12:57:15 +000019
Evan Cheng94214702011-07-01 20:45:01 +000020#define GET_SUBTARGETINFO_HEADER
Evan Cheng385e9302011-07-01 22:36:09 +000021#include "MSP430GenSubtargetInfo.inc"
Evan Cheng94214702011-07-01 20:45:01 +000022
Anton Korobeynikovf2c3e172009-05-03 12:57:15 +000023namespace llvm {
Evan Cheng0ddff1b2011-07-07 07:07:08 +000024class StringRef;
Anton Korobeynikovf2c3e172009-05-03 12:57:15 +000025
Evan Cheng94214702011-07-01 20:45:01 +000026class MSP430Subtarget : public MSP430GenSubtargetInfo {
David Blaikie2d24e2a2011-12-20 02:50:00 +000027 virtual void anchor();
Anton Korobeynikovf2c3e172009-05-03 12:57:15 +000028 bool ExtendedInsts;
29public:
30 /// This constructor initializes the data members to match that
Daniel Dunbar3be03402009-08-02 22:11:08 +000031 /// of the specified triple.
Anton Korobeynikovf2c3e172009-05-03 12:57:15 +000032 ///
Evan Cheng276365d2011-06-30 01:53:36 +000033 MSP430Subtarget(const std::string &TT, const std::string &CPU,
34 const std::string &FS);
Anton Korobeynikovf2c3e172009-05-03 12:57:15 +000035
36 /// ParseSubtargetFeatures - Parses features string setting specified
37 /// subtarget options. Definition of function is auto generated by tblgen.
Evan Cheng0ddff1b2011-07-07 07:07:08 +000038 void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
Anton Korobeynikovf2c3e172009-05-03 12:57:15 +000039};
40} // End llvm namespace
41
42#endif // LLVM_TARGET_MSP430_SUBTARGET_H