From owner-svn-src-head@freebsd.org Thu Sep 1 18:11:45 2016 Return-Path: Delivered-To: svn-src-head@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 CAC87BCB317; Thu, 1 Sep 2016 18:11:45 +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 9B570D88; Thu, 1 Sep 2016 18:11:45 +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 u81IBiYi091825; Thu, 1 Sep 2016 18:11:44 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u81IBiDe091824; Thu, 1 Sep 2016 18:11:44 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201609011811.u81IBiDe091824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 1 Sep 2016 18:11:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305218 - head/contrib/llvm/lib/Target/AArch64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Sep 2016 18:11:45 -0000 Author: dim Date: Thu Sep 1 18:11:44 2016 New Revision: 305218 URL: https://svnweb.freebsd.org/changeset/base/305218 Log: Pull in r277331 from upstream llvm trunk (by Diana Picus): [AArch64] Return the correct size for TLSDESC_CALLSEQ The branch relaxation pass is computing the wrong offsets because it assumes TLSDESC_CALLSEQ eats up 4 bytes, when in fact it is lowered to an instruction sequence taking up 16 bytes. This can become a problem in huge files with lots of TLS accesses, as it may slowly move branch targets out of the range computed by the branch relaxation pass. Fixes PR24234 https://llvm.org/bugs/show_bug.cgi?id=24234 Differential Revision: https://reviews.llvm.org/D22870 This fixes "error in backend: fixup value out of range" when compiling the misc/talkfilters port for AArch64. Reported by: sbruno PR: 201762 MFC after: 3 days Modified: head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp Modified: head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp ============================================================================== --- head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp Thu Sep 1 18:03:34 2016 (r305217) +++ head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp Thu Sep 1 18:11:44 2016 (r305218) @@ -52,6 +52,9 @@ unsigned AArch64InstrInfo::GetInstSizeIn case TargetOpcode::IMPLICIT_DEF: case TargetOpcode::KILL: return 0; + case AArch64::TLSDESC_CALLSEQ: + // This gets lowered to an instruction sequence which takes 16 bytes + return 16; } llvm_unreachable("GetInstSizeInBytes()- Unable to determin insn size");