diff options
author | Jack Carter <jcarter@mips.com> | 2013-02-19 22:14:34 +0000 |
---|---|---|
committer | Jack Carter <jcarter@mips.com> | 2013-02-19 22:14:34 +0000 |
commit | 1ba1f3cec8dc547b7169f2d6c9c8237a81962a8f (patch) | |
tree | 9e97973b03f9e9da2a2c655f93aac3d5b424e77b /llvm/test/MC | |
parent | 90fbe91c58692b863fb109b1348c7afd08b22640 (diff) | |
download | bcm5719-llvm-1ba1f3cec8dc547b7169f2d6c9c8237a81962a8f.tar.gz bcm5719-llvm-1ba1f3cec8dc547b7169f2d6c9c8237a81962a8f.zip |
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
llvm-svn: 175566
Diffstat (limited to 'llvm/test/MC')
-rw-r--r-- | llvm/test/MC/Mips/elf_eflags.ll | 7 | ||||
-rw-r--r-- | llvm/test/MC/Mips/elf_st_other.ll | 13 |
2 files changed, 18 insertions, 2 deletions
diff --git a/llvm/test/MC/Mips/elf_eflags.ll b/llvm/test/MC/Mips/elf_eflags.ll index bb7857dd0fa..380c2b12955 100644 --- a/llvm/test/MC/Mips/elf_eflags.ll +++ b/llvm/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/llvm/test/MC/Mips/elf_st_other.ll b/llvm/test/MC/Mips/elf_st_other.ll new file mode 100644 index 00000000000..f188ce7ba38 --- /dev/null +++ b/llvm/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) + |