XCoreTargetMachine.cpp revision 208599
1193323Sed//===-- XCoreTargetMachine.cpp - Define TargetMachine for XCore -----------===// 2193323Sed// 3193323Sed// The LLVM Compiler Infrastructure 4193323Sed// 5193323Sed// This file is distributed under the University of Illinois Open Source 6193323Sed// License. See LICENSE.TXT for details. 7193323Sed// 8193323Sed//===----------------------------------------------------------------------===// 9193323Sed// 10193323Sed// 11193323Sed//===----------------------------------------------------------------------===// 12193323Sed 13198090Srdivacky#include "XCoreMCAsmInfo.h" 14193323Sed#include "XCoreTargetMachine.h" 15193323Sed#include "XCore.h" 16193323Sed#include "llvm/Module.h" 17193323Sed#include "llvm/PassManager.h" 18198090Srdivacky#include "llvm/Target/TargetRegistry.h" 19193323Sedusing namespace llvm; 20193323Sed 21193323Sed/// XCoreTargetMachine ctor - Create an ILP32 architecture model 22193323Sed/// 23198090SrdivackyXCoreTargetMachine::XCoreTargetMachine(const Target &T, const std::string &TT, 24198090Srdivacky const std::string &FS) 25198090Srdivacky : LLVMTargetMachine(T, TT), 26198090Srdivacky Subtarget(TT, FS), 27193323Sed DataLayout("e-p:32:32:32-a0:0:32-f32:32:32-f64:32:32-i1:8:32-i8:8:32-" 28199481Srdivacky "i16:16:32-i32:32:32-i64:32:32-n32"), 29193323Sed InstrInfo(), 30193323Sed FrameInfo(*this), 31208599Srdivacky TLInfo(*this), 32208599Srdivacky TSInfo(*this) { 33193323Sed} 34193323Sed 35193323Sedbool XCoreTargetMachine::addInstSelector(PassManagerBase &PM, 36193323Sed CodeGenOpt::Level OptLevel) { 37193323Sed PM.add(createXCoreISelDag(*this)); 38193323Sed return false; 39193323Sed} 40193323Sed 41198090Srdivacky// Force static initialization. 42198090Srdivackyextern "C" void LLVMInitializeXCoreTarget() { 43198090Srdivacky RegisterTargetMachine<XCoreTargetMachine> X(TheXCoreTarget); 44198090Srdivacky RegisterAsmInfo<XCoreMCAsmInfo> Y(TheXCoreTarget); 45193323Sed} 46