summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2016-09-07 18:16:06 +0000
committerdim <dim@FreeBSD.org>2016-09-07 18:16:06 +0000
commit11724d494fb2fd0f33bd9b02daf567d64dc03ac8 (patch)
tree1bfc4fae7f393c9bf5d0dc6d7c8051b5007f90fb
parentc8aefaaee85dcc4d2e237255c2d9d8b1be17a869 (diff)
downloadFreeBSD-src-11724d494fb2fd0f33bd9b02daf567d64dc03ac8.zip
FreeBSD-src-11724d494fb2fd0f33bd9b02daf567d64dc03ac8.tar.gz
MFC r305218:
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
-rw-r--r--contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp3
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 f398117..b0731f5 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");
OpenPOWER on IntegriCloud