* declare local common symbols as such (.lcomm, not merely .common)
authorDuraid Madina <duraid@octopus.com.au>
Thu, 31 Mar 2005 07:40:24 +0000 (07:40 +0000)
committerDuraid Madina <duraid@octopus.com.au>
Thu, 31 Mar 2005 07:40:24 +0000 (07:40 +0000)
* begin great adventure into correct function descriptor materialization

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20956 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/IA64/IA64AsmPrinter.cpp

index 4c950fc24cd535962617c15c7a2abc94d866aad1..280186b8b237dd7fd33acc6e5f8fb943592ad6d3 100644 (file)
@@ -112,12 +112,15 @@ bool IA64SharedAsmPrinter::doFinalization(Module &M) {
           (I->hasLinkOnceLinkage() || I->hasInternalLinkage() ||
            I->hasWeakLinkage() /* FIXME: Verify correct */)) {
         SwitchSection(O, CurSection, ".data");
-        if (I->hasInternalLinkage())
-// FIXME          O << "\t.local " << name << "\n";
-        
-        O << "\t.common " << name << "," << TD.getTypeSize(C->getType())
-          << "," << (1 << Align);
-        O << "\t\t// ";
+        if (I->hasInternalLinkage()) {
+         O << "\t.lcomm " << name << "," << TD.getTypeSize(C->getType())
+           << "," << (1 << Align);
+         O << "\t\t// ";
+       } else {
+         O << "\t.common " << name << "," << TD.getTypeSize(C->getType())
+           << "," << (1 << Align);
+         O << "\t\t// ";
+       }
         WriteAsOperand(O, I, true, true, &M);
         O << "\n";
       } else {
@@ -345,7 +348,7 @@ void IA64AsmPrinter::printOp(const MachineOperand &MO,
     bool Needfptr=false; // if we're computing an address @ltoff(X), do
                          // we need to decorate it so it becomes
                         // @ltoff(@fptr(X)) ?
-    if(F && !isBRCALLinsn && F->isExternal())
+    if(F && !isBRCALLinsn /*&& F->isExternal()*/)
       Needfptr=true;
    
     // if this is the target of a call instruction, we should define