X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTarget%2FMSP430%2FMSP430TargetMachine.cpp;h=0f5244d666fc75eefab1dee197ee64c054ce93d9;hb=1555a23335400143f2b54a66aedc4b5cbbb79f8d;hp=a2dee33c6c9e988357ebaa104f858f3e46815a51;hpb=f3085ac973da76bd737d9b88652c0fd0a6097bb2;p=oota-llvm.git diff --git a/lib/Target/MSP430/MSP430TargetMachine.cpp b/lib/Target/MSP430/MSP430TargetMachine.cpp index a2dee33c6c9..0f5244d666f 100644 --- a/lib/Target/MSP430/MSP430TargetMachine.cpp +++ b/lib/Target/MSP430/MSP430TargetMachine.cpp @@ -35,29 +35,36 @@ int MSP430TargetMachineModule = 0; static RegisterTarget X("msp430", "MSP430 [experimental]"); +// Force static initialization when called from llvm/InitializeAllTargets.h +namespace llvm { + void InitializeMSP430Target() { } +} + MSP430TargetMachine::MSP430TargetMachine(const Module &M, const std::string &FS) : Subtarget(*this, M, FS), // FIXME: Check TargetData string. DataLayout("e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8"), InstrInfo(*this), TLInfo(*this), - FrameInfo(TargetFrameInfo::StackGrowsUp, 8, 0) { } + FrameInfo(TargetFrameInfo::StackGrowsDown, 2, -2) { } const TargetAsmInfo *MSP430TargetMachine::createTargetAsmInfo() const { return new MSP430TargetAsmInfo(*this); } -bool MSP430TargetMachine::addInstSelector(PassManagerBase &PM, bool Fast) { +bool MSP430TargetMachine::addInstSelector(PassManagerBase &PM, + CodeGenOpt::Level OptLevel) { // Install an instruction selector. - PM.add(createMSP430ISelDag(*this)); + PM.add(createMSP430ISelDag(*this, OptLevel)); return false; } bool MSP430TargetMachine::addAssemblyEmitter(PassManagerBase &PM, - bool Fast, bool Verbose, + CodeGenOpt::Level OptLevel, + bool Verbose, raw_ostream &Out) { // Output assembly language. - PM.add(createMSP430CodePrinterPass(Out, *this, Fast, Verbose)); + PM.add(createMSP430CodePrinterPass(Out, *this, OptLevel, Verbose)); return false; }