Index: llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h =================================================================== --- llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h +++ llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h @@ -23,7 +23,7 @@ class MipsABIInfo { public: - enum class ABI { Unknown, O32, N32, N64, EABI }; + enum class ABI { Unknown, O32, N32, N64 }; protected: ABI ThisABI; @@ -35,7 +35,6 @@ static MipsABIInfo O32() { return MipsABIInfo(ABI::O32); } static MipsABIInfo N32() { return MipsABIInfo(ABI::N32); } static MipsABIInfo N64() { return MipsABIInfo(ABI::N64); } - static MipsABIInfo EABI() { return MipsABIInfo(ABI::EABI); } static MipsABIInfo computeTargetABI(const Triple &TT, StringRef CPU, const MCTargetOptions &Options); @@ -43,7 +42,6 @@ bool IsO32() const { return ThisABI == ABI::O32; } bool IsN32() const { return ThisABI == ABI::N32; } bool IsN64() const { return ThisABI == ABI::N64; } - bool IsEABI() const { return ThisABI == ABI::EABI; } ABI GetEnumValue() const { return ThisABI; } /// The registers to use for byval arguments. Index: llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp =================================================================== --- llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp +++ llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp @@ -42,7 +42,7 @@ unsigned MipsABIInfo::GetCalleeAllocdArgSizeInBytes(CallingConv::ID CC) const { if (IsO32()) return CC != CallingConv::Fast ? 16 : 0; - if (IsN32() || IsN64() || IsEABI()) + if (IsN32() || IsN64()) return 0; llvm_unreachable("Unhandled ABI"); } @@ -55,8 +55,6 @@ return MipsABIInfo::N32(); else if (Options.getABIName().startswith("n64")) return MipsABIInfo::N64(); - else if (Options.getABIName().startswith("eabi")) - return MipsABIInfo::EABI(); else if (!Options.getABIName().empty()) llvm_unreachable("Unknown ABI option for MIPS"); Index: llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp =================================================================== --- llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp +++ llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp @@ -313,7 +313,6 @@ case MipsABIInfo::ABI::O32: return "abi32"; case MipsABIInfo::ABI::N32: return "abiN32"; case MipsABIInfo::ABI::N64: return "abi64"; - case MipsABIInfo::ABI::EABI: return "eabi32"; // TODO: handle eabi64 default: llvm_unreachable("Unknown Mips ABI"); } } @@ -713,15 +712,6 @@ // TODO: handle O64 ABI - if (ABI.IsEABI()) { - if (STI.isGP32bit()) - OutStreamer->SwitchSection(OutContext.getELFSection(".gcc_compiled_long32", - ELF::SHT_PROGBITS, 0)); - else - OutStreamer->SwitchSection(OutContext.getELFSection(".gcc_compiled_long64", - ELF::SHT_PROGBITS, 0)); - } - TS.updateABIInfo(STI); // We should always emit a '.module fp=...' but binutils 2.24 does not accept Index: llvm/trunk/lib/Target/Mips/MipsCallingConv.td =================================================================== --- llvm/trunk/lib/Target/Mips/MipsCallingConv.td +++ llvm/trunk/lib/Target/Mips/MipsCallingConv.td @@ -212,48 +212,6 @@ ]>; //===----------------------------------------------------------------------===// -// Mips EABI Calling Convention -//===----------------------------------------------------------------------===// - -def CC_MipsEABI : CallingConv<[ - // Promote i8/i16 arguments to i32. - CCIfType<[i8, i16], CCPromoteToType>, - - // Integer arguments are passed in integer registers. - CCIfType<[i32], CCAssignToReg<[A0, A1, A2, A3, T0, T1, T2, T3]>>, - - // Single fp arguments are passed in pairs within 32-bit mode - CCIfType<[f32], CCIfSubtarget<"isSingleFloat()", - CCAssignToReg<[F12, F13, F14, F15, F16, F17, F18, F19]>>>, - - CCIfType<[f32], CCIfSubtargetNot<"isSingleFloat()", - CCAssignToReg<[F12, F14, F16, F18]>>>, - - // The first 4 double fp arguments are passed in single fp registers. - CCIfType<[f64], CCIfSubtargetNot<"isSingleFloat()", - CCAssignToReg<[D6, D7, D8, D9]>>>, - - // Integer values get stored in stack slots that are 4 bytes in - // size and 4-byte aligned. - CCIfType<[i32, f32], CCAssignToStack<4, 4>>, - - // Integer values get stored in stack slots that are 8 bytes in - // size and 8-byte aligned. - CCIfType<[f64], CCIfSubtargetNot<"isSingleFloat()", CCAssignToStack<8, 8>>> -]>; - -def RetCC_MipsEABI : CallingConv<[ - // i32 are returned in registers V0, V1 - CCIfType<[i32], CCAssignToReg<[V0, V1]>>, - - // f32 are returned in registers F0, F1 - CCIfType<[f32], CCAssignToReg<[F0, F1]>>, - - // f64 are returned in register D0 - CCIfType<[f64], CCIfSubtargetNot<"isSingleFloat()", CCAssignToReg<[D0]>>> -]>; - -//===----------------------------------------------------------------------===// // Mips FastCC Calling Convention //===----------------------------------------------------------------------===// def CC_MipsO32_FastCC : CallingConv<[ @@ -325,7 +283,6 @@ // Stack parameter slots for i32 and f32 are 32-bit words and 4-byte aligned. CCIfType<[i32, f32], CCAssignToStack<4, 4>>, - CCIfSubtarget<"isABI_EABI()", CCDelegateTo>, CCIfSubtarget<"isABI_O32()", CCDelegateTo>, CCDelegateTo ]>; @@ -335,7 +292,6 @@ //===----------------------------------------------------------------------===// def RetCC_Mips : CallingConv<[ - CCIfSubtarget<"isABI_EABI()", CCDelegateTo>, CCIfSubtarget<"isABI_N32()", CCDelegateTo>, CCIfSubtarget<"isABI_N64()", CCDelegateTo>, CCDelegateTo @@ -377,8 +333,6 @@ CCIfCC<"CallingConv::Fast", CCDelegateTo>, - // FIXME: There wasn't an EABI case in the original code and it seems unlikely - // that it's the same as CC_MipsN CCIfSubtarget<"isABI_O32()", CCDelegateTo>, CCDelegateTo ]>; @@ -386,8 +340,6 @@ def CC_Mips_VarArg : CallingConv<[ CCIfByVal>, - // FIXME: There wasn't an EABI case in the original code and it seems unlikely - // that it's the same as CC_MipsN_VarArg CCIfSubtarget<"isABI_O32()", CCDelegateTo>, CCDelegateTo ]>; Index: llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp =================================================================== --- llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp +++ llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp @@ -2670,7 +2670,6 @@ DAG.getCopyFromReg(Chain, DL, ABI.IsN64() ? Mips::SP_64 : Mips::SP, getPointerTy(DAG.getDataLayout())); - // With EABI is it possible to have 16 args on registers. std::deque< std::pair > RegsToPass; SmallVector MemOpChains; Index: llvm/trunk/lib/Target/Mips/MipsSubtarget.h =================================================================== --- llvm/trunk/lib/Target/Mips/MipsSubtarget.h +++ llvm/trunk/lib/Target/Mips/MipsSubtarget.h @@ -163,8 +163,6 @@ void getCriticalPathRCs(RegClassVector &CriticalPathRCs) const override; CodeGenOpt::Level getOptLevelToEnablePostRAScheduler() const override; - /// Only O32 and EABI supported right now. - bool isABI_EABI() const; bool isABI_N64() const; bool isABI_N32() const; bool isABI_O32() const; Index: llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp =================================================================== --- llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp +++ llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp @@ -90,7 +90,7 @@ report_fatal_error("Code generation for MIPS-V is not implemented", false); // Check if Architecture and ABI are compatible. - assert(((!isGP64bit() && (isABI_O32() || isABI_EABI())) || + assert(((!isGP64bit() && isABI_O32()) || (isGP64bit() && (isABI_N32() || isABI_N64()))) && "Invalid Arch & ABI pair."); @@ -164,7 +164,6 @@ return TM.getRelocationModel(); } -bool MipsSubtarget::isABI_EABI() const { return getABI().IsEABI(); } bool MipsSubtarget::isABI_N64() const { return getABI().IsN64(); } bool MipsSubtarget::isABI_N32() const { return getABI().IsN32(); } bool MipsSubtarget::isABI_O32() const { return getABI().IsO32(); }