Use ! for comment char; it works in both Solaris as and GAS.
authorBrian Gaeke <gaeke@uiuc.edu>
Tue, 16 Mar 2004 22:37:12 +0000 (22:37 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Tue, 16 Mar 2004 22:37:12 +0000 (22:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12451 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Sparc/SparcAsmPrinter.cpp
lib/Target/SparcV8/SparcV8AsmPrinter.cpp

index a500f24577b9e5c0c30344b6230ea1273f5068ed..9dabdab517d2a687ae60a34d02fd4b92e0c6cc28 100644 (file)
@@ -256,7 +256,7 @@ void V8Printer::emitGlobalConstant(const Constant *CV) {
         unsigned UVal;
       } U;
       U.FVal = Val;
-      O << ".long\t" << U.UVal << "\t# float " << Val << "\n";
+      O << ".long\t" << U.UVal << "\t! float " << Val << "\n";
       return;
     }
     case Type::DoubleTyID: {
@@ -265,7 +265,7 @@ void V8Printer::emitGlobalConstant(const Constant *CV) {
         uint64_t UVal;
       } U;
       U.FVal = Val;
-      O << ".quad\t" << U.UVal << "\t# double " << Val << "\n";
+      O << ".quad\t" << U.UVal << "\t! double " << Val << "\n";
       return;
     }
     }
@@ -312,7 +312,7 @@ void V8Printer::printConstantPool(MachineConstantPool *MCP) {
     O << "\t.section .rodata\n";
     O << "\t.align " << (unsigned)TD.getTypeAlignment(CP[i]->getType())
       << "\n";
-    O << ".CPI" << CurrentFnName << "_" << i << ":\t\t\t\t\t#"
+    O << ".CPI" << CurrentFnName << "_" << i << ":\t\t\t\t\t!"
       << *CP[i] << "\n";
     emitGlobalConstant(CP[i]);
   }
@@ -352,7 +352,7 @@ bool V8Printer::runOnMachineFunction(MachineFunction &MF) {
   for (MachineFunction::const_iterator I = MF.begin(), E = MF.end();
        I != E; ++I) {
     // Print a label for the basic block.
-    O << ".LBB" << NumberForBB[I->getBasicBlock()] << ":\t# "
+    O << ".LBB" << NumberForBB[I->getBasicBlock()] << ":\t! "
       << I->getBasicBlock()->getName() << "\n";
     for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
         II != E; ++II) {
@@ -399,7 +399,7 @@ void V8Printer::printOperand(const MachineOperand &MO) {
     ValueMapTy::const_iterator i = NumberForBB.find(MO.getVRegValue());
     assert (i != NumberForBB.end()
             && "Could not find a BB in the NumberForBB map!");
-    O << ".LBB" << i->second << " # PC rel: " << MO.getVRegValue()->getName();
+    O << ".LBB" << i->second << " ! PC rel: " << MO.getVRegValue()->getName();
     return;
   }
   case MachineOperand::MO_GlobalAddress:
@@ -484,7 +484,7 @@ bool V8Printer::doFinalization(Module &M) {
         
         O << "\t.comm " << name << "," << TD.getTypeSize(C->getType())
           << "," << (unsigned)TD.getTypeAlignment(C->getType());
-        O << "\t\t# ";
+        O << "\t\t! ";
         WriteAsOperand(O, I, true, true, &M);
         O << "\n";
       } else {
@@ -515,7 +515,7 @@ bool V8Printer::doFinalization(Module &M) {
         O << "\t.align " << Align << "\n";
         O << "\t.type " << name << ",@object\n";
         O << "\t.size " << name << "," << Size << "\n";
-        O << name << ":\t\t\t\t# ";
+        O << name << ":\t\t\t\t! ";
         WriteAsOperand(O, I, true, true, &M);
         O << " = ";
         WriteAsOperand(O, C, false, false, &M);
index a500f24577b9e5c0c30344b6230ea1273f5068ed..9dabdab517d2a687ae60a34d02fd4b92e0c6cc28 100644 (file)
@@ -256,7 +256,7 @@ void V8Printer::emitGlobalConstant(const Constant *CV) {
         unsigned UVal;
       } U;
       U.FVal = Val;
-      O << ".long\t" << U.UVal << "\t# float " << Val << "\n";
+      O << ".long\t" << U.UVal << "\t! float " << Val << "\n";
       return;
     }
     case Type::DoubleTyID: {
@@ -265,7 +265,7 @@ void V8Printer::emitGlobalConstant(const Constant *CV) {
         uint64_t UVal;
       } U;
       U.FVal = Val;
-      O << ".quad\t" << U.UVal << "\t# double " << Val << "\n";
+      O << ".quad\t" << U.UVal << "\t! double " << Val << "\n";
       return;
     }
     }
@@ -312,7 +312,7 @@ void V8Printer::printConstantPool(MachineConstantPool *MCP) {
     O << "\t.section .rodata\n";
     O << "\t.align " << (unsigned)TD.getTypeAlignment(CP[i]->getType())
       << "\n";
-    O << ".CPI" << CurrentFnName << "_" << i << ":\t\t\t\t\t#"
+    O << ".CPI" << CurrentFnName << "_" << i << ":\t\t\t\t\t!"
       << *CP[i] << "\n";
     emitGlobalConstant(CP[i]);
   }
@@ -352,7 +352,7 @@ bool V8Printer::runOnMachineFunction(MachineFunction &MF) {
   for (MachineFunction::const_iterator I = MF.begin(), E = MF.end();
        I != E; ++I) {
     // Print a label for the basic block.
-    O << ".LBB" << NumberForBB[I->getBasicBlock()] << ":\t# "
+    O << ".LBB" << NumberForBB[I->getBasicBlock()] << ":\t! "
       << I->getBasicBlock()->getName() << "\n";
     for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
         II != E; ++II) {
@@ -399,7 +399,7 @@ void V8Printer::printOperand(const MachineOperand &MO) {
     ValueMapTy::const_iterator i = NumberForBB.find(MO.getVRegValue());
     assert (i != NumberForBB.end()
             && "Could not find a BB in the NumberForBB map!");
-    O << ".LBB" << i->second << " # PC rel: " << MO.getVRegValue()->getName();
+    O << ".LBB" << i->second << " ! PC rel: " << MO.getVRegValue()->getName();
     return;
   }
   case MachineOperand::MO_GlobalAddress:
@@ -484,7 +484,7 @@ bool V8Printer::doFinalization(Module &M) {
         
         O << "\t.comm " << name << "," << TD.getTypeSize(C->getType())
           << "," << (unsigned)TD.getTypeAlignment(C->getType());
-        O << "\t\t# ";
+        O << "\t\t! ";
         WriteAsOperand(O, I, true, true, &M);
         O << "\n";
       } else {
@@ -515,7 +515,7 @@ bool V8Printer::doFinalization(Module &M) {
         O << "\t.align " << Align << "\n";
         O << "\t.type " << name << ",@object\n";
         O << "\t.size " << name << "," << Size << "\n";
-        O << name << ":\t\t\t\t# ";
+        O << name << ":\t\t\t\t! ";
         WriteAsOperand(O, I, true, true, &M);
         O << " = ";
         WriteAsOperand(O, C, false, false, &M);