blob: 60ddcde57abafc692d2da96f8575affa071667a0 [file] [log] [blame]
Misha Brukman5dfe3a92004-06-21 16:55:25 +00001//===-- PowerPCTargetMachine.cpp - Define TargetMachine for PowerPC -------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file was developed by the LLVM research group and is distributed under
6// the University of Illinois Open Source License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10//
11//===----------------------------------------------------------------------===//
12
13#include "PowerPCTargetMachine.h"
14#include "PowerPC.h"
Misha Brukman5dfe3a92004-06-21 16:55:25 +000015#include "llvm/Module.h"
16#include "llvm/PassManager.h"
Misha Brukman8c9f5202004-06-21 18:30:31 +000017#include "llvm/CodeGen/IntrinsicLowering.h"
Misha Brukman5dfe3a92004-06-21 16:55:25 +000018#include "llvm/CodeGen/MachineFunction.h"
19#include "llvm/CodeGen/Passes.h"
Chris Lattner68905bb2004-07-11 04:17:58 +000020#include "llvm/Target/TargetOptions.h"
Chris Lattnerd36c9702004-07-11 02:48:49 +000021#include "llvm/Target/TargetMachineRegistry.h"
Misha Brukman5dfe3a92004-06-21 16:55:25 +000022#include "llvm/Transforms/Scalar.h"
Chris Lattnerd36c9702004-07-11 02:48:49 +000023#include <iostream>
Misha Brukman5dfe3a92004-06-21 16:55:25 +000024using namespace llvm;
25
Misha Brukman01458812004-08-11 00:11:25 +000026PowerPCTargetMachine::PowerPCTargetMachine(const std::string &name,
27 IntrinsicLowering *IL,
28 const TargetData &TD,
29 const TargetFrameInfo &TFI,
30 const PowerPCJITInfo &TJI)
31 : TargetMachine(name, IL, TD), FrameInfo(TFI), JITInfo(TJI) {}
Chris Lattnerd36c9702004-07-11 02:48:49 +000032
Misha Brukman01eca8d2004-07-12 23:36:12 +000033unsigned PowerPCTargetMachine::getJITMatchQuality() {
34#if defined(__POWERPC__) || defined (__ppc__) || defined(_POWER)
35 return 10;
36#else
37 return 0;
38#endif
39}
Misha Brukman01eca8d2004-07-12 23:36:12 +000040
Misha Brukman5dfe3a92004-06-21 16:55:25 +000041void PowerPCJITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
Misha Brukman01458812004-08-11 00:11:25 +000042 assert(0 && "Cannot execute PowerPCJITInfo::addPassesToJITCompile()");
43}
Misha Brukman5dfe3a92004-06-21 16:55:25 +000044
Misha Brukman01458812004-08-11 00:11:25 +000045void PowerPCJITInfo::replaceMachineCodeForFunction(void *Old, void *New) {
46 assert(0 && "Cannot execute PowerPCJITInfo::replaceMachineCodeForFunction()");
47}
Misha Brukman5dfe3a92004-06-21 16:55:25 +000048
Misha Brukman01458812004-08-11 00:11:25 +000049void *PowerPCJITInfo::getJITStubForFunction(Function *F,
50 MachineCodeEmitter &MCE) {
51 assert(0 && "Cannot execute PowerPCJITInfo::getJITStubForFunction()");
52 return 0;
Misha Brukman5dfe3a92004-06-21 16:55:25 +000053}