Date: Sat, 17 Jun 2017 12:48:31 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r320053 - in projects/clang500-import/contrib/llvm: lib/CodeGen tools/lld/ELF Message-ID: <201706171248.v5HCmV9T052151@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Sat Jun 17 12:48:31 2017 New Revision: 320053 URL: https://svnweb.freebsd.org/changeset/base/320053 Log: Repair a few mismerges in r320041 and r320042. Modified: projects/clang500-import/contrib/llvm/lib/CodeGen/XRayInstrumentation.cpp projects/clang500-import/contrib/llvm/tools/lld/ELF/InputSection.cpp Modified: projects/clang500-import/contrib/llvm/lib/CodeGen/XRayInstrumentation.cpp ============================================================================== --- projects/clang500-import/contrib/llvm/lib/CodeGen/XRayInstrumentation.cpp Sat Jun 17 11:29:59 2017 (r320052) +++ projects/clang500-import/contrib/llvm/lib/CodeGen/XRayInstrumentation.cpp Sat Jun 17 12:48:31 2017 (r320053) @@ -142,9 +142,9 @@ bool XRayInstrumentation::runOnMachineFunction(Machine return false; // Invalid value for threshold. // Count the number of MachineInstr`s in MachineFunction - int64_t MICount = 0; - for (const auto& MBB : MF) - MICount += MBB.size(); + int64_t MICount = 0; + for (const auto& MBB : MF) + MICount += MBB.size(); // Check if we have a loop. // FIXME: Maybe make this smarter, and see whether the loops are dependent Modified: projects/clang500-import/contrib/llvm/tools/lld/ELF/InputSection.cpp ============================================================================== --- projects/clang500-import/contrib/llvm/tools/lld/ELF/InputSection.cpp Sat Jun 17 11:29:59 2017 (r320052) +++ projects/clang500-import/contrib/llvm/tools/lld/ELF/InputSection.cpp Sat Jun 17 12:48:31 2017 (r320053) @@ -467,7 +467,6 @@ static uint64_t getRelocTargetVA(uint32_t Type, int64_ case R_GOTREL_FROM_END: return Body.getVA(A) - InX::Got->getVA() - InX::Got->getSize(); case R_GOT_FROM_END: - case R_GOT_FROM_END: case R_RELAX_TLS_GD_TO_IE_END: return Body.getGotOffset() + A - InX::Got->getSize(); case R_GOT_OFF: @@ -476,7 +475,6 @@ static uint64_t getRelocTargetVA(uint32_t Type, int64_ case R_RELAX_TLS_GD_TO_IE_PAGE_PC: return getAArch64Page(Body.getGotVA() + A) - getAArch64Page(P); case R_GOT_PC: - case R_GOT_PC: case R_RELAX_TLS_GD_TO_IE: return Body.getGotVA() + A - P; case R_HINT: @@ -546,36 +544,6 @@ static uint64_t getRelocTargetVA(uint32_t Type, int64_ case R_PLT_PC: case R_PPC_PLT_OPD: return Body.getPltVA() + A - P; - case R_PAGE_PC: - case R_PLT_PAGE_PC: { - uint64_t Dest; - if (Body.isUndefined() && !Body.isLocal() && Body.symbol()->isWeak()) - Dest = getAArch64Page(A); - else - Dest = getAArch64Page(Body.getVA<ELFT>(A)); - return Dest - getAArch64Page(P); - } - case R_PC: { - uint64_t Dest; - if (Body.isUndefined() && !Body.isLocal() && Body.symbol()->isWeak()) { - // On ARM and AArch64 a branch to an undefined weak resolves to the - // next instruction, otherwise the place. - if (Config->EMachine == EM_ARM) - Dest = getARMUndefinedRelativeWeakVA(Type, A, P); - else if (Config->EMachine == EM_AARCH64) - Dest = getAArch64UndefinedRelativeWeakVA(Type, A, P); - else - Dest = Body.getVA<ELFT>(A); - } else { - Dest = Body.getVA<ELFT>(A); - } - return Dest - P; - } - case R_PLT: - return Body.getPltVA<ELFT>() + A; - case R_PLT_PC: - case R_PPC_PLT_OPD: - return Body.getPltVA<ELFT>() + A - P; case R_PPC_OPD: { uint64_t SymVA = Body.getVA(A); // If we have an undefined weak symbol, we might get here with a symbol
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706171248.v5HCmV9T052151>