mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
Set ABI if it hasn't been set on the command line.
Check if architecture & ABI combination is valid. llvm-svn: 140230
This commit is contained in:
parent
31b9daf57e
commit
a936c212fa
@ -39,6 +39,15 @@ MipsSubtarget::MipsSubtarget(const std::string &TT, const std::string &CPU,
|
||||
// Initialize scheduling itinerary for the specified CPU.
|
||||
InstrItins = getInstrItineraryForCPU(CPUName);
|
||||
|
||||
// Set MipsABI if it hasn't been set yet.
|
||||
if (MipsABI == UnknownABI)
|
||||
MipsABI = hasMips64() ? N64 : O32;
|
||||
|
||||
// Check if Architecture and ABI are compatible.
|
||||
assert(((!hasMips64() && (isABI_O32() || isABI_EABI())) ||
|
||||
(hasMips64() && (isABI_N32() || isABI_N64()))) &&
|
||||
"Invalid Arch & ABI pair.");
|
||||
|
||||
// Is the target system Linux ?
|
||||
if (TT.find("linux") == std::string::npos)
|
||||
IsLinux = false;
|
||||
|
@ -29,7 +29,7 @@ class MipsSubtarget : public MipsGenSubtargetInfo {
|
||||
public:
|
||||
// NOTE: O64 will not be supported.
|
||||
enum MipsABIEnum {
|
||||
O32, N32, N64, EABI
|
||||
UnknownABI, O32, N32, N64, EABI
|
||||
};
|
||||
|
||||
protected:
|
||||
|
Loading…
Reference in New Issue
Block a user