[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / mips-elf-flags-err.s
bloba2e746d38eca9d0560d42ea2986711c0ebd53310
1 # REQUIRES: mips
2 # Check MIPS ELF ISA flag calculation if input files have different ISAs.
4 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
5 # RUN: -mcpu=mips32 %S/Inputs/mips-dynamic.s -o %t1.o
6 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
7 # RUN: -mcpu=mips32r2 %s -o %t2.o
8 # RUN: ld.lld %t1.o %t2.o -o %t.exe
9 # RUN: llvm-readobj -h %t.exe | FileCheck -check-prefix=R1R2 %s
11 # Check that lld does not allow to link incompatible ISAs.
13 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
14 # RUN: -mcpu=mips3 %S/Inputs/mips-dynamic.s -o %t1.o
15 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
16 # RUN: -mcpu=mips32 -mattr=+fp64 %s -o %t2.o
17 # RUN: not ld.lld %t1.o %t2.o -o /dev/null 2>&1 | FileCheck -check-prefix=R3R32 %s
19 # Check that lld does not allow to link incompatible ISAs.
21 # RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux \
22 # RUN: -mcpu=mips64r6 %S/Inputs/mips-dynamic.s -o %t1.o
23 # RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux \
24 # RUN: -position-independent -mcpu=octeon %s -o %t2.o
25 # RUN: not ld.lld %t1.o %t2.o -o /dev/null 2>&1 \
26 # RUN: | FileCheck -check-prefix=R6OCTEON %s
28 # Check that lld take in account EF_MIPS_MACH_XXX ISA flags
30 # RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux \
31 # RUN: -position-independent -mcpu=mips64 %S/Inputs/mips-dynamic.s -o %t1.o
32 # RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux \
33 # RUN: -position-independent -mcpu=octeon %s -o %t2.o
34 # RUN: ld.lld %t1.o %t2.o -o %t.exe
35 # RUN: llvm-readobj -h %t.exe | FileCheck -check-prefix=OCTEON %s
37 .option pic0
38 .text
39 .global __start
40 __start:
41 nop
43 # R1R2: Flags [
44 # R1R2-NEXT: EF_MIPS_ABI_O32
45 # R1R2-NEXT: EF_MIPS_ARCH_32R2
46 # R1R2-NEXT: EF_MIPS_CPIC
47 # R1R2-NEXT: ]
49 # R3R32: error: incompatible target ISA:
50 # R3R32-NEXT: >>> {{.+}}mips-elf-flags-err.s.tmp1.o: mips3
51 # R3R32-NEXT: >>> {{.+}}mips-elf-flags-err.s.tmp2.o: mips32
53 # R6OCTEON: error: incompatible target ISA:
54 # R6OCTEON-NEXT: >>> {{.+}}mips-elf-flags-err.s.tmp1.o: mips64r6
55 # R6OCTEON-NEXT: >>> {{.+}}mips-elf-flags-err.s.tmp2.o: mips64r2 (octeon)
57 # OCTEON: Flags [
58 # OCTEON-NEXT: EF_MIPS_ARCH_64R2
59 # OCTEON-NEXT: EF_MIPS_CPIC
60 # OCTEON-NEXT: EF_MIPS_MACH_OCTEON
61 # OCTEON: ]