Lines Matching +full:- +full:- +full:files
1 //===- MipsArchTree.cpp --------------------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===---------------------------------------------------------------------===//
11 //===---------------------------------------------------------------------===//
66 static void checkFlags(Ctx &ctx, ArrayRef<FileFlags> files) {
67 assert(!files.empty() && "expected non-empty file list");
69 uint32_t abi = files[0].flags & (EF_MIPS_ABI | EF_MIPS_ABI2);
70 bool nan = files[0].flags & EF_MIPS_NAN2008;
71 bool fp = files[0].flags & EF_MIPS_FP64;
73 for (const FileFlags &f : files) {
75 Err(ctx) << f.file << ": microMIPS 64-bit is not supported";
85 Err(ctx) << f.file << ": -mnan=" << getNanName(nan2)
86 << " is incompatible with target -mnan=" << getNanName(nan);
90 Err(ctx) << f.file << ": -mfp" << getFpName(fp2)
91 << " is incompatible with target -mfp" << getFpName(fp);
95 static uint32_t getMiscFlags(ArrayRef<FileFlags> files) {
97 for (const FileFlags &f : files)
104 static uint32_t getPicFlags(Ctx &ctx, ArrayRef<FileFlags> files) {
105 // Check PIC/non-PIC compatibility.
106 bool isPic = files[0].flags & (EF_MIPS_PIC | EF_MIPS_CPIC);
107 for (const FileFlags &f : files.slice(1)) {
110 Warn(ctx) << f.file << ": linking non-abicalls code with abicalls code "
111 << files[0].file;
113 Warn(ctx) << f.file << ": linking abicalls code with non-abicalls code "
114 << files[0].file;
117 // Compute the result PIC/non-PIC flag.
118 uint32_t ret = files[0].flags & (EF_MIPS_PIC | EF_MIPS_CPIC);
119 for (const FileFlags &f : files.slice(1))
268 // can be represented as a forest. If all input files have ISAs which
270 // these input files are compatible. In that case we need to return "highest"
271 // ISA. If there are incompatible input files, we show an error.
272 // For example, mips1 is a "parent" of mips2 and such files are compatible.
276 static uint32_t getArchFlags(Ctx &ctx, ArrayRef<FileFlags> files) {
277 uint32_t ret = files[0].flags & (EF_MIPS_ARCH | EF_MIPS_MACH);
279 for (const FileFlags &f : files.slice(1)) {
286 Err(ctx) << "incompatible target ISA:\n>>> " << files[0].file << ": "
299 v.push_back({f, cast<ObjFile<ELFT>>(f)->getObj().getHeader().e_flags});
301 // If we don't have any input files, we'll have to rely on the information
321 return -1;
326 return -1;
334 return "-mdouble-float";
336 return "-msingle-float";
338 return "-msoft-float";
340 return "-mgp32 -mfp64 (old)";
342 return "-mfpxx";
344 return "-mgp32 -mfp64";
346 return "-mgp32 -mfp64 -mno-odd-spreg";
365 return ef->template getObj<ELFT>().getHeader().e_flags & EF_MIPS_ABI2;