From 8210045b9ff5fdaac49d5883f8c25bfa2d368b05 Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Wed, 9 Jul 2008 13:20:27 +0000 Subject: [PATCH] Whitespace cleanup git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53298 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86TargetAsmInfo.cpp | 32 ++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/Target/X86/X86TargetAsmInfo.cpp b/lib/Target/X86/X86TargetAsmInfo.cpp index b34f2d19e39..e0eb128e5f1 100644 --- a/lib/Target/X86/X86TargetAsmInfo.cpp +++ b/lib/Target/X86/X86TargetAsmInfo.cpp @@ -44,7 +44,7 @@ X86TargetAsmInfo::X86TargetAsmInfo(const X86TargetMachine &TM) { // FIXME - Should be simplified. AsmTransCBE = x86_asm_table; - + switch (Subtarget->TargetType) { case X86Subtarget::isDarwin: AlignmentIsInBytes = false; @@ -94,7 +94,7 @@ X86TargetAsmInfo::X86TargetAsmInfo(const X86TargetMachine &TM) { WeakRefDirective = "\t.weak_reference "; HiddenDirective = "\t.private_extern "; ProtectedDirective = "\t.globl\t"; - + // In non-PIC modes, emit a special label before jump tables so that the // linker can perform more accurate dead code stripping. if (TM.getRelocationModel() != Reloc::PIC_) { @@ -202,11 +202,11 @@ X86TargetAsmInfo::X86TargetAsmInfo(const X86TargetMachine &TM) { default: break; } - + if (Subtarget->isFlavorIntel()) { GlobalPrefix = "_"; CommentString = ";"; - + PrivateGlobalPrefix = "$"; AlignDirective = "\talign\t"; ZeroDirective = "\tdb\t"; @@ -218,7 +218,7 @@ X86TargetAsmInfo::X86TargetAsmInfo(const X86TargetMachine &TM) { Data32bitsDirective = "\tdd\t"; Data64bitsDirective = "\tdq\t"; HasDotTypeDotSizeDirective = false; - + TextSection = "_text"; DataSection = "_data"; JumpTableDataSection = NULL; @@ -240,25 +240,25 @@ bool X86TargetAsmInfo::LowerToBSwap(CallInst *CI) const { // we will turn this bswap into something that will be lowered to logical ops // instead of emitting the bswap asm. For now, we don't support 486 or lower // so don't worry about this. - + // Verify this is a simple bswap. if (CI->getNumOperands() != 2 || CI->getType() != CI->getOperand(1)->getType() || !CI->getType()->isInteger()) return false; - + const IntegerType *Ty = dyn_cast(CI->getType()); if (!Ty || Ty->getBitWidth() % 16 != 0) return false; - + // Okay, we can do this xform, do so now. const Type *Tys[] = { Ty }; Module *M = CI->getParent()->getParent()->getParent(); Constant *Int = Intrinsic::getDeclaration(M, Intrinsic::bswap, Tys, 1); - + Value *Op = CI->getOperand(1); Op = CallInst::Create(Int, Op, CI->getName(), CI); - + CI->replaceAllUsesWith(Op); CI->eraseFromParent(); return true; @@ -268,22 +268,22 @@ bool X86TargetAsmInfo::LowerToBSwap(CallInst *CI) const { bool X86TargetAsmInfo::ExpandInlineAsm(CallInst *CI) const { InlineAsm *IA = cast(CI->getCalledValue()); std::vector Constraints = IA->ParseConstraints(); - + std::string AsmStr = IA->getAsmString(); - + // TODO: should remove alternatives from the asmstring: "foo {a|b}" -> "foo a" std::vector AsmPieces; SplitString(AsmStr, AsmPieces, "\n"); // ; as separator? - + switch (AsmPieces.size()) { - default: return false; + default: return false; case 1: AsmStr = AsmPieces[0]; AsmPieces.clear(); SplitString(AsmStr, AsmPieces, " \t"); // Split with whitespace. - + // bswap $0 - if (AsmPieces.size() == 2 && + if (AsmPieces.size() == 2 && AsmPieces[0] == "bswap" && AsmPieces[1] == "$0") { // No need to check constraints, nothing other than the equivalent of // "=r,0" would be valid here.