diff options
| author | Misha Brukman <brukman+llvm@gmail.com> | 2004-07-20 15:45:27 +0000 |
|---|---|---|
| committer | Misha Brukman <brukman+llvm@gmail.com> | 2004-07-20 15:45:27 +0000 |
| commit | e48178e8a652623c5c675f0f9dc495053ca76d2b (patch) | |
| tree | 4f2bd5f0ccb56de6b2ea5b94b043a670ba1c6a36 /lib/Target/PowerPC/PPCAsmPrinter.cpp | |
| parent | 5c4544160f9ea80da80ef3f4fd5877284f87981d (diff) | |
Differentiate between global and weak symbol loads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15035 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCAsmPrinter.cpp')
| -rw-r--r-- | lib/Target/PowerPC/PPCAsmPrinter.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp index 4e2b90e4b7..6c6b66afb0 100644 --- a/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -224,10 +224,7 @@ void Printer::emitConstantValueOnly(const Constant *CV) { void Printer::emitGlobalConstant(const Constant *CV) { const TargetData &TD = TM.getTargetData(); - if (CV->isNullValue()) { - O << "\t.space\t " << TD.getTypeSize(CV->getType()) << "\n"; - return; - } else if (const ConstantArray *CVA = dyn_cast<ConstantArray>(CV)) { + if (const ConstantArray *CVA = dyn_cast<ConstantArray>(CV)) { if (isStringCompatible(CVA)) { O << "\t.ascii "; printAsCString(O, CVA); @@ -524,7 +521,7 @@ void Printer::printMachineInstruction(const MachineInstr *MI) { } O << TII.getName(MI->getOpcode()) << " "; - if (Opcode == PPC32::LOADLoAddr) { + if (Opcode == PPC32::LOADLoDirect || Opcode == PPC32::LOADLoIndirect) { printOp(MI->getOperand(0)); O << ", lo16("; printOp(MI->getOperand(2)); @@ -676,7 +673,7 @@ bool Printer::doFinalization(Module &M) { // Output stubs for external global variables if (GVStubs.begin() != GVStubs.end()) - O << "\t.non_lazy_symbol_pointer\n"; + O << ".data\n\t.non_lazy_symbol_pointer\n"; for (std::set<std::string>::iterator i = GVStubs.begin(), e = GVStubs.end(); i != e; ++i) { O << "L" << *i << "$non_lazy_ptr:\n"; |
