mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 21:29:41 +00:00
- This was overkill and inconsistently implemented. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77114 91177308-0d34-0410-b5e6-96231b3b80d8
46 lines
1.4 KiB
C++
46 lines
1.4 KiB
C++
//===-- PowerPCTargetInfo.cpp - PowerPC Target Implementation -------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "PPC.h"
|
|
#include "llvm/Module.h"
|
|
#include "llvm/Target/TargetRegistry.h"
|
|
using namespace llvm;
|
|
|
|
Target llvm::ThePPC32Target;
|
|
|
|
static unsigned PPC32_TripleMatchQuality(const std::string &TT) {
|
|
// We strongly match "powerpc-*".
|
|
if (TT.size() >= 8 && std::string(TT.begin(), TT.begin()+8) == "powerpc-")
|
|
return 20;
|
|
|
|
return 0;
|
|
}
|
|
|
|
Target llvm::ThePPC64Target;
|
|
|
|
static unsigned PPC64_TripleMatchQuality(const std::string &TT) {
|
|
// We strongly match "powerpc64-*".
|
|
if (TT.size() >= 10 && std::string(TT.begin(), TT.begin()+10) == "powerpc64-")
|
|
return 20;
|
|
|
|
return 0;
|
|
}
|
|
|
|
extern "C" void LLVMInitializePowerPCTargetInfo() {
|
|
TargetRegistry::RegisterTarget(ThePPC32Target, "ppc32",
|
|
"PowerPC 32",
|
|
&PPC32_TripleMatchQuality,
|
|
/*HasJIT=*/true);
|
|
|
|
TargetRegistry::RegisterTarget(ThePPC64Target, "ppc64",
|
|
"PowerPC 64",
|
|
&PPC64_TripleMatchQuality,
|
|
/*HasJIT=*/true);
|
|
}
|