Index: lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp =================================================================== --- lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp +++ lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp @@ -29,12 +29,20 @@ PointerSize = CalleeSaveStackSlotSize = 8; } + // FIXME: This should depend on the ABI and rather than the triple. + if ((TheTriple.getArch() == Triple::mips64el) || + (TheTriple.getArch() == Triple::mips64)) { + PrivateGlobalPrefix = ".L"; + PrivateLabelPrefix = ".L"; + } else { + PrivateGlobalPrefix = "$"; + PrivateLabelPrefix = "$"; + } + AlignmentIsInBytes = false; Data16bitsDirective = "\t.2byte\t"; Data32bitsDirective = "\t.4byte\t"; Data64bitsDirective = "\t.8byte\t"; - PrivateGlobalPrefix = "$"; - PrivateLabelPrefix = "$"; CommentString = "#"; ZeroDirective = "\t.space\t"; GPRel32Directive = "\t.gpword\t"; Index: test/CodeGen/Mips/private_label.ll =================================================================== --- /dev/null +++ test/CodeGen/Mips/private_label.ll @@ -0,0 +1,11 @@ +; RUN: llc -march=mips < %s | FileCheck -check-prefix=O32 %s +; RUN: llc -march=mips64 -target-abi n32 < %s | FileCheck -check-prefix=N32 %s +; RUN: llc -march=mips64 -target-abi n64 < %s | FileCheck -check-prefix=N64 %s + +define void @labels() nounwind { +entry: + ; O32: $func_end + ; N32: .Lfunc_end + ; N64: .Lfunc_end + ret void +}