summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMMCInstLower.cpp
diff options
context:
space:
mode:
authorDavid Peixotto <dpeixott@codeaurora.org>2013-12-04 22:43:20 +0000
committerDavid Peixotto <dpeixott@codeaurora.org>2013-12-04 22:43:20 +0000
commit8ad70b3542ec7ac478d668724d1f9767170740c5 (patch)
tree869bf60d950c61e4180d505583c88cd043002777 /llvm/lib/Target/ARM/ARMMCInstLower.cpp
parentbb9071ea8068557929f0b4c96678c725de38b3b6 (diff)
downloadbcm5719-llvm-8ad70b3542ec7ac478d668724d1f9767170740c5.tar.gz
bcm5719-llvm-8ad70b3542ec7ac478d668724d1f9767170740c5.zip
Add support for parsing ARM symbol variants on ELF targets
ARM symbol variants are written with parens instead of @ like this: .word __GLOBAL_I_a(target1) This commit adds support for parsing these symbol variants in expressions. We introduce a new flag to MCAsmInfo that indicates the parser should use parens to parse the symbol variant. The expression parser is modified to look for symbol variants using parens instead of @ when the corresponding MCAsmInfo flag is true. The MCAsmInfo parens flag is enabled only for ARM on ELF. By adding this flag to MCAsmInfo, we are able to get rid of redundant ARM-specific symbol variants and use the generic variants instead (e.g. VK_GOT instead of VK_ARM_GOT). We use the new UseParensForSymbolVariant attribute in MCAsmInfo to correctly print the symbol variants for arm. To achive this we need to keep a handle to the MCAsmInfo in the MCSymbolRefExpr class that we can check when printing the symbol variant. Updated Tests: Changed case of symbol variant to match the generic kind. test/CodeGen/ARM/tls-models.ll test/CodeGen/ARM/tls1.ll test/CodeGen/ARM/tls2.ll test/CodeGen/Thumb2/tls1.ll test/CodeGen/Thumb2/tls2.ll PR18080 llvm-svn: 196424
Diffstat (limited to 'llvm/lib/Target/ARM/ARMMCInstLower.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMMCInstLower.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMMCInstLower.cpp b/llvm/lib/Target/ARM/ARMMCInstLower.cpp
index 1cc987ce99d..c8306277590 100644
--- a/llvm/lib/Target/ARM/ARMMCInstLower.cpp
+++ b/llvm/lib/Target/ARM/ARMMCInstLower.cpp
@@ -50,7 +50,7 @@ MCOperand ARMAsmPrinter::GetSymbolRef(const MachineOperand &MO,
}
case ARMII::MO_PLT:
- Expr = MCSymbolRefExpr::Create(Symbol, MCSymbolRefExpr::VK_ARM_PLT,
+ Expr = MCSymbolRefExpr::Create(Symbol, MCSymbolRefExpr::VK_PLT,
OutContext);
break;
}
OpenPOWER on IntegriCloud