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

Matheus Almeida matheus.almeida at imgtec.com
Wed Apr 16 04:47:00 PDT 2014


Author: matheusalmeida
Date: Wed Apr 16 06:46:59 2014
New Revision: 206377

URL: http://llvm.org/viewvc/llvm-project?rev=206377&view=rev
Log:
[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


Added:
    llvm/trunk/test/CodeGen/Mips/micromips-directives.ll
Removed:
    llvm/trunk/test/CodeGen/Mips/elf_st_other.ll
Modified:
    llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp

Modified: llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp?rev=206377&r1=206376&r2=206377&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp Wed Apr 16 06:46:59 2014
@@ -285,9 +285,8 @@ void MipsAsmPrinter::EmitFunctionEntryLa
 
   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();

Removed: llvm/trunk/test/CodeGen/Mips/elf_st_other.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/elf_st_other.ll?rev=206376&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/elf_st_other.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/elf_st_other.ll (removed)
@@ -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:

Added: llvm/trunk/test/CodeGen/Mips/micromips-directives.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/micromips-directives.ll?rev=206377&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/micromips-directives.ll (added)
+++ llvm/trunk/test/CodeGen/Mips/micromips-directives.ll Wed Apr 16 06:46:59 2014
@@ -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:





More information about the llvm-commits mailing list