More working CellSPU tests:
[oota-llvm.git] / lib / Target / CellSPU / SPUSubtarget.cpp
1 //===- SPUSubtarget.cpp - STI Cell SPU Subtarget Information --------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by a team from the Computer Systems Research
6 // Department at The Aerospace Corporation and is distributed under the
7 // University of Illinois Open Source License. See LICENSE.TXT for details.
8 //
9 //===----------------------------------------------------------------------===//
10 //
11 // This file implements the CellSPU-specific subclass of TargetSubtarget.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #include "SPUSubtarget.h"
16 #include "SPU.h"
17 #include "llvm/Module.h"
18 #include "llvm/Target/TargetMachine.h"
19 #include "SPUGenSubtarget.inc"
20
21 using namespace llvm;
22
23 SPUSubtarget::SPUSubtarget(const TargetMachine &tm, const Module &M,
24                            const std::string &FS) :
25   TM(tm),
26   StackAlignment(16),
27   ProcDirective(SPU::DEFAULT_PROC),
28   UseLargeMem(false)
29 {
30   // Should be the target SPU processor type. For now, since there's only
31   // one, simply default to the current "v0" default:
32   std::string default_cpu("v0");
33
34   // Parse features string.
35   ParseSubtargetFeatures(FS, default_cpu);
36 }
37
38 /// SetJITMode - This is called to inform the subtarget info that we are
39 /// producing code for the JIT.
40 void SPUSubtarget::SetJITMode() {
41 }