zpu: wip eke out some simple instructions for load/store/add
[llvm/zpu.git] / lib / Target / ZPU / ZPUSubtarget.h
blob63e04e26f7bc556ab3e3a539ecefee0caf2d78c8
1 //=====-- ZPUSubtarget.h - Define Subtarget for the ZPU -----*- 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 ZPU specific subclass of TargetSubtarget.
12 //===----------------------------------------------------------------------===//
14 #ifndef ZPUSUBTARGET_H
15 #define ZPUSUBTARGET_H
17 #include "llvm/Target/TargetSubtarget.h"
18 #include "llvm/Target/TargetMachine.h"
20 #include <string>
22 namespace llvm {
24 class ZPUSubtarget : public TargetSubtarget {
26 public:
29 protected:
31 InstrItineraryData InstrItins;
33 public:
35 enum ZPUArchEnum {
36 ZPU1
38 // Mips architecture version
39 ZPUArchEnum ZPUArchVersion;
41 // HasSwap - Byte and half swap instructions.
42 bool HasSwap;
43 /// This constructor initializes the data members to match that
44 /// of the specified triple.
45 ZPUSubtarget(const std::string &TT, const std::string &FS, bool little);
47 /// ParseSubtargetFeatures - Parses features string setting specified
48 /// subtarget options. Definition of function is auto generated by tblgen.
49 std::string ParseSubtargetFeatures(const std::string &FS,
50 const std::string &CPU);
52 bool hasSwap() const { return HasSwap; }
55 } // End llvm namespace
57 #endif