Add support for targets that have .quad, drop extra tab inserted
authorChris Lattner <sabre@nondot.org>
Tue, 17 Aug 2004 06:48:16 +0000 (06:48 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 17 Aug 2004 06:48:16 +0000 (06:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15870 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter.cpp

index 7773274eed415ed2a690c9ef316a4c584f002e5d..92707528f97b2aa51c5dd50fbcd7a798747b2bba 100644 (file)
@@ -31,11 +31,8 @@ bool AsmPrinter::doFinalization(Module &M) {
 void AsmPrinter::setupMachineFunction(MachineFunction &MF) {
   // What's my mangled name?
   CurrentFnName = Mang->getValueName((Value*)MF.getFunction());
-
 }
 
-
-
 // Print out the specified constant, without a storage class.  Only the
 // constants valid in constant expressions can occur here.
 void AsmPrinter::emitConstantValueOnly(const Constant *CV) {
@@ -203,7 +200,9 @@ void AsmPrinter::emitGlobalConstant(const Constant *CV) {
       } U;
       U.FVal = Val;
 
-      if (TD.isBigEndian()) {
+      if (Data64bitsDirective)
+        O << Data64bitsDirective << U.UVal << "\n";
+      else if (TD.isBigEndian()) {
         O << Data32bitsDirective << unsigned(U.UVal >> 32)
           << "\t; double most significant word " << Val << "\n";
         O << Data32bitsDirective << unsigned(U.UVal)
@@ -229,7 +228,9 @@ void AsmPrinter::emitGlobalConstant(const Constant *CV) {
     if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
       uint64_t Val = CI->getRawValue();
         
-      if (TD.isBigEndian()) {
+      if (Data64bitsDirective)
+        O << Data64bitsDirective << Val << "\n";
+      else if (TD.isBigEndian()) {
         O << Data32bitsDirective << unsigned(Val >> 32)
           << "\t; Double-word most significant word " << Val << "\n";
         O << Data32bitsDirective << unsigned(Val)
@@ -245,7 +246,6 @@ void AsmPrinter::emitGlobalConstant(const Constant *CV) {
   }
 
   const Type *type = CV->getType();
-  O << "\t";
   switch (type->getTypeID()) {
   case Type::UByteTyID: case Type::SByteTyID:
     O << Data8bitsDirective;