diff options
| author | Tim Northover <tnorthover@apple.com> | 2014-04-24 12:12:10 +0000 |
|---|---|---|
| committer | Tim Northover <tnorthover@apple.com> | 2014-04-24 12:12:10 +0000 |
| commit | 79ec019261e44ad5c03194aa124e4a5b1be04f7d (patch) | |
| tree | dfecc805095d966b2839f8e68f902fcc6ecc384b /llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp | |
| parent | cf16ec238e469dcc83d335fddaa25a713231a2aa (diff) | |
| download | bcm5719-llvm-79ec019261e44ad5c03194aa124e4a5b1be04f7d.tar.gz bcm5719-llvm-79ec019261e44ad5c03194aa124e4a5b1be04f7d.zip | |
AArch64/ARM64: disentangle the "B.CC" and "LDR lit" operands
These can have different relocations in ELF. In particular both:
b.eq global
ldr x0, global
are valid, giving different relocations. The only possible way to distinguish
them is via a different fixup, so the operands had to be separated throughout
the backend.
llvm-svn: 207105
Diffstat (limited to 'llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp')
| -rw-r--r-- | llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp b/llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp index 2f720e9c969..7efc4572bda 100644 --- a/llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp +++ b/llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp @@ -558,7 +558,7 @@ public: return false; return (Val >= -(0x2000000 << 2) && Val <= (0x1ffffff << 2)); } - bool isBranchTarget19() const { + bool isPCRelLabel19() const { if (!isImm()) return false; const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(getImm()); @@ -1272,7 +1272,7 @@ public: Inst.addOperand(MCOperand::CreateImm(MCE->getValue() >> 2)); } - void addBranchTarget19Operands(MCInst &Inst, unsigned N) const { + void addPCRelLabel19Operands(MCInst &Inst, unsigned N) const { // Branch operands don't encode the low bits, so shift them off // here. If it's a label, however, just put it on directly as there's // not enough information now to do anything. |

