From owner-svn-src-projects@freebsd.org Sat Jun 17 12:48:32 2017 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A38A0BFA513 for ; Sat, 17 Jun 2017 12:48:32 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F6AA6863B; Sat, 17 Jun 2017 12:48:32 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5HCmV7Z052153; Sat, 17 Jun 2017 12:48:31 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5HCmV9T052151; Sat, 17 Jun 2017 12:48:31 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706171248.v5HCmV9T052151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 17 Jun 2017 12:48:31 +0000 (UTC) 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 X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jun 2017 12:48:32 -0000 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(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(A); - } else { - Dest = Body.getVA(A); - } - return Dest - P; - } - case R_PLT: - return Body.getPltVA() + A; - case R_PLT_PC: - case R_PPC_PLT_OPD: - return Body.getPltVA() + 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