diff options
author | Lauro Ramos Venancio <lauro.venancio@gmail.com> | 2007-04-27 13:54:47 +0000 |
---|---|---|
committer | Lauro Ramos Venancio <lauro.venancio@gmail.com> | 2007-04-27 13:54:47 +0000 |
commit | 64f4fa5e0eb505eec3a72041bec6b3a7f7739ded (patch) | |
tree | 37134a70f675d61645a3ca99317b700d28a5e492 /lib/Target/ARM/ARMConstantPoolValue.cpp | |
parent | b1df8f2750cb8df55f7e15985ef5c86f9092cbe1 (diff) |
ARM TLS: implement "general dynamic", "initial exec" and "local exec" models.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36506 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMConstantPoolValue.cpp')
-rw-r--r-- | lib/Target/ARM/ARMConstantPoolValue.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/lib/Target/ARM/ARMConstantPoolValue.cpp b/lib/Target/ARM/ARMConstantPoolValue.cpp index 1fe66fb174..30a8eafefd 100644 --- a/lib/Target/ARM/ARMConstantPoolValue.cpp +++ b/lib/Target/ARM/ARMConstantPoolValue.cpp @@ -20,18 +20,20 @@ using namespace llvm; ARMConstantPoolValue::ARMConstantPoolValue(GlobalValue *gv, unsigned id, ARMCP::ARMCPKind k, unsigned char PCAdj, - const char *Modif) + const char *Modif, + bool AddCA) : MachineConstantPoolValue((const Type*)gv->getType()), GV(gv), S(NULL), LabelId(id), Kind(k), PCAdjust(PCAdj), - Modifier(Modif) {} + Modifier(Modif), AddCurrentAddress(AddCA) {} ARMConstantPoolValue::ARMConstantPoolValue(const char *s, unsigned id, ARMCP::ARMCPKind k, unsigned char PCAdj, - const char *Modif) + const char *Modif, + bool AddCA) : MachineConstantPoolValue((const Type*)Type::Int32Ty), GV(NULL), S(s), LabelId(id), Kind(k), PCAdjust(PCAdj), - Modifier(Modif) {} + Modifier(Modif), AddCurrentAddress(AddCA) {} ARMConstantPoolValue::ARMConstantPoolValue(GlobalValue *gv, ARMCP::ARMCPKind k, @@ -78,6 +80,11 @@ void ARMConstantPoolValue::print(std::ostream &O) const { if (isNonLazyPointer()) O << "$non_lazy_ptr"; else if (isStub()) O << "$stub"; if (Modifier) O << "(" << Modifier << ")"; - if (PCAdjust != 0) O << "-(LPIC" << LabelId << "+" - << (unsigned)PCAdjust << ")"; + if (PCAdjust != 0) { + O << "-(LPIC" << LabelId << "+" + << (unsigned)PCAdjust; + if (AddCurrentAddress) + O << "-."; + O << ")"; + } } |