blob: 90c5a0511d12d55778e045950eed6d5bdfad839e [file] [log] [blame]
Scott Michel564427e2007-12-05 01:24:05 +00001//===- 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
Scott Michel2466c372007-12-05 01:40:25 +00006// Department at The Aerospace Corporation and is distributed under the
7// University of Illinois Open Source License. See LICENSE.TXT for details.
Scott Michel564427e2007-12-05 01:24:05 +00008//
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
21using namespace llvm;
22
23SPUSubtarget::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.
40void SPUSubtarget::SetJITMode() {
41}