1 # Default ABI for MIPS32 is O32.
2 # RUN: llvm-mc -filetype=obj -triple mips-unknown-linux -mcpu=mips1 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,BE,O32,NAN1985,MIPS1 %s
3 # RUN: llvm-mc -filetype=obj -triple mips-unknown-linux -mcpu=mips2 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,BE,O32,NAN1985,MIPS2 %s
4 # RUN: llvm-mc -filetype=obj -triple mips-unknown-linux -mcpu=mips3 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,BE,O32,NAN1985,MIPS3,32BITMODE %s
5 # RUN: llvm-mc -filetype=obj -triple mips-unknown-linux -mcpu=mips4 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,BE,O32,NAN1985,MIPS4,32BITMODE %s
6 # RUN: llvm-mc -filetype=obj -triple mips-unknown-linux -mcpu=mips5 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,BE,O32,NAN1985,MIPS5,32BITMODE %s
7 # RUN: llvm-mc -filetype=obj -triple mips-unknown-linux %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,BE,O32,NAN1985,MIPS32R1 %s
8 # RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,O32,NAN1985,MIPS32R1 %s
9 # RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,O32,NAN1985,MIPS32R1 %s
10 # RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips32r2 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,O32,NAN1985,MIPS32R2 %s
11 # RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips32r3 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,O32,NAN1985,MIPS32R3 %s
12 # RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips32r5 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,O32,NAN1985,MIPS32R5 %s
13 # RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+nan2008 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,O32,NAN2008,MIPS32R2 %s
14 # RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips32r3 -mattr=+nan2008 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,O32,NAN2008,MIPS32R3 %s
15 # RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips32r5 -mattr=+nan2008 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,O32,NAN2008,MIPS32R5 %s
16 # RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips32r6 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,O32,NAN2008,MIPS32R6 %s
18 # Selected ABI O32 takes precedence over target triple.
19 # FIXME: llvm-mc -filetype=obj -triple mips64-unknown-linux -mcpu=mips1 -target-abi=o32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,BE,O32,NAN1985,MIPS1 %s
20 # FIXME: llvm-mc -filetype=obj -triple mips64-unknown-linux -mcpu=mips2 -target-abi=o32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,BE,O32,NAN1985,MIPS2 %s
21 # FIXME: llvm-mc -filetype=obj -triple mips64-unknown-linux -mcpu=mips3 -target-abi=o32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,BE,O32,NAN1985,MIPS3,32BITMODE %s
22 # FIXME: llvm-mc -filetype=obj -triple mips64-unknown-linux -mcpu=mips4 -target-abi=o32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,BE,O32,NAN1985,MIPS4,32BITMODE %s
23 # FIXME: llvm-mc -filetype=obj -triple mips64-unknown-linux -mcpu=mips5 -target-abi=o32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,BE,O32,NAN1985,MIPS5,32BITMODE %s
24 # FIXME: llvm-mc -filetype=obj -triple mips64-unknown-linux -target-abi=o32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,BE,O32,NAN1985,MIPS32R1 %s
25 # FIXME: llvm-mc -filetype=obj -triple mips64el-unknown-linux -target-abi=o32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,O32,NAN1985,MIPS32R1 %s
26 # FIXME: llvm-mc -filetype=obj -triple mips64el-unknown-linux -target-abi=o32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,O32,NAN1985,MIPS32R1 %s
27 # FIXME: llvm-mc -filetype=obj -triple mips64el-unknown-linux -mcpu=mips32r2 -target-abi=o32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,O32,NAN1985,MIPS32R2 %s
28 # FIXME: llvm-mc -filetype=obj -triple mips64el-unknown-linux -mcpu=mips32r3 -target-abi=o32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,O32,NAN1985,MIPS32R3 %s
29 # FIXME: llvm-mc -filetype=obj -triple mips64el-unknown-linux -mcpu=mips32r5 -target-abi=o32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,O32,NAN1985,MIPS32R5 %s
30 # FIXME: llvm-mc -filetype=obj -triple mips64el-unknown-linux -mcpu=mips32r2 -target-abi=o32 -mattr=+nan2008 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,O32,NAN2008,MIPS32R2 %s
31 # FIXME: llvm-mc -filetype=obj -triple mips64el-unknown-linux -mcpu=mips32r3 -target-abi=o32 -mattr=+nan2008 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,O32,NAN2008,MIPS32R3 %s
32 # FIXME: llvm-mc -filetype=obj -triple mips64el-unknown-linux -mcpu=mips32r5 -target-abi=o32 -mattr=+nan2008 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,O32,NAN2008,MIPS32R5 %s
33 # FIXME: llvm-mc -filetype=obj -triple mips64el-unknown-linux -mcpu=mips32r6 -target-abi=o32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,O32,NAN2008,MIPS32R6 %s
35 # Default ABI for MIPS64 is N64 as opposed to GCC/GAS (N32).
36 # RUN: llvm-mc -filetype=obj -triple mips-unknown-linux -mcpu=mips3 -target-abi=n32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,BE,N32,NAN1985,MIPS3 %s
37 # RUN: llvm-mc -filetype=obj -triple mips-unknown-linux -mcpu=mips4 -target-abi=n32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,BE,N32,NAN1985,MIPS4 %s
38 # RUN: llvm-mc -filetype=obj -triple mips-unknown-linux -mcpu=mips5 -target-abi=n32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,BE,N32,NAN1985,MIPS5 %s
39 # FIXME: llvm-mc -filetype=obj -triple mips-unknown-linux -target-abi=n32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,BE,N32,NAN1985,MIPS64R1 %s
40 # FIXME: llvm-mc -filetype=obj -triple mipsel-unknown-linux -target-abi=n32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,N32,NAN1985,MIPS64R1 %s
41 # RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r2 -target-abi=n32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,N32,NAN1985,MIPS64R2 %s
42 # RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r3 -target-abi=n32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,N32,NAN1985,MIPS64R3 %s
43 # RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r5 -target-abi=n32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,N32,NAN1985,MIPS64R5 %s
44 # RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r2 -target-abi=n32 -mattr=+nan2008 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,N32,NAN2008,MIPS64R2 %s
45 # RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r3 -target-abi=n32 -mattr=+nan2008 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,N32,NAN2008,MIPS64R3 %s
46 # RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r5 -target-abi=n32 -mattr=+nan2008 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,N32,NAN2008,MIPS64R5 %s
47 # RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r6 -target-abi=n32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,N32,NAN2008,MIPS64R6 %s
48 # RUN: llvm-mc -filetype=obj -triple mips64-unknown-linux -mcpu=mips3 -target-abi=n32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,BE,N32,NAN1985,MIPS3 %s
49 # RUN: llvm-mc -filetype=obj -triple mips64-unknown-linux -mcpu=mips4 -target-abi=n32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,BE,N32,NAN1985,MIPS4 %s
50 # RUN: llvm-mc -filetype=obj -triple mips64-unknown-linux -mcpu=mips5 -target-abi=n32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,BE,N32,NAN1985,MIPS5 %s
51 # RUN: llvm-mc -filetype=obj -triple mips64-unknown-linux -target-abi=n32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,BE,N32,NAN1985,MIPS64R1 %s
52 # RUN: llvm-mc -filetype=obj -triple mips64el-unknown-linux -target-abi=n32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,N32,NAN1985,MIPS64R1 %s
53 # RUN: llvm-mc -filetype=obj -triple mips64el-unknown-linux -mcpu=mips64r2 -target-abi=n32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,N32,NAN1985,MIPS64R2 %s
54 # RUN: llvm-mc -filetype=obj -triple mips64el-unknown-linux -mcpu=mips64r3 -target-abi=n32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,N32,NAN1985,MIPS64R3 %s
55 # RUN: llvm-mc -filetype=obj -triple mips64el-unknown-linux -mcpu=mips64r5 -target-abi=n32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,N32,NAN1985,MIPS64R5 %s
56 # RUN: llvm-mc -filetype=obj -triple mips64el-unknown-linux -mcpu=mips64r2 -target-abi=n32 -mattr=+nan2008 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,N32,NAN2008,MIPS64R2 %s
57 # RUN: llvm-mc -filetype=obj -triple mips64el-unknown-linux -mcpu=mips64r3 -target-abi=n32 -mattr=+nan2008 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,N32,NAN2008,MIPS64R3 %s
58 # RUN: llvm-mc -filetype=obj -triple mips64el-unknown-linux -mcpu=mips64r5 -target-abi=n32 -mattr=+nan2008 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,N32,NAN2008,MIPS64R5 %s
59 # RUN: llvm-mc -filetype=obj -triple mips64el-unknown-linux -mcpu=mips64r6 -target-abi=n32 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF32,LE,N32,NAN2008,MIPS64R6 %s
61 # Default ABI for MIPS64 is N64 as opposed to GCC/GAS (N32).
62 # FIXME: llvm-mc -filetype=obj -triple mips-unknown-linux -mcpu=mips3 -target-abi=n64 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,BE,N64,NAN1985,MIPS3 %s
63 # FIXME: llvm-mc -filetype=obj -triple mips-unknown-linux -mcpu=mips4 -target-abi=n64 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,BE,N64,NAN1985,MIPS4 %s
64 # FIXME: llvm-mc -filetype=obj -triple mips-unknown-linux -mcpu=mips5 -target-abi=n64 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,BE,N64,NAN1985,MIPS5 %s
65 # FIXME: llvm-mc -filetype=obj -triple mips-unknown-linux -target-abi=n64 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,BE,N64,NAN1985,MIPS64R1 %s
66 # FIXME: llvm-mc -filetype=obj -triple mipsel-unknown-linux -target-abi=n64 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,LE,N64,NAN1985,MIPS64R1 %s
67 # FIXME: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r2 -target-abi=n64 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,LE,N64,NAN1985,MIPS64R2 %s
68 # FIXME: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r3 -target-abi=n64 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,LE,N64,NAN1985,MIPS64R3 %s
69 # FIXME: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r5 -target-abi=n64 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,LE,N64,NAN1985,MIPS64R5 %s
70 # FIXME: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r2 -target-abi=n64 -mattr=+nan2008 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,LE,N64,NAN2008,MIPS64R2 %s
71 # FIXME: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r3 -target-abi=n64 -mattr=+nan2008 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,LE,N64,NAN2008,MIPS64R3 %s
72 # FIXME: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r5 -target-abi=n64 -mattr=+nan2008 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,LE,N64,NAN2008,MIPS64R5 %s
73 # FIXME: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r6 -target-abi=n64 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,LE,N64,NAN2008,MIPS64R6 %s
74 # RUN: llvm-mc -filetype=obj -triple mips64-unknown-linux -mcpu=mips3 -target-abi=n64 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,BE,N64,NAN1985,MIPS3 %s
75 # RUN: llvm-mc -filetype=obj -triple mips64-unknown-linux -mcpu=mips4 -target-abi=n64 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,BE,N64,NAN1985,MIPS4 %s
76 # RUN: llvm-mc -filetype=obj -triple mips64-unknown-linux -mcpu=mips5 -target-abi=n64 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,BE,N64,NAN1985,MIPS5 %s
78 # RUN: llvm-mc -filetype=obj -triple mips64-unknown-linux %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,BE,N64,NAN1985,MIPS64R1 %s
79 # RUN: llvm-mc -filetype=obj -triple mips64el-unknown-linux %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,LE,N64,NAN1985,MIPS64R1 %s
80 # RUN: llvm-mc -filetype=obj -triple mips64el-unknown-linux -mcpu=mips64r2 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,LE,N64,NAN1985,MIPS64R2 %s
81 # RUN: llvm-mc -filetype=obj -triple mips64el-unknown-linux -mcpu=mips64r3 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,LE,N64,NAN1985,MIPS64R3 %s
82 # RUN: llvm-mc -filetype=obj -triple mips64el-unknown-linux -mcpu=mips64r5 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,LE,N64,NAN1985,MIPS64R5 %s
83 # RUN: llvm-mc -filetype=obj -triple mips64el-unknown-linux -mcpu=mips64r2 -mattr=+nan2008 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,LE,N64,NAN2008,MIPS64R2 %s
84 # RUN: llvm-mc -filetype=obj -triple mips64el-unknown-linux -mcpu=mips64r3 -mattr=+nan2008 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,LE,N64,NAN2008,MIPS64R3 %s
85 # RUN: llvm-mc -filetype=obj -triple mips64el-unknown-linux -mcpu=mips64r5 -mattr=+nan2008 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,LE,N64,NAN2008,MIPS64R5 %s
86 # RUN: llvm-mc -filetype=obj -triple mips64el-unknown-linux -mcpu=mips64r6 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,LE,N64,NAN2008,MIPS64R6 %s
88 # RUN: llvm-mc -filetype=obj -triple mips64el-unknown-linux -mcpu=octeon -target-abi=n64 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,LE,N64,NAN1985,OCTEON %s
92 # ALL-NEXT: Magic: (7F 45 4C 46)
93 # ELF32-NEXT: Class: 32-bit
94 # ELF64-NEXT: Class: 64-bit
95 # LE-NEXT: DataEncoding: LittleEndian
96 # BE-NEXT: DataEncoding: BigEndian
97 # ALL-NEXT: FileVersion: 1
98 # ALL-NEXT: OS/ABI: SystemV
99 # ALL-NEXT: ABIVersion: 0
100 # ALL-NEXT: Unused: (00 00 00 00 00 00 00)
102 # ALL-NEXT: Type: Relocatable
103 # ALL-NEXT: Machine: EM_MIPS
104 # ALL-NEXT: Version: 1
105 # ALL-NEXT: Entry: 0x0
106 # ALL-NEXT: ProgramHeaderOffset: 0x0
107 # ALL-NEXT: SectionHeaderOffset:
109 # 32BITMODE-NEXT: EF_MIPS_32BITMODE
110 # N64-NOT: EF_MIPS_32BITMODE
111 # N32-NEXT: EF_MIPS_ABI2
112 # O32-NEXT: EF_MIPS_ABI_O32
113 # N64-NOT: EF_MIPS_ABI2
114 # N64-NOT: EF_MIPS_ABI_O32
116 # MIPS2-NEXT: EF_MIPS_ARCH_2
117 # MIPS3-NEXT: EF_MIPS_ARCH_3
118 # MIPS4-NEXT: EF_MIPS_ARCH_4
119 # MIPS5-NEXT: EF_MIPS_ARCH_5
120 # MIPS32R1-NEXT: EF_MIPS_ARCH_32
121 # MIPS32R2-NEXT: EF_MIPS_ARCH_32R2
122 # The R2 flag is reused for R3 and R5.
123 # MIPS32R3-NEXT: EF_MIPS_ARCH_32R2
124 # MIPS32R5-NEXT: EF_MIPS_ARCH_32R2
125 # MIPS32R6-NEXT: EF_MIPS_ARCH_32R6
126 # MIPS64R1-NEXT: EF_MIPS_ARCH_64
127 # MIPS64R2-NEXT: EF_MIPS_ARCH_64R2
128 # The R2 flag is reused for R3 and R5.
129 # MIPS64R3-NEXT: EF_MIPS_ARCH_64R2
130 # MIPS64R5-NEXT: EF_MIPS_ARCH_64R2
131 # MIPS64R6-NEXT: EF_MIPS_ARCH_64R6
132 # OCTEON-NEXT: EF_MIPS_ARCH_64R2
134 # ALL-NEXT: EF_MIPS_CPIC
136 # OCTEON-NEXT: EF_MIPS_MACH_OCTEON
138 # NAN2008-NEXT: EF_MIPS_NAN2008