mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-24 13:18:17 +00:00
Implement PIC for arm-linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36324 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -19,15 +19,26 @@ using namespace llvm;
|
||||
|
||||
ARMConstantPoolValue::ARMConstantPoolValue(GlobalValue *gv, unsigned id,
|
||||
ARMCP::ARMCPKind k,
|
||||
unsigned char PCAdj)
|
||||
unsigned char PCAdj,
|
||||
const char *Modif)
|
||||
: MachineConstantPoolValue((const Type*)gv->getType()),
|
||||
GV(gv), S(NULL), LabelId(id), Kind(k), PCAdjust(PCAdj) {}
|
||||
GV(gv), S(NULL), LabelId(id), Kind(k), PCAdjust(PCAdj),
|
||||
Modifier(Modif) {}
|
||||
|
||||
ARMConstantPoolValue::ARMConstantPoolValue(const char *s, unsigned id,
|
||||
ARMCP::ARMCPKind k,
|
||||
unsigned char PCAdj)
|
||||
unsigned char PCAdj,
|
||||
const char *Modif)
|
||||
: MachineConstantPoolValue((const Type*)Type::Int32Ty),
|
||||
GV(NULL), S(s), LabelId(id), Kind(k), PCAdjust(PCAdj) {}
|
||||
GV(NULL), S(s), LabelId(id), Kind(k), PCAdjust(PCAdj),
|
||||
Modifier(Modif) {}
|
||||
|
||||
ARMConstantPoolValue::ARMConstantPoolValue(GlobalValue *gv,
|
||||
ARMCP::ARMCPKind k,
|
||||
const char *Modif)
|
||||
: MachineConstantPoolValue((const Type*)Type::Int32Ty),
|
||||
GV(gv), S(NULL), LabelId(0), Kind(k), PCAdjust(0),
|
||||
Modifier(Modif) {}
|
||||
|
||||
int ARMConstantPoolValue::getExistingMachineCPValue(MachineConstantPool *CP,
|
||||
unsigned Alignment) {
|
||||
@@ -66,6 +77,7 @@ void ARMConstantPoolValue::print(std::ostream &O) const {
|
||||
O << S;
|
||||
if (isNonLazyPointer()) O << "$non_lazy_ptr";
|
||||
else if (isStub()) O << "$stub";
|
||||
if (Modifier) O << "(" << Modifier << ")";
|
||||
if (PCAdjust != 0) O << "-(LPIC" << LabelId << "+"
|
||||
<< (unsigned)PCAdjust << ")";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user