diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-09-01 18:11:44 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-09-01 18:11:44 +0000 |
commit | 1dc088ab6981b9f1c8ed6fd71cb9098bd4dca87b (patch) | |
tree | cc067805c1474e956ae6f35d006be3417fffca9a /contrib/llvm | |
parent | 7c0c104bfc1d273b9bbecef61abc3a8096aee36b (diff) | |
download | src-1dc088ab6981b9f1c8ed6fd71cb9098bd4dca87b.tar.gz src-1dc088ab6981b9f1c8ed6fd71cb9098bd4dca87b.zip |
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
Notes
Notes:
svn path=/head/; revision=305218
Diffstat (limited to 'contrib/llvm')
-rw-r--r-- | contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp b/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp index f398117de953..b0731f5019ca 100644 --- a/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp +++ b/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp @@ -52,6 +52,9 @@ unsigned AArch64InstrInfo::GetInstSizeInBytes(const MachineInstr *MI) const { 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"); |