mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Let Darwin linker auto-synthesize stubs and lazy-pointers. This deletes a bunch of nasty code in ARM asm printer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80404 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -20,29 +20,25 @@
|
||||
using namespace llvm;
|
||||
|
||||
ARMConstantPoolValue::ARMConstantPoolValue(GlobalValue *gv, unsigned id,
|
||||
ARMCP::ARMCPKind k,
|
||||
unsigned char PCAdj,
|
||||
const char *Modif,
|
||||
bool AddCA)
|
||||
: MachineConstantPoolValue((const Type*)gv->getType()),
|
||||
GV(gv), S(NULL), LabelId(id), Kind(k), PCAdjust(PCAdj),
|
||||
GV(gv), S(NULL), LabelId(id), PCAdjust(PCAdj),
|
||||
Modifier(Modif), AddCurrentAddress(AddCA) {}
|
||||
|
||||
ARMConstantPoolValue::ARMConstantPoolValue(LLVMContext &C,
|
||||
const char *s, unsigned id,
|
||||
ARMCP::ARMCPKind k,
|
||||
unsigned char PCAdj,
|
||||
const char *Modif,
|
||||
bool AddCA)
|
||||
: MachineConstantPoolValue((const Type*)Type::getInt32Ty(C)),
|
||||
GV(NULL), S(strdup(s)), LabelId(id), Kind(k), PCAdjust(PCAdj),
|
||||
GV(NULL), S(strdup(s)), LabelId(id), PCAdjust(PCAdj),
|
||||
Modifier(Modif), AddCurrentAddress(AddCA) {}
|
||||
|
||||
ARMConstantPoolValue::ARMConstantPoolValue(GlobalValue *gv,
|
||||
ARMCP::ARMCPKind k,
|
||||
const char *Modif)
|
||||
ARMConstantPoolValue::ARMConstantPoolValue(GlobalValue *gv, const char *Modif)
|
||||
: MachineConstantPoolValue((const Type*)Type::getInt32Ty(gv->getContext())),
|
||||
GV(gv), S(NULL), LabelId(0), Kind(k), PCAdjust(0),
|
||||
GV(gv), S(NULL), LabelId(0), PCAdjust(0),
|
||||
Modifier(Modif) {}
|
||||
|
||||
int ARMConstantPoolValue::getExistingMachineCPValue(MachineConstantPool *CP,
|
||||
@ -57,7 +53,6 @@ int ARMConstantPoolValue::getExistingMachineCPValue(MachineConstantPool *CP,
|
||||
if (CPV->GV == GV &&
|
||||
CPV->S == S &&
|
||||
CPV->LabelId == LabelId &&
|
||||
CPV->Kind == Kind &&
|
||||
CPV->PCAdjust == PCAdjust)
|
||||
return i;
|
||||
}
|
||||
@ -75,7 +70,6 @@ ARMConstantPoolValue::AddSelectionDAGCSEId(FoldingSetNodeID &ID) {
|
||||
ID.AddPointer(GV);
|
||||
ID.AddPointer(S);
|
||||
ID.AddInteger(LabelId);
|
||||
ID.AddInteger((unsigned)Kind);
|
||||
ID.AddInteger(PCAdjust);
|
||||
}
|
||||
|
||||
@ -89,8 +83,6 @@ void ARMConstantPoolValue::print(raw_ostream &O) const {
|
||||
O << GV->getName();
|
||||
else
|
||||
O << S;
|
||||
if (isNonLazyPointer()) O << "$non_lazy_ptr";
|
||||
else if (isStub()) O << "$stub";
|
||||
if (Modifier) O << "(" << Modifier << ")";
|
||||
if (PCAdjust != 0) {
|
||||
O << "-(LPC" << LabelId << "+" << (unsigned)PCAdjust;
|
||||
|
Reference in New Issue
Block a user