summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMatheus Almeida <matheus.almeida@imgtec.com>2014-04-16 11:46:59 +0000
committerMatheus Almeida <matheus.almeida@imgtec.com>2014-04-16 11:46:59 +0000
commit8e0f5768a68f5a0d2e400085b1b4d64eb73aa401 (patch)
treea40a18e481cf660efd0922d2187292f4116c5878 /test
parent0af5a4e528c18b4f9bcfece16c5ea0fd1dd0f667 (diff)
downloadllvm-8e0f5768a68f5a0d2e400085b1b4d64eb73aa401.tar.gz
llvm-8e0f5768a68f5a0d2e400085b1b4d64eb73aa401.tar.bz2
llvm-8e0f5768a68f5a0d2e400085b1b4d64eb73aa401.tar.xz
[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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206377 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/Mips/elf_st_other.ll12
-rw-r--r--test/CodeGen/Mips/micromips-directives.ll16
2 files changed, 16 insertions, 12 deletions
diff --git a/test/CodeGen/Mips/elf_st_other.ll b/test/CodeGen/Mips/elf_st_other.ll
deleted file mode 100644
index 8a5f20df86..0000000000
--- a/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:
diff --git a/test/CodeGen/Mips/micromips-directives.ll b/test/CodeGen/Mips/micromips-directives.ll
new file mode 100644
index 0000000000..dd0bd5836d
--- /dev/null
+++ b/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: