This patch implements runtime Mips specific
[oota-llvm.git] / test / MC / Mips / elf_eflags.ll
1 ; This tests ELF EFLAGS setting with direct object.
2 ; When the assembler is ready a .s file for it will
3 ; be created.
4
5 ; Non-shared (static) is the absence of pic and or cpic.
6
7 ; EF_MIPS_NOREORDER (0x00000001) is always on by default currently
8 ; EF_MIPS_PIC (0x00000002)
9 ; EF_MIPS_CPIC (0x00000004) - not tested yet
10 ; EF_MIPS_ABI2 (0x00000020) - n32 not tested yet
11 ; EF_MIPS_ARCH_32 (0x50000000)
12 ; EF_MIPS_ARCH_64 (0x60000000)
13 ; EF_MIPS_ARCH_32R2 (0x70000000)
14 ; EF_MIPS_ARCH_64R2 (0x80000000)
15
16 ; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32 -relocation-model=static %s -o - | elf-dump --dump-section-data  | FileCheck -check-prefix=CHECK-BE32 %s
17 ; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32 %s -o - | elf-dump --dump-section-data  | FileCheck -check-prefix=CHECK-BE32_PIC %s
18 ; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -relocation-model=static %s -o - | elf-dump --dump-section-data  | FileCheck -check-prefix=CHECK-BE32R2 %s
19 ; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 %s -o - | elf-dump --dump-section-data  | FileCheck -check-prefix=CHECK-BE32R2_PIC %s
20
21 ; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips64 -relocation-model=static %s -o - | elf-dump --dump-section-data  | FileCheck -check-prefix=CHECK-BE64 %s
22 ; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips64 %s -o - | elf-dump --dump-section-data  | FileCheck -check-prefix=CHECK-BE64_PIC %s
23 ; 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
24 ; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips64r2 %s -o - | elf-dump --dump-section-data  | FileCheck -check-prefix=CHECK-BE64R2_PIC %s
25
26
27 ; 32(R1) bit with NO_REORDER and static
28 ; CHECK-BE32: ('e_flags', 0x50000001)
29 ;
30 ; 32(R1) bit with NO_REORDER and PIC
31 ; CHECK-BE32_PIC: ('e_flags', 0x50000003)
32 ;
33 ; 32R2 bit with NO_REORDER and static
34 ; CHECK-BE32R2: ('e_flags', 0x70000001)
35 ;
36 ; 32R2 bit with NO_REORDER and PIC
37 ; CHECK-BE32R2_PIC: ('e_flags', 0x70000003)
38 ;
39 ; 64(R1) bit with NO_REORDER and static
40 ; CHECK-BE64: ('e_flags', 0x60000001)
41 ;
42 ; 64(R1) bit with NO_REORDER and PIC
43 ; CHECK-BE64_PIC: ('e_flags', 0x60000003)
44 ;
45 ; 64R2 bit with NO_REORDER and static
46 ; CHECK-BE64R2: ('e_flags', 0x80000001)
47 ;
48 ; 64R2 bit with NO_REORDER and PIC
49 ; CHECK-BE64R2_PIC: ('e_flags', 0x80000003)
50 ;
51
52 define i32 @main() nounwind {
53 entry:
54   ret i32 0
55 }