blob: 81e3783d72999f098d75cb4a4dedf92aad47b3e7 [file] [log] [blame]
Sanjiv Gupta0e687712008-05-13 09:02:57 +00001//=====-- PIC16Subtarget.h - Define Subtarget for the PIC16 ---*- C++ -*--====//
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//
10// This file declares the PIC16 specific subclass of TargetSubtarget.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef PIC16SUBTARGET_H
15#define PIC16SUBTARGET_H
16
Sanjiv Gupta2010b3e2008-05-14 11:31:39 +000017#include "llvm/Target/TargetSubtarget.h"
Sanjiv Gupta0e687712008-05-13 09:02:57 +000018
19#include <string>
20
21namespace llvm {
Sanjiv Gupta0e687712008-05-13 09:02:57 +000022
23class PIC16Subtarget : public TargetSubtarget {
Sanjiv Guptab1b5ffd2008-11-19 11:00:54 +000024
25 // IsCooper - Target ISA is Cooper.
26 bool IsCooper;
Sanjiv Gupta0e687712008-05-13 09:02:57 +000027
28public:
29 /// This constructor initializes the data members to match that
Daniel Dunbar3be03402009-08-02 22:11:08 +000030 /// of the specified triple.
Sanjiv Gupta0e687712008-05-13 09:02:57 +000031 ///
Daniel Dunbar3be03402009-08-02 22:11:08 +000032 PIC16Subtarget(const std::string &TT, const std::string &FS, bool Cooper);
Sanjiv Gupta0e687712008-05-13 09:02:57 +000033
Sanjiv Guptab1b5ffd2008-11-19 11:00:54 +000034 /// isCooper - Returns true if the target ISA is Cooper.
35 bool isCooper() const { return IsCooper; }
36
Sanjiv Gupta0e687712008-05-13 09:02:57 +000037 /// ParseSubtargetFeatures - Parses features string setting specified
38 /// subtarget options. Definition of function is auto generated by tblgen.
Anton Korobeynikov41a02432009-05-23 19:50:50 +000039 std::string ParseSubtargetFeatures(const std::string &FS,
40 const std::string &CPU);
Sanjiv Gupta0e687712008-05-13 09:02:57 +000041};
42} // End llvm namespace
43
Sanjiv Guptab1b5ffd2008-11-19 11:00:54 +000044#endif // PIC16SUBTARGET_H