summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMAsmPrinter.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2012-05-21 23:34:42 +0000
committerJim Grosbach <grosbach@apple.com>2012-05-21 23:34:42 +0000
commitb3a119a257978857c1d62ad74ed4123198ea6703 (patch)
tree25d6392a720baf9fe47f156397bb9599696764ea /lib/Target/ARM/ARMAsmPrinter.cpp
parentb428511989eea383b4fa65678c12b055d5c72af5 (diff)
downloadllvm-b3a119a257978857c1d62ad74ed4123198ea6703.tar.gz
llvm-b3a119a257978857c1d62ad74ed4123198ea6703.tar.bz2
llvm-b3a119a257978857c1d62ad74ed4123198ea6703.tar.xz
ARM: .end_data_region mismatch in Thumb2.
32-bit offset jump tables just use real branch instructions and so aren't marked as data regions. We were still emitting the .end_data_region marker though, which assert()ed. rdar://11499158 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157221 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMAsmPrinter.cpp')
-rw-r--r--lib/Target/ARM/ARMAsmPrinter.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp
index e781498f1d..2a70a376f3 100644
--- a/lib/Target/ARM/ARMAsmPrinter.cpp
+++ b/lib/Target/ARM/ARMAsmPrinter.cpp
@@ -1036,8 +1036,11 @@ void ARMAsmPrinter::EmitJump2Table(const MachineInstr *MI) {
OutContext);
OutStreamer.EmitValue(Expr, OffsetWidth);
}
- // Mark the end of jump table data-in-code region.
- OutStreamer.EmitDataRegion(MCDR_DataRegionEnd);
+ // Mark the end of jump table data-in-code region. 32-bit offsets use
+ // actual branch instructions here, so we don't mark those as a data-region
+ // at all.
+ if (OffsetWidth != 4)
+ OutStreamer.EmitDataRegion(MCDR_DataRegionEnd);
}
void ARMAsmPrinter::PrintDebugValueComment(const MachineInstr *MI,