blob: 979595264472f3c9d9d5ceb4c655f5d448b8769f [file] [log] [blame]
Daniel Dunbar56e29472009-07-15 06:35:19 +00001//===-- PowerPCTargetInfo.cpp - PowerPC Target Implementation -------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
Daniel Dunbar67038c12009-07-18 23:03:22 +000010#include "PPC.h"
Chandler Carruth9fb823b2013-01-02 11:36:10 +000011#include "llvm/IR/Module.h"
Evan Cheng2bb40352011-08-24 18:08:43 +000012#include "llvm/Support/TargetRegistry.h"
Daniel Dunbar56e29472009-07-15 06:35:19 +000013using namespace llvm;
14
Mehdi Aminif42454b2016-10-09 23:00:34 +000015Target &llvm::getThePPC32Target() {
16 static Target ThePPC32Target;
17 return ThePPC32Target;
18}
19Target &llvm::getThePPC64Target() {
20 static Target ThePPC64Target;
21 return ThePPC64Target;
22}
23Target &llvm::getThePPC64LETarget() {
24 static Target ThePPC64LETarget;
25 return ThePPC64LETarget;
26}
Daniel Dunbar56e29472009-07-15 06:35:19 +000027
Douglas Katzman03dfca02015-05-12 19:42:31 +000028extern "C" void LLVMInitializePowerPCTargetInfo() {
Mehdi Aminif42454b2016-10-09 23:00:34 +000029 RegisterTarget<Triple::ppc, /*HasJIT=*/true> X(getThePPC32Target(), "ppc32",
Daniel Sanders725584e2017-11-15 23:55:44 +000030 "PowerPC 32", "PPC");
Daniel Dunbar56e29472009-07-15 06:35:19 +000031
Mehdi Aminif42454b2016-10-09 23:00:34 +000032 RegisterTarget<Triple::ppc64, /*HasJIT=*/true> Y(getThePPC64Target(), "ppc64",
Daniel Sanders725584e2017-11-15 23:55:44 +000033 "PowerPC 64", "PPC");
Bill Schmidt0a9170d2013-07-26 01:35:43 +000034
Mehdi Aminif42454b2016-10-09 23:00:34 +000035 RegisterTarget<Triple::ppc64le, /*HasJIT=*/true> Z(
Daniel Sanders725584e2017-11-15 23:55:44 +000036 getThePPC64LETarget(), "ppc64le", "PowerPC 64 LE", "PPC");
Daniel Dunbar56e29472009-07-15 06:35:19 +000037}