From 79db7405f78fa009efc5a530addc9dda0894aa3e Mon Sep 17 00:00:00 2001 From: Brian Gaeke Date: Tue, 16 Mar 2004 22:37:12 +0000 Subject: [PATCH] Use ! for comment char; it works in both Solaris as and GAS. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12451 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Sparc/SparcAsmPrinter.cpp | 14 +++++++------- lib/Target/SparcV8/SparcV8AsmPrinter.cpp | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/Target/Sparc/SparcAsmPrinter.cpp b/lib/Target/Sparc/SparcAsmPrinter.cpp index a500f24577b..9dabdab517d 100644 --- a/lib/Target/Sparc/SparcAsmPrinter.cpp +++ b/lib/Target/Sparc/SparcAsmPrinter.cpp @@ -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); diff --git a/lib/Target/SparcV8/SparcV8AsmPrinter.cpp b/lib/Target/SparcV8/SparcV8AsmPrinter.cpp index a500f24577b..9dabdab517d 100644 --- a/lib/Target/SparcV8/SparcV8AsmPrinter.cpp +++ b/lib/Target/SparcV8/SparcV8AsmPrinter.cpp @@ -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);