Changeset View
Changeset View
Standalone View
Standalone View
contrib/llvm/tools/clang/lib/Basic/Targets/PPC.h
Show First 20 Lines • Show All 369 Lines • ▼ Show 20 Lines | |||||
class LLVM_LIBRARY_VISIBILITY PPC64TargetInfo : public PPCTargetInfo { | class LLVM_LIBRARY_VISIBILITY PPC64TargetInfo : public PPCTargetInfo { | ||||
public: | public: | ||||
PPC64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) | PPC64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) | ||||
: PPCTargetInfo(Triple, Opts) { | : PPCTargetInfo(Triple, Opts) { | ||||
LongWidth = LongAlign = PointerWidth = PointerAlign = 64; | LongWidth = LongAlign = PointerWidth = PointerAlign = 64; | ||||
IntMaxType = SignedLong; | IntMaxType = SignedLong; | ||||
Int64Type = SignedLong; | Int64Type = SignedLong; | ||||
if (Triple.getEnvironment() != llvm::Triple::UnknownEnvironment) { | |||||
switch (Triple.getEnvironment()){ | |||||
case llvm::Triple::ELFv1: | |||||
ABI = "elfv1"; | |||||
break; | |||||
default: | |||||
ABI = "elfv2"; | |||||
break; | |||||
} | |||||
} else { | |||||
if ((Triple.getOS() == llvm::Triple::FreeBSD) && | |||||
(Triple.getOSMajorVersion() < 13)) { | |||||
ABI = "elfv1"; | |||||
} else { | |||||
ABI = "elfv2"; | |||||
} | |||||
} | |||||
if ((Triple.getArch() == llvm::Triple::ppc64le)) { | if ((Triple.getArch() == llvm::Triple::ppc64le)) { | ||||
resetDataLayout("e-m:e-i64:64-n32:64"); | resetDataLayout("e-m:e-i64:64-n32:64"); | ||||
ABI = "elfv2"; | |||||
} else { | } else { | ||||
resetDataLayout("E-m:e-i64:64-n32:64"); | resetDataLayout("E-m:e-i64:64-n32:64"); | ||||
ABI = Triple.getEnvironment() == llvm::Triple::ELFv2 ? "elfv2" : "elfv1"; | |||||
} | } | ||||
if (Triple.getOS() == llvm::Triple::AIX) | if (Triple.getOS() == llvm::Triple::AIX) | ||||
SuitableAlign = 64; | SuitableAlign = 64; | ||||
if (Triple.isOSFreeBSD() || Triple.getOS() == llvm::Triple::AIX || | if (Triple.isOSFreeBSD() || Triple.getOS() == llvm::Triple::AIX || | ||||
Triple.isMusl()) { | Triple.isMusl()) { | ||||
LongDoubleWidth = LongDoubleAlign = 64; | LongDoubleWidth = LongDoubleAlign = 64; | ||||
▲ Show 20 Lines • Show All 75 Lines • Show Last 20 Lines |