Scott Michel | 564427e | 2007-12-05 01:24:05 +0000 | [diff] [blame^] | 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. |
| 7 | // |
| 8 | // See README.txt for details. |
| 9 | // |
| 10 | //===----------------------------------------------------------------------===// |
| 11 | // |
| 12 | // This file implements the CellSPU-specific subclass of TargetSubtarget. |
| 13 | // |
| 14 | //===----------------------------------------------------------------------===// |
| 15 | |
| 16 | #include "SPUSubtarget.h" |
| 17 | #include "SPU.h" |
| 18 | #include "llvm/Module.h" |
| 19 | #include "llvm/Target/TargetMachine.h" |
| 20 | #include "SPUGenSubtarget.inc" |
| 21 | |
| 22 | using namespace llvm; |
| 23 | |
| 24 | SPUSubtarget::SPUSubtarget(const TargetMachine &tm, const Module &M, |
| 25 | const std::string &FS) : |
| 26 | TM(tm), |
| 27 | StackAlignment(16), |
| 28 | ProcDirective(SPU::DEFAULT_PROC), |
| 29 | UseLargeMem(false) |
| 30 | { |
| 31 | // Should be the target SPU processor type. For now, since there's only |
| 32 | // one, simply default to the current "v0" default: |
| 33 | std::string default_cpu("v0"); |
| 34 | |
| 35 | // Parse features string. |
| 36 | ParseSubtargetFeatures(FS, default_cpu); |
| 37 | } |
| 38 | |
| 39 | /// SetJITMode - This is called to inform the subtarget info that we are |
| 40 | /// producing code for the JIT. |
| 41 | void SPUSubtarget::SetJITMode() { |
| 42 | } |