[mips] Emit '.set nomicromips' before a function's entry label

if not in micromips mode.

The test (elf_st_other.ll) was renamed as the name and description didn't
make sense as the test wasn't checking any symbol table entry.

Differential Revision: http://reviews.llvm.org/D3346

llvm-svn: 206377
This commit is contained in:
Matheus Almeida 2014-04-16 11:46:59 +00:00
parent 58ce7f24cd
commit dc7e48e084
3 changed files with 18 additions and 15 deletions

View File

@ -285,9 +285,8 @@ void MipsAsmPrinter::EmitFunctionEntryLabel() {
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();

View File

@ -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:

View File

@ -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: