summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-08-15 18:50:13 +0000
committerMatthias Braun <matze@braunis.de>2016-08-15 18:50:13 +0000
commitb948c524166510217c1fd68e9fa567cc04a3fa9b (patch)
treefb2fef8459c015796024e7ca62d00ea3292c70f2 /llvm/lib/Target
parent8ce9b44dfe4d93d388bde7c3bc35344416ab9a82 (diff)
downloadbcm5719-llvm-b948c524166510217c1fd68e9fa567cc04a3fa9b.tar.gz
bcm5719-llvm-b948c524166510217c1fd68e9fa567cc04a3fa9b.zip
Revert "[Thumb] Validate branch target for CBZ/CBNZ instructions."
This currently breaks the greendragon clang-stage1-configure-RA/ and brotli. It is probably just uncovering a pre-existing problem. Reverting temporarily to get the buildbots green again. A reduced testcase will follow shortly. This reverts commit r278659. llvm-svn: 278711
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp6
-rw-r--r--llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp5
2 files changed, 0 insertions, 11 deletions
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index c011c792bff..b9b665fc1ea 100644
--- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -6684,12 +6684,6 @@ bool ARMAsmParser::validateInstruction(MCInst &Inst,
return Error(Operands[Op]->getStartLoc(), "branch target out of range");
break;
}
- case ARM::tCBZ:
- case ARM::tCBNZ: {
- if (!static_cast<ARMOperand &>(*Operands[2]).isUnsignedOffset<6, 1>())
- return Error(Operands[2]->getStartLoc(), "branch target out of range");
- break;
- }
case ARM::MOVi16:
case ARM::t2MOVi16:
case ARM::t2MOVTi16:
diff --git a/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp b/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
index 5ac2d65a89e..26f96ab77fe 100644
--- a/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
+++ b/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
@@ -578,11 +578,6 @@ unsigned ARMAsmBackend::adjustFixupValue(const MCFixup &Fixup, uint64_t Value,
// Offset by 4, and don't encode the low two bits.
return ((Value - 4) >> 2) & 0xff;
case ARM::fixup_arm_thumb_cb: {
- // CB instructions can only branch to offsets in [0, 126] in multiples of 2
- if (Ctx && ((int64_t)Value < 0 || Value > 0x3e || Value & 1)) {
- Ctx->reportError(Fixup.getLoc(), "out of range pc-relative fixup value");
- return 0;
- }
// Offset by 4 and don't encode the lower bit, which is always 0.
// FIXME: diagnose if no Thumb2
uint32_t Binary = (Value - 4) >> 1;
OpenPOWER on IntegriCloud