summaryrefslogtreecommitdiff
path: root/test/MC/Mips
diff options
context:
space:
mode:
authorJack Carter <jcarter@mips.com>2013-02-19 22:14:34 +0000
committerJack Carter <jcarter@mips.com>2013-02-19 22:14:34 +0000
commitc989c61798783f99abe7f8c27baf76bd2aea5067 (patch)
treeb6ebb12172705b60536ffcd085dbd095ee89dc0a /test/MC/Mips
parent4263ed33a77a3679545e784da1ab26e79032a467 (diff)
downloadllvm-c989c61798783f99abe7f8c27baf76bd2aea5067.tar.gz
llvm-c989c61798783f99abe7f8c27baf76bd2aea5067.tar.bz2
llvm-c989c61798783f99abe7f8c27baf76bd2aea5067.tar.xz
ELF symbol table field st_other support,
excluding visibility bits. Mips (Mips16) specific e_header setting. EF_MIPS_ARCH_ASE_M16 needs to be set in the ELF header flags for Mips16. Contributer: Reed Kotler git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175566 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/Mips')
-rw-r--r--test/MC/Mips/elf_eflags.ll7
-rw-r--r--test/MC/Mips/elf_st_other.ll13
2 files changed, 18 insertions, 2 deletions
diff --git a/test/MC/Mips/elf_eflags.ll b/test/MC/Mips/elf_eflags.ll
index bb7857dd0f..380c2b1295 100644
--- a/test/MC/Mips/elf_eflags.ll
+++ b/test/MC/Mips/elf_eflags.ll
@@ -25,7 +25,8 @@
; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips64r2 -relocation-model=static %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE64R2 %s
; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips64r2 %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE64R2_PIC %s
-
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+mips16 -relocation-model=pic %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-LE32R2-MIPS16 %s
+
; 32(R1) bit with NO_REORDER and static
; CHECK-BE32: ('e_flags', 0x50000001)
;
@@ -56,7 +57,9 @@
; 64R2 bit with NO_REORDER and PIC
; CHECK-BE64R2_PIC: ('e_flags', 0x80000003)
;
-
+; 32R2 bit MIPS16 with PIC
+; CHECK-LE32R2-MIPS16: ('e_flags', 0x74000002)
+
define i32 @main() nounwind {
entry:
ret i32 0
diff --git a/test/MC/Mips/elf_st_other.ll b/test/MC/Mips/elf_st_other.ll
new file mode 100644
index 0000000000..f188ce7ba3
--- /dev/null
+++ b/test/MC/Mips/elf_st_other.ll
@@ -0,0 +1,13 @@
+; 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 -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips %s -o - | elf-dump --dump-section-data | FileCheck %s
+
+define i32 @main() nounwind {
+entry:
+ ret i32 0
+}
+
+; CHECK: 'main'
+; CHECK: ('st_other', 0x80)
+