llvm/clang/lib/Basic/Targets/PPC.cpp

//===--- PPC.cpp - Implement PPC target feature support -------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file implements PPC TargetInfo objects.
//
//===----------------------------------------------------------------------===//

#include "PPC.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/MacroBuilder.h"
#include "clang/Basic/TargetBuiltins.h"
#include "llvm/TargetParser/PPCTargetParser.h"

usingnamespaceclang;
usingnamespaceclang::targets;

static constexpr Builtin::Info BuiltinInfo[] =;

/// handleTargetFeatures - Perform initialization based on the user
/// configured set of features.
bool PPCTargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
                                         DiagnosticsEngine &Diags) {}

static void defineXLCompatMacros(MacroBuilder &Builder) {}

/// PPCTargetInfo::getTargetDefines - Return a set of the PowerPC-specific
/// #defines that are not tied to a specific subtarget.
void PPCTargetInfo::getTargetDefines(const LangOptions &Opts,
                                     MacroBuilder &Builder) const {}

// Handle explicit options being passed to the compiler here:
// - if we've explicitly turned off vsx and turned on any of:
//   - power8-vector
//   - direct-move
//   - float128
//   - power9-vector
//   - paired-vector-memops
//   - mma
//   - power10-vector
// - if we've explicitly turned on vsx and turned off altivec.
// - if we've explicitly turned off hard-float and turned on altivec.
// then go ahead and error since the customer has expressed an incompatible
// set of options.
static bool ppcUserFeaturesCheck(DiagnosticsEngine &Diags,
                                 const std::vector<std::string> &FeaturesVec) {}

bool PPCTargetInfo::initFeatureMap(
    llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU,
    const std::vector<std::string> &FeaturesVec) const {}

// Add any Power10 specific features.
void PPCTargetInfo::addP10SpecificFeatures(
    llvm::StringMap<bool> &Features) const {}

// Add any Power11 specific features.
void PPCTargetInfo::addP11SpecificFeatures(
    llvm::StringMap<bool> &Features) const {}

// Add features specific to the "Future" CPU.
void PPCTargetInfo::addFutureSpecificFeatures(
    llvm::StringMap<bool> &Features) const {}

bool PPCTargetInfo::hasFeature(StringRef Feature) const {}

void PPCTargetInfo::setFeatureEnabled(llvm::StringMap<bool> &Features,
                                      StringRef Name, bool Enabled) const {}

// Make sure that registers are added in the correct array index which should be
// the DWARF number for PPC registers.
const char *const PPCTargetInfo::GCCRegNames[] =;

ArrayRef<const char *> PPCTargetInfo::getGCCRegNames() const {}

const TargetInfo::GCCRegAlias PPCTargetInfo::GCCRegAliases[] =;

ArrayRef<TargetInfo::GCCRegAlias> PPCTargetInfo::getGCCRegAliases() const {}

// PPC ELFABIv2 DWARF Definition "Table 2.26. Mappings of Common Registers".
// vs0 ~ vs31 is mapping to 32 - 63,
// vs32 ~ vs63 is mapping to 77 - 108.
// And this mapping applies to all OSes which run on powerpc.
const TargetInfo::AddlRegName GCCAddlRegNames[] =;

ArrayRef<TargetInfo::AddlRegName> PPCTargetInfo::getGCCAddlRegNames() const {}

bool PPCTargetInfo::isValidCPUName(StringRef Name) const {}

void PPCTargetInfo::fillValidCPUList(SmallVectorImpl<StringRef> &Values) const {}

void PPCTargetInfo::adjust(DiagnosticsEngine &Diags, LangOptions &Opts) {}

ArrayRef<Builtin::Info> PPCTargetInfo::getTargetBuiltins() const {}

bool PPCTargetInfo::validateCpuSupports(StringRef FeatureStr) const {}

bool PPCTargetInfo::validateCpuIs(StringRef CPUName) const {}