Index: lib/Target/Mips/MipsISelLowering.h =================================================================== --- lib/Target/Mips/MipsISelLowering.h +++ lib/Target/Mips/MipsISelLowering.h @@ -329,6 +329,21 @@ DAG.getNode(MipsISD::Lo, DL, Ty, Lo)); } + // This method creates the following nodes, which are necessary for + // computing symbol's address using gp-relative addressing: + // + // (add $gp, %gp_rel(sym)) + template + SDValue getAddrGPRel(NodeTy *N, EVT Ty, SelectionDAG &DAG) const { + SDLoc DL(N); + assert(Ty == MVT::i32); + SDValue GPRel = getTargetNode(N, Ty, DAG, MipsII::MO_GPREL); + return DAG.getNode(ISD::ADD, DL, Ty, + DAG.getRegister(Mips::GP, Ty), + DAG.getNode(MipsISD::GPRel, DL, DAG.getVTList(Ty), + GPRel)); + } + /// This function fills Ops, which is the list of operands that will later /// be used when a function call node is created. It also generates /// copyToReg nodes to set up argument registers. Index: lib/Target/Mips/MipsISelLowering.cpp =================================================================== --- lib/Target/Mips/MipsISelLowering.cpp +++ lib/Target/Mips/MipsISelLowering.cpp @@ -1583,8 +1583,6 @@ SDValue MipsTargetLowering::lowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const { - // FIXME there isn't actually debug info here - SDLoc DL(Op); EVT Ty = Op.getValueType(); GlobalAddressSDNode *N = cast(Op); const GlobalValue *GV = N->getGlobal(); @@ -1594,15 +1592,9 @@ const MipsTargetObjectFile &TLOF = (const MipsTargetObjectFile&)getObjFileLowering(); - // %gp_rel relocation - if (TLOF.IsGlobalInSmallSection(GV, getTargetMachine())) { - SDValue GA = DAG.getTargetGlobalAddress(GV, DL, MVT::i32, 0, - MipsII::MO_GPREL); - SDValue GPRelNode = DAG.getNode(MipsISD::GPRel, DL, - DAG.getVTList(MVT::i32), GA); - SDValue GPReg = DAG.getRegister(Mips::GP, MVT::i32); - return DAG.getNode(ISD::ADD, DL, MVT::i32, GPReg, GPRelNode); - } + if (TLOF.IsGlobalInSmallSection(GV, getTargetMachine())) + // %gp_rel relocation + return getAddrGPRel(N, Ty, DAG); // %hi/%lo relocation return getAddrNonPIC(N, Ty, DAG); @@ -1733,21 +1725,20 @@ SDValue MipsTargetLowering:: lowerConstantPool(SDValue Op, SelectionDAG &DAG) const { - // gp_rel relocation - // FIXME: we should reference the constant pool using small data sections, - // but the asm printer currently doesn't support this feature without - // hacking it. This feature should come soon so we can uncomment the - // stuff below. - //if (IsInSmallSection(C->getType())) { - // SDValue GPRelNode = DAG.getNode(MipsISD::GPRel, MVT::i32, CP); - // SDValue GOT = DAG.getGLOBAL_OFFSET_TABLE(MVT::i32); - // ResNode = DAG.getNode(ISD::ADD, MVT::i32, GOT, GPRelNode); ConstantPoolSDNode *N = cast(Op); EVT Ty = Op.getValueType(); if (getTargetMachine().getRelocationModel() != Reloc::PIC_ && - !Subtarget.isABI_N64()) + !Subtarget.isABI_N64()) { + const MipsTargetObjectFile &TLOF = + (const MipsTargetObjectFile&)getObjFileLowering(); + + if (TLOF.IsConstantInSmallSection(N->getConstVal(), getTargetMachine())) + // %gp_rel relocation + return getAddrGPRel(N, Ty, DAG); + return getAddrNonPIC(N, Ty, DAG); + } return getAddrLocal(N, Ty, DAG, Subtarget.isABI_N32() || Subtarget.isABI_N64()); Index: lib/Target/Mips/MipsSubtarget.h =================================================================== --- lib/Target/Mips/MipsSubtarget.h +++ lib/Target/Mips/MipsSubtarget.h @@ -90,8 +90,8 @@ // isLinux - Target system is Linux. Is false we consider ELFOS for now. bool IsLinux; - // UseSmallSection - Small section is used. - bool UseSmallSection; + // Small data and bss section threshold size. + unsigned SmallSectionThreshold; /// Features related to the presence of specific instructions. @@ -231,7 +231,8 @@ bool hasDSPR2() const { return HasDSPR2; } bool hasMSA() const { return HasMSA; } bool isLinux() const { return IsLinux; } - bool useSmallSection() const { return UseSmallSection; } + unsigned getSmallSectionThreshold() const { return SmallSectionThreshold; } + bool useSmallSection() const { return SmallSectionThreshold > 0; } bool hasStandardEncoding() const { return !inMips16Mode(); } Index: lib/Target/Mips/MipsSubtarget.cpp =================================================================== --- lib/Target/Mips/MipsSubtarget.cpp +++ lib/Target/Mips/MipsSubtarget.cpp @@ -58,6 +58,15 @@ cl::desc("MIPS: mips16 constant islands enable."), cl::init(true)); +static cl::opt +GPOpt("mgpopt", cl::Hidden, + cl::desc("MIPS: Enable gp-relative addressing of small data items"), + cl::init(true)); + +static cl::opt +SSThreshold("mips-ssection-threshold", cl::Hidden, + cl::desc("Small data and bss section threshold size")); + /// Select the Mips CPU for the given triple and cpu name. /// FIXME: Merge with the copy in MipsMCTargetDesc.cpp static StringRef selectMipsCPU(Triple TT, StringRef CPU) { @@ -171,10 +180,33 @@ if (TT.find("linux") == std::string::npos) IsLinux = false; - // Set UseSmallSection. + // -mabicalls defaults to false for targets other than Linux and NaCl. + if (!(IsLinux || isTargetNaCl()) + && ((getFeatureBits() & Mips::FeatureNoABICalls) == 0)) + NoABICalls = true; + + if (NoABICalls && TM->getRelocationModel() == Reloc::PIC_) + report_fatal_error("position-independent code requires '-mabicalls'"); + + // Set SmallSectionThreshold. // TODO: Investigate the IsLinux check. I suspect it's really checking for // bare-metal. - UseSmallSection = !IsLinux && (TM->getRelocationModel() == Reloc::Static); + if (NoABICalls) { + if (!GPOpt) + SmallSectionThreshold = 0; + else if (SSThreshold.getNumOccurrences() > 0) + SmallSectionThreshold = SSThreshold; + else { + // If -mips-ssection-threshold is not specified, it defaults to 8 for + // targets other than Linux and NaCl. + SmallSectionThreshold = !(IsLinux || isTargetNaCl()) ? 8 : 0; + } + } else { + if (GPOpt) + errs() << "warning: cannot use small-data accesses for '-mabicalls'" + << "\n"; + SmallSectionThreshold = 0; + } } /// This overrides the PostRAScheduler bit in the SchedModel for any CPU. Index: lib/Target/Mips/MipsTargetObjectFile.h =================================================================== --- lib/Target/Mips/MipsTargetObjectFile.h +++ lib/Target/Mips/MipsTargetObjectFile.h @@ -17,21 +17,31 @@ class MipsTargetObjectFile : public TargetLoweringObjectFileELF { const MCSection *SmallDataSection; const MCSection *SmallBSSSection; + const TargetMachine *TM; public: void Initialize(MCContext &Ctx, const TargetMachine &TM) override; - - /// IsGlobalInSmallSection - Return true if this global address should be - /// placed into small data/bss section. - bool IsGlobalInSmallSection(const GlobalValue *GV, - const TargetMachine &TM, SectionKind Kind)const; + /// Return true if this global address should be placed into small data/bss + /// section. + bool IsGlobalInSmallSection(const GlobalValue *GV, const TargetMachine &TM, + SectionKind Kind) const; bool IsGlobalInSmallSection(const GlobalValue *GV, const TargetMachine &TM) const; + bool IsGlobalInSmallSectionImpl(const GlobalValue *GV, + const TargetMachine &TM) const; const MCSection *SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, Mangler &Mang, const TargetMachine &TM) const override; + + /// Return true if this constant should be placed into small data section. + bool IsConstantInSmallSection(const Constant *CN, + const TargetMachine &TM) const; + + const MCSection *getSectionForConstant(SectionKind Kind, + const Constant *C) const override; + bool IsInSmallSection(uint64_t Size) const; }; } // end namespace llvm Index: lib/Target/Mips/MipsTargetObjectFile.cpp =================================================================== --- lib/Target/Mips/MipsTargetObjectFile.cpp +++ lib/Target/Mips/MipsTargetObjectFile.cpp @@ -19,10 +19,16 @@ #include "llvm/Target/TargetMachine.h" using namespace llvm; -static cl::opt -SSThreshold("mips-ssection-threshold", cl::Hidden, - cl::desc("Small data and bss section threshold size (default=8)"), - cl::init(8)); +static cl::opt +LocalSData("mlocal-sdata", cl::Hidden, + cl::desc("MIPS: Use gp_rel for object-local data."), + cl::init(true)); + +static cl::opt +ExternSData("mextern-sdata", cl::Hidden, + cl::desc("MIPS: Use gp_rel for data that is not defined by the " + "current object."), + cl::init(true)); void MipsTargetObjectFile::Initialize(MCContext &Ctx, const TargetMachine &TM){ TargetLoweringObjectFileELF::Initialize(Ctx, TM); @@ -37,29 +43,45 @@ getContext().getELFSection(".sbss", ELF::SHT_NOBITS, ELF::SHF_WRITE |ELF::SHF_ALLOC, SectionKind::getBSS()); + this->TM = &TM; } // A address must be loaded from a small section if its size is less than the // small section size threshold. Data in this section must be addressed using // gp_rel operator. -static bool IsInSmallSection(uint64_t Size) { - return Size > 0 && Size <= SSThreshold; +bool MipsTargetObjectFile::IsInSmallSection(uint64_t Size) const { + return (Size > 0 + && Size <= TM->getSubtarget() + .getSmallSectionThreshold()); } +/// Return true if this global address should be placed into small data/bss +/// section. bool MipsTargetObjectFile::IsGlobalInSmallSection(const GlobalValue *GV, const TargetMachine &TM) const { + // We first check the case where global is a declaration, because finding + // section kind using getKindForGlobal() is only allowed for global + // definitions. if (GV->isDeclaration() || GV->hasAvailableExternallyLinkage()) - return false; + return IsGlobalInSmallSectionImpl(GV, TM); return IsGlobalInSmallSection(GV, TM, getKindForGlobal(GV, TM)); } -/// IsGlobalInSmallSection - Return true if this global address should be -/// placed into small data/bss section. +/// Return true if this global address should be placed into small data/bss +/// section. bool MipsTargetObjectFile:: IsGlobalInSmallSection(const GlobalValue *GV, const TargetMachine &TM, SectionKind Kind) const { + return (IsGlobalInSmallSectionImpl(GV, TM) + && (Kind.isDataRel() || Kind.isBSS() || Kind.isCommon())); +} +/// Return true if this global address should be placed into small data/bss +/// section. This method does all the work, except for checking the section +/// kind. +bool MipsTargetObjectFile::IsGlobalInSmallSectionImpl(const GlobalValue *GV, + const TargetMachine &TM) const { const MipsSubtarget &Subtarget = TM.getSubtarget(); // Return if small section is not available. @@ -71,13 +93,13 @@ if (!GVA) return false; - // We can only do this for datarel or BSS objects for now. - if (!Kind.isBSS() && !Kind.isDataRel()) + // Enforce -mlocal-sdata. + if (!LocalSData && GV->hasLocalLinkage()) return false; - // If this is a internal constant string, there is a special - // section for it, but not in small data/bss. - if (Kind.isMergeable1ByteCString()) + // Enforce -mextern-sdata. + if (!ExternSData && ((GV->hasExternalLinkage() && GV->isDeclaration()) + || GV->hasCommonLinkage())) return false; Type *Ty = GV->getType()->getElementType(); @@ -85,8 +107,6 @@ TM.getSubtargetImpl()->getDataLayout()->getTypeAllocSize(Ty)); } - - const MCSection *MipsTargetObjectFile:: SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, Mangler &Mang, const TargetMachine &TM) const { @@ -96,9 +116,27 @@ // Handle Small Section classification here. if (Kind.isBSS() && IsGlobalInSmallSection(GV, TM, Kind)) return SmallBSSSection; - if (Kind.isDataNoRel() && IsGlobalInSmallSection(GV, TM, Kind)) + if (Kind.isDataRel() && IsGlobalInSmallSection(GV, TM, Kind)) return SmallDataSection; // Otherwise, we work the same as ELF. return TargetLoweringObjectFileELF::SelectSectionForGlobal(GV, Kind, Mang,TM); } + +/// Return true if this constant should be placed into small data section. +bool MipsTargetObjectFile:: +IsConstantInSmallSection(const Constant *CN, const TargetMachine &TM) const { + return (TM.getSubtarget().useSmallSection() + && LocalSData + && IsInSmallSection(TM.getSubtargetImpl()->getDataLayout() + ->getTypeAllocSize(CN->getType()))); +} + +const MCSection *MipsTargetObjectFile:: +getSectionForConstant(SectionKind Kind, const Constant *C) const { + if (IsConstantInSmallSection(C, *TM)) + return SmallDataSection; + + // Otherwise, we work the same as ELF. + return TargetLoweringObjectFileELF::getSectionForConstant(Kind, C); +} Index: test/CodeGen/Mips/2008-08-07-CC.ll =================================================================== --- test/CodeGen/Mips/2008-08-07-CC.ll +++ test/CodeGen/Mips/2008-08-07-CC.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=mips +; RUN: llc -relocation-model=static < %s -march=mips ; Mips must ignore fastcc target datalayout = Index: test/CodeGen/Mips/gprel.ll =================================================================== --- /dev/null +++ test/CodeGen/Mips/gprel.ll @@ -0,0 +1,180 @@ +; RUN: llc -march=mipsel -mcpu=mips32 -mattr noabicalls -relocation-model=static -mips-ssection-threshold=8 < %s | FileCheck %s -check-prefix=ALL -check-prefix=GPREL-NOABICALLS +; RUN: llc -march=mipsel -mcpu=mips32 -mattr noabicalls -relocation-model=static -mips-ssection-threshold=8 -mlocal-sdata=0 < %s | FileCheck %s -check-prefix=ALL -check-prefix=GPREL-NOABICALLS-NOLOCAL +; RUN: llc -march=mipsel -mcpu=mips32 -mattr noabicalls -relocation-model=static -mips-ssection-threshold=8 -mextern-sdata=0 < %s | FileCheck %s -check-prefix=ALL -check-prefix=GPREL-NOABICALLS-NOEXTERN +; RUN: llc -march=mipsel -mcpu=mips32 -mattr noabicalls -relocation-model=static -mips-ssection-threshold=0 < %s | FileCheck %s -check-prefix=ALL -check-prefix=GPREL-NOABICALLS-ZEROSIZE +; RUN: not llc -march=mipsel -mcpu=mips32 -mattr noabicalls -relocation-model=pic -mips-ssection-threshold=8 < %s 2>&1 | FileCheck %s -check-prefix=GPREL-NOABICALLS-PIC +; RUN: llc -march=mipsel -mcpu=mips32 -relocation-model=static -mips-ssection-threshold=8 < %s 2>&1 | FileCheck %s -check-prefix=ALL -check-prefix=GPREL-ABICALLS-STATIC +; RUN: llc -march=mipsel -mcpu=mips32 -relocation-model=pic -mips-ssection-threshold=8 < %s 2>&1 | FileCheck %s -check-prefix=ALL -check-prefix=GPREL-ABICALLS-PIC +; RUN: llc -mtriple=mipsel-sde-elf -mcpu=mips32 -relocation-model=static < %s | FileCheck %s -check-prefix=ALL -check-prefix=SDE-ELF + + +; GPREL-NOABICALLS-PIC: LLVM ERROR: position-independent code requires '-mabicalls' + +@x = global i32 1, align 4 +@y = global i32 0, align 4 +@z = common global i32 0, align 4 +@f = internal global float 1.000000e+00, align 4 +@d = external global double + +define i32 @data() { +entry: + %0 = load i32* @x, align 4 + ret i32 %0 + +; ALL-LABEL: data + +; GPREL-NOABICALLS: lw $2, %gp_rel(x)($gp) +; GPREL-NOABICALLS-NOLOCAL: lw $2, %gp_rel(x)($gp) +; GPREL-NOABICALLS-NOEXTERN: lw $2, %gp_rel(x)($gp) +; GPREL-NOABICALLS-ZEROSIZE: hi(x) +; GPREL-ABICALLS-STATIC: warning: cannot use small-data accesses for '-mabicalls' +; GPREL-ABICALLS-STATIC: hi(x) +; GPREL-ABICALLS-PIC: warning: cannot use small-data accesses for '-mabicalls' +; GPREL-ABICALLS-PIC: got(x) +; SDE-ELF: lw $2, %gp_rel(x)($gp) +} + +define i32 @bss() { +entry: + %0 = load i32* @y, align 4 + ret i32 %0 + +; ALL-LABEL: bss + +; GPREL-NOABICALLS: lw $2, %gp_rel(y)($gp) +; GPREL-NOABICALLS-NOLOCAL: lw $2, %gp_rel(y)($gp) +; GPREL-NOABICALLS-NOEXTERN: lw $2, %gp_rel(y)($gp) +; GPREL-NOABICALLS-ZEROSIZE: hi(y) +; GPREL-ABICALLS-STATIC: hi(y) +; GPREL-ABICALLS-PIC: got(y) +; SDE-ELF: lw $2, %gp_rel(y)($gp) +} + +define i32 @common() { +entry: + %0 = load i32* @z, align 4 + ret i32 %0 + +; ALL-LABEL: common + +; GPREL-NOABICALLS: lw $2, %gp_rel(z)($gp) +; GPREL-NOABICALLS-NOLOCAL: lw $2, %gp_rel(z)($gp) +; GPREL-NOABICALLS-NOEXTERN: hi(z) +; GPREL-NOABICALLS-ZEROSIZE: hi(z) +; GPREL-ABICALLS-STATIC: hi(z) +; GPREL-ABICALLS-PIC: got(z) +; SDE-ELF: lw $2, %gp_rel(z)($gp) +} + +define float @internal() { +entry: + %0 = load float* @f, align 4 + ret float %0 + +; ALL-LABEL: internal + +; GPREL-NOABICALLS: lwc1 $f0, %gp_rel(f)($gp) +; GPREL-NOABICALLS-NOLOCAL: hi(f) +; GPREL-NOABICALLS-NOEXTERN: lwc1 $f0, %gp_rel(f)($gp) +; GPREL-NOABICALLS-ZEROSIZE: hi(f) +; GPREL-ABICALLS-STATIC: hi(f) +; GPREL-ABICALLS-PIC: got(f) +; SDE-ELF: lwc1 $f0, %gp_rel(f)($gp) +} + +define double @external() { +entry: + %0 = load double* @d, align 8 + ret double %0 + +; ALL-LABEL: external + +; GPREL-NOABICALLS: ldc1 $f0, %gp_rel(d)($gp) +; GPREL-NOABICALLS-NOLOCAL: ldc1 $f0, %gp_rel(d)($gp) +; GPREL-NOABICALLS-NOEXTERN: hi(d) +; GPREL-NOABICALLS-ZEROSIZE: hi(d) +; GPREL-ABICALLS-STATIC: hi(d) +; GPREL-ABICALLS-PIC: got(d) +; SDE-ELF: ldc1 $f0, %gp_rel(d)($gp) +} + +define float @constant() { +entry: + ret float 2.000000e+00 + +; ALL-LABEL: constant + +; GPREL-NOABICALLS: lwc1 $f0, %gp_rel($CPI{{[0-9_]+}})($gp) +; GPREL-NOABICALLS-NOLOCAL: hi($CPI{{[0-9_]+}}) +; GPREL-NOABICALLS-NOEXTERN: lwc1 $f0, %gp_rel($CPI{{[0-9_]+}})($gp) +; GPREL-NOABICALLS-ZEROSIZE: hi($CPI{{[0-9_]+}}) +; GPREL-ABICALLS-STATIC: hi($CPI{{[0-9_]+}}) +; GPREL-ABICALLS-PIC: got($CPI{{[0-9_]+}}) +; SDE-ELF: lwc1 $f0, %gp_rel($CPI{{[0-9_]+}})($gp) +} + + +; Check the sections. + +; GPREL-NOABICALLS: .type x,@object +; GPREL-NOABICALLS-NEXT: .section .sdata,"aw",@progbits +; GPREL-NOABICALLS: .type y,@object +; GPREL-NOABICALLS-NEXT: .section .sbss,"aw",@nobits +; GPREL-NOABICALLS: .type z,@object +; GPREL-NOABICALLS-NEXT: .comm z,4,4 +; GPREL-NOABICALLS: .type f,@object +; GPREL-NOABICALLS-NEXT: .section .sdata,"aw",@progbits + +; GPREL-NOABICALLS-NOLOCAL: .type x,@object +; GPREL-NOABICALLS-NOLOCAL-NEXT: .section .sdata,"aw",@progbits +; GPREL-NOABICALLS-NOLOCAL: .type y,@object +; GPREL-NOABICALLS-NOLOCAL-NEXT: .section .sbss,"aw",@nobits +; GPREL-NOABICALLS-NOLOCAL: .type z,@object +; GPREL-NOABICALLS-NOLOCAL-NEXT: .comm z,4,4 +; GPREL-NOABICALLS-NOLOCAL: .type f,@object +; GPREL-NOABICALLS-NOLOCAL-NEXT: .data + +; GPREL-NOABICALLS-NOEXTERN: .type x,@object +; GPREL-NOABICALLS-NOEXTERN-NEXT: .section .sdata,"aw",@progbits +; GPREL-NOABICALLS-NOEXTERN: .type y,@object +; GPREL-NOABICALLS-NOEXTERN-NEXT: .section .sbss,"aw",@nobits +; GPREL-NOABICALLS-NOEXTERN: .type z,@object +; GPREL-NOABICALLS-NOEXTERN-NEXT: .comm z,4,4 +; GPREL-NOABICALLS-NOEXTERN: .type f,@object +; GPREL-NOABICALLS-NOEXTERN-NEXT: .section .sdata,"aw",@progbits + +; GPREL-NOABICALLS-ZEROSIZE: .type x,@object +; GPREL-NOABICALLS-ZEROSIZE-NEXT: .data +; GPREL-NOABICALLS-ZEROSIZE: .type y,@object +; GPREL-NOABICALLS-ZEROSIZE-NEXT: .bss +; GPREL-NOABICALLS-ZEROSIZE: .type z,@object +; GPREL-NOABICALLS-ZEROSIZE-NEXT: .comm z,4,4 +; GPREL-NOABICALLS-ZEROSIZE: .type f,@object +; GPREL-NOABICALLS-ZEROSIZE-NEXT: .data + +; GPREL-ABICALLS-STATIC: .type x,@object +; GPREL-ABICALLS-STATIC-NEXT: .data +; GPREL-ABICALLS-STATIC: .type y,@object +; GPREL-ABICALLS-STATIC-NEXT: .bss +; GPREL-ABICALLS-STATIC: .type z,@object +; GPREL-ABICALLS-STATIC-NEXT: .comm z,4,4 +; GPREL-ABICALLS-STATIC: .type f,@object +; GPREL-ABICALLS-STATIC-NEXT: .data + +; GPREL-ABICALLS-PIC: .type x,@object +; GPREL-ABICALLS-PIC-NEXT: .data +; GPREL-ABICALLS-PIC: .type y,@object +; GPREL-ABICALLS-PIC-NEXT: .bss +; GPREL-ABICALLS-PIC: .type z,@object +; GPREL-ABICALLS-PIC-NEXT: .comm z,4,4 +; GPREL-ABICALLS-PIC: .type f,@object +; GPREL-ABICALLS-PIC-NEXT: .data + +; SDE-ELF: .type x,@object +; SDE-ELF-NEXT: .section .sdata,"aw",@progbits +; SDE-ELF: .type y,@object +; SDE-ELF-NEXT: .section .sbss,"aw",@nobits +; SDE-ELF: .type z,@object +; SDE-ELF-NEXT: .comm z,4,4 +; SDE-ELF: .type f,@object +; SDE-ELF-NEXT: .section .sdata,"aw",@progbits Index: test/CodeGen/Mips/mips64-f128.ll =================================================================== --- test/CodeGen/Mips/mips64-f128.ll +++ test/CodeGen/Mips/mips64-f128.ll @@ -1,10 +1,10 @@ -; RUN: llc -mtriple=mips64el-unknown-unknown -mcpu=mips4 -soft-float -O1 \ +; RUN: llc -mtriple=mips64el-unknown-linux -mcpu=mips4 -soft-float -O1 \ ; RUN: -disable-mips-delay-filler < %s | FileCheck %s -check-prefix=ALL -check-prefix=C_CC_FMT -; RUN: llc -mtriple=mips64el-unknown-unknown -mcpu=mips64 -soft-float -O1 \ +; RUN: llc -mtriple=mips64el-unknown-linux -mcpu=mips64 -soft-float -O1 \ ; RUN: -disable-mips-delay-filler < %s | FileCheck %s -check-prefix=ALL -check-prefix=C_CC_FMT -; RUN: llc -mtriple=mips64el-unknown-unknown -mcpu=mips64r2 -soft-float -O1 \ +; RUN: llc -mtriple=mips64el-unknown-linux -mcpu=mips64r2 -soft-float -O1 \ ; RUN: -disable-mips-delay-filler < %s | FileCheck %s -check-prefix=ALL -check-prefix=C_CC_FMT -; RUN: llc -mtriple=mips64el-unknown-unknown -mcpu=mips64r6 -soft-float -O1 \ +; RUN: llc -mtriple=mips64el-unknown-linux -mcpu=mips64r6 -soft-float -O1 \ ; RUN: -disable-mips-delay-filler < %s | FileCheck %s -check-prefix=ALL -check-prefix=CMP_CC_FMT @gld0 = external global fp128 Index: test/CodeGen/Mips/optimize-pic-o0.ll =================================================================== --- test/CodeGen/Mips/optimize-pic-o0.ll +++ test/CodeGen/Mips/optimize-pic-o0.ll @@ -1,4 +1,4 @@ -; RUN: llc -mtriple=mipsel -O0 < %s | FileCheck %s +; RUN: llc -march=mipsel -O0 < %s | FileCheck %s ; Function Attrs: nounwind define i32 @main() {