MaskRay added a comment. > Implement option to omit P10 <https://reviews.llvm.org/P10> instructions from > stubs
Please mention the option name directly. Please avoid P10 <https://reviews.llvm.org/P10> - the abbreviation is confusing. ================ Comment at: lld/ELF/Config.h:74 +// For --power10-stub +enum class P10Stub { Default, No }; + ---------------- In this case it can be a simple boolean ================ Comment at: lld/ELF/Driver.cpp:767 + + // This handles the --no-power10-stubs option. + ---------------- Delete the comment. it is not useful ================ Comment at: lld/ELF/Driver.cpp:770 + + StringRef SelectedOpt = args.getLastArgValue(OPT_power10_stubs_eq); + ---------------- `value` ================ Comment at: lld/ELF/Thunks.cpp:1005 + nextInstOffset = 8; + } else { //CONVERT + uint32_t off = destination.getVA(addend) - getThunkTargetSym()->getVA() - 8; ---------------- Delete the stray comment or clarify. ================ Comment at: lld/ELF/Thunks.cpp:1052 + int nextInstOffset; + if (config->Power10Stub == P10Stub::No) { //CONVERT + uint32_t off = destination.getVA(addend) - getThunkTargetSym()->getVA() - 8; ---------------- Delete the stray comment or clarify. ================ Comment at: lld/ELF/Thunks.cpp:1058 + write32(buf + 12, 0x7d8803a6); // mtlr r12 + write32(buf + 16, 0x3d8b0000 | computeHiBits(off));// addis r12,r11,off@ha + write32(buf + 20, 0x398c0000 | (off & 0xffff)); // addi r12,r12,off@l ---------------- space before `//` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94627/new/ https://reviews.llvm.org/D94627 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits