summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2016-08-12 05:43:42 +0000
committerSimon Atanasyan <simon@atanasyan.com>2016-08-12 05:43:42 +0000
commit6be57b3fb1076138c85081fb49b1cf45c492bdd6 (patch)
tree939429760e58f096dae1ab3538fb2994bcf34339
parentf197b1f78f854d8513ef617b8cfc61860f7b4b84 (diff)
downloadbcm5719-llvm-6be57b3fb1076138c85081fb49b1cf45c492bdd6.tar.gz
bcm5719-llvm-6be57b3fb1076138c85081fb49b1cf45c492bdd6.zip
[ELF][MIPS] Fix the comment
llvm-svn: 278480
-rw-r--r--lld/ELF/Mips.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/lld/ELF/Mips.cpp b/lld/ELF/Mips.cpp
index c2bc9c50ee5..b3a63002f36 100644
--- a/lld/ELF/Mips.cpp
+++ b/lld/ELF/Mips.cpp
@@ -252,12 +252,15 @@ static StringRef getArchName(uint32_t Flags) {
}
}
-// There are (arguably too) many MIPS ISAs out there. Some are compatible
-// with each other and some are not. This function checks if all input
-// files are compatible with each other, and if so, returns the "lowest"
-// ISA flag. For example, if one object is in EF_MIPS_ARCH_3 and the
-// other is in EF_MIPS_ARCH_2, it'll return EF_MIPS_ARCH_2 because it's
-// older than EF_MIPS_ARCH_3.
+// There are (arguably too) many MIPS ISAs out there. Their relationships
+// can be represented as a forest. If all input files have ISAs which
+// reachable by repeated proceeding from the single child to the parent,
+// these input files are compatible. In that case we need to return "highest"
+// ISA. If there are incompatible input files, we show an error.
+// For example, mips1 is a "parent" of mips2 and such files are compatible.
+// Output file gets EF_MIPS_ARCH_2 flag. From the other side mips3 and mips32
+// are incompatible because nor mips3 is a parent for misp32, nor mips32
+// is a parent for mips3.
static uint32_t getArchFlags(ArrayRef<FileFlags> Files) {
uint32_t Ret = Files[0].Flags & (EF_MIPS_ARCH | EF_MIPS_MACH);
OpenPOWER on IntegriCloud