summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2012-01-18 00:40:25 +0000
committerJim Grosbach <grosbach@apple.com>2012-01-18 00:40:25 +0000
commitadcc938c460f9bd7e563085ecd1842bbf01eee3d (patch)
tree3ec17b17deae3e34f5e145bdee60575f84195f0b /llvm
parentf30d9ad6e12ad4e39288d7b7aa86aed4f08e64a5 (diff)
downloadbcm5719-llvm-adcc938c460f9bd7e563085ecd1842bbf01eee3d.tar.gz
bcm5719-llvm-adcc938c460f9bd7e563085ecd1842bbf01eee3d.zip
Thumb2 load/store fixups don't set the thumb bit.
Load/store instructions w/ a fixup to be relative a function marked as thumb don't use the low bit to specify thumb vs. non-thumb like interworking branches do, so don't set it when dealing with those fixups. rdar://10348687. llvm-svn: 148366
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp b/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
index 88fea5745d8..0e10b643c5f 100644
--- a/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
+++ b/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
@@ -109,10 +109,14 @@ public:
MCValue &Target, uint64_t &Value) {
// Some fixups to thumb function symbols need the low bit (thumb bit)
// twiddled.
- if (const MCSymbolRefExpr *A = Target.getSymA()) {
- const MCSymbol &Sym = A->getSymbol().AliasedSymbol();
- if (Asm.isThumbFunc(&Sym))
- Value |= 1;
+ if ((unsigned)Fixup.getKind() != ARM::fixup_arm_ldst_pcrel_12 &&
+ (unsigned)Fixup.getKind() != ARM::fixup_t2_ldst_pcrel_12 &&
+ (unsigned)Fixup.getKind() != ARM::fixup_arm_thumb_cp) {
+ if (const MCSymbolRefExpr *A = Target.getSymA()) {
+ const MCSymbol &Sym = A->getSymbol().AliasedSymbol();
+ if (Asm.isThumbFunc(&Sym))
+ Value |= 1;
+ }
}
}
OpenPOWER on IntegriCloud