Index: lib/Target/Mips/MipsAsmPrinter.cpp =================================================================== --- lib/Target/Mips/MipsAsmPrinter.cpp +++ lib/Target/Mips/MipsAsmPrinter.cpp @@ -285,9 +285,8 @@ if (Subtarget->inMicroMipsMode()) TS.emitDirectiveSetMicroMips(); - // leave out until FSF available gas has micromips changes - // else - // TS.emitDirectiveSetNoMicroMips(); + else + TS.emitDirectiveSetNoMicroMips(); if (Subtarget->inMips16Mode()) TS.emitDirectiveSetMips16(); Index: test/CodeGen/Mips/elf_st_other.ll =================================================================== --- test/CodeGen/Mips/elf_st_other.ll +++ /dev/null @@ -1,12 +0,0 @@ -; This tests value of ELF st_other field for function symbol table entries. -; For microMIPS value should be equal to STO_MIPS_MICROMIPS. - -; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips %s -o - | FileCheck %s - -define i32 @main() nounwind { -entry: - ret i32 0 -} - -; CHECK: .set micromips -; CHECK: main: Index: test/CodeGen/Mips/micromips-directives.ll =================================================================== --- /dev/null +++ test/CodeGen/Mips/micromips-directives.ll @@ -0,0 +1,16 @@ +; This test checks if the '.set [no]micromips' directives +; are emitted before a function's entry label. + +; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips %s -o - | \ +; RUN: FileCheck %s -check-prefix=CHECK-MM +; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=-micromips %s -o - | \ +; RUN: FileCheck %s -check-prefix=CHECK-NO-MM + +define i32 @main() nounwind { +entry: + ret i32 0 +} + +; CHECK-MM: .set micromips +; CHECK-NO-MM: .set nomicromips +; CHECK: main: