Changeset View
Changeset View
Standalone View
Standalone View
lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | MipsABIInfo MipsABIInfo::computeTargetABI(const Triple &TT, StringRef CPU, | ||||
if (Options.getABIName().startswith("o32")) | if (Options.getABIName().startswith("o32")) | ||||
return MipsABIInfo::O32(); | return MipsABIInfo::O32(); | ||||
else if (Options.getABIName().startswith("n32")) | else if (Options.getABIName().startswith("n32")) | ||||
return MipsABIInfo::N32(); | return MipsABIInfo::N32(); | ||||
else if (Options.getABIName().startswith("n64")) | else if (Options.getABIName().startswith("n64")) | ||||
return MipsABIInfo::N64(); | return MipsABIInfo::N64(); | ||||
else if (!Options.getABIName().empty()) | else if (!Options.getABIName().empty()) | ||||
llvm_unreachable("Unknown ABI option for MIPS"); | llvm_unreachable("Unknown ABI option for MIPS"); | ||||
else if (TT.getEnvironment() == Triple::ABI32 || | |||||
TT.getEnvironment() == Triple::AndroidABI32 || | |||||
TT.getEnvironment() == Triple::GNUABI32) | |||||
return MipsABIInfo::O32(); | |||||
else if (TT.getEnvironment() == Triple::ABIN32 || | |||||
TT.getEnvironment() == Triple::GNUABIN32) | |||||
return MipsABIInfo::N32(); | |||||
else if (TT.getEnvironment() == Triple::ABI64 || | |||||
TT.getEnvironment() == Triple::AndroidABI64 || | |||||
TT.getEnvironment() == Triple::GNUABI64) | |||||
return MipsABIInfo::N64(); | |||||
if (TT.getArch() == Triple::mips64 || TT.getArch() == Triple::mips64el) | if (TT.getArch() == Triple::mips64 || TT.getArch() == Triple::mips64el) | ||||
return MipsABIInfo::N64(); | return MipsABIInfo::N64(); | ||||
return MipsABIInfo::O32(); | return MipsABIInfo::O32(); | ||||
} | } | ||||
unsigned MipsABIInfo::GetStackPtr() const { | unsigned MipsABIInfo::GetStackPtr() const { | ||||
return ArePtrs64bit() ? Mips::SP_64 : Mips::SP; | return ArePtrs64bit() ? Mips::SP_64 : Mips::SP; | ||||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |