diff options
author | Jim Grosbach <grosbach@apple.com> | 2012-05-21 23:34:42 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2012-05-21 23:34:42 +0000 |
commit | 2597f8388995b131273279006b5c20892cbba11e (patch) | |
tree | 4ec4ba322b88598bf265d1815c95d41ba7229f62 /llvm/lib/Target/ARM/ARMAsmPrinter.cpp | |
parent | ce8af862ae3c39fb9109be955794d94a0e30549c (diff) | |
download | bcm5719-llvm-2597f8388995b131273279006b5c20892cbba11e.tar.gz bcm5719-llvm-2597f8388995b131273279006b5c20892cbba11e.zip |
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
llvm-svn: 157221
Diffstat (limited to 'llvm/lib/Target/ARM/ARMAsmPrinter.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMAsmPrinter.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp index e781498f1df..2a70a376f33 100644 --- a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/llvm/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, |