Use %ull here.
[llvm/stm8.git] / lib / Target / CellSPU / SPUSubtarget.h
blobd7929302f0806b5bc60c1ed2a2f366af749ab69e
1 //===-- SPUSubtarget.h - Define Subtarget for the Cell SPU ------*- 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 Cell SPU-specific subclass of TargetSubtarget.
12 //===----------------------------------------------------------------------===//
14 #ifndef CELLSUBTARGET_H
15 #define CELLSUBTARGET_H
17 #include "llvm/Target/TargetInstrItineraries.h"
18 #include "llvm/Target/TargetSubtarget.h"
20 #include <string>
22 namespace llvm {
23 class GlobalValue;
25 namespace SPU {
26 enum {
27 PROC_NONE,
28 DEFAULT_PROC
32 class SPUSubtarget : public TargetSubtarget {
33 protected:
34 /// stackAlignment - The minimum alignment known to hold of the stack frame
35 /// on entry to the function and which must be maintained by every function.
36 unsigned StackAlignment;
38 /// Selected instruction itineraries (one entry per itinerary class.)
39 InstrItineraryData InstrItins;
41 /// Which SPU processor (this isn't really used, but it's there to keep
42 /// the C compiler happy)
43 unsigned ProcDirective;
45 /// Use (assume) large memory -- effectively disables the LQA/STQA
46 /// instructions that assume 259K local store.
47 bool UseLargeMem;
49 public:
50 /// This constructor initializes the data members to match that
51 /// of the specified triple.
52 ///
53 SPUSubtarget(const std::string &TT, const std::string &FS);
55 /// ParseSubtargetFeatures - Parses features string setting specified
56 /// subtarget options. Definition of function is auto generated by tblgen.
57 std::string ParseSubtargetFeatures(const std::string &FS,
58 const std::string &CPU);
60 /// SetJITMode - This is called to inform the subtarget info that we are
61 /// producing code for the JIT.
62 void SetJITMode();
64 /// getStackAlignment - Returns the minimum alignment known to hold of the
65 /// stack frame on entry to the function and which must be maintained by
66 /// every function for this subtarget.
67 unsigned getStackAlignment() const { return StackAlignment; }
69 /// getInstrItins - Return the instruction itineraies based on subtarget
70 /// selection.
71 const InstrItineraryData &getInstrItineraryData() const {
72 return InstrItins;
75 /// Use large memory addressing predicate
76 bool usingLargeMem() const {
77 return UseLargeMem;
80 /// getTargetDataString - Return the pointer size and type alignment
81 /// properties of this subtarget.
82 const char *getTargetDataString() const {
83 return "E-p:32:32:128-f64:64:128-f32:32:128-i64:32:128-i32:32:128"
84 "-i16:16:128-i8:8:128-i1:8:128-a:0:128-v64:64:128-v128:128:128"
85 "-s:128:128-n32:64";
88 bool enablePostRAScheduler(CodeGenOpt::Level OptLevel,
89 TargetSubtarget::AntiDepBreakMode& Mode,
90 RegClassVector& CriticalPathRCs) const;
92 } // End llvm namespace
94 #endif