From d717b19933f1e99617205c5f0c0340e6c9cccbfc Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 11 Dec 2005 07:45:47 +0000 Subject: [PATCH] Remove type casts that are no longer needed git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24661 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/PPCAsmPrinter.cpp | 5 +++-- lib/Target/PowerPC/PPCInstrInfo.td | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp index 66f72a77f7a..b2f8bea3297 100644 --- a/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -42,7 +42,7 @@ namespace { Statistic<> EmittedInsts("asm-printer", "Number of machine instrs printed"); class PPCAsmPrinter : public AsmPrinter { -public: + public: std::set FnStubs, GVStubs, LinkOnceStubs; PPCAsmPrinter(std::ostream &O, TargetMachine &TM) @@ -197,6 +197,7 @@ public: Data64bitsDirective = 0; // we can't emit a 64-bit unit AlignmentIsInBytes = false; // Alignment is by power of 2. ConstantPoolSection = "\t.const\t"; + LCOMMDirective = "\t.lcomm\t"; } virtual const char *getPassName() const { @@ -465,7 +466,7 @@ bool DarwinAsmPrinter::doFinalization(Module &M) { SwitchSection(".data", I); if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it. if (I->hasInternalLinkage()) - O << ".lcomm " << name << "," << Size << "," << Align; + O << LCOMMDirective << name << "," << Size << "," << Align; else O << ".comm " << name << "," << Size; O << "\t\t; '" << I->getName() << "'\n"; diff --git a/lib/Target/PowerPC/PPCInstrInfo.td b/lib/Target/PowerPC/PPCInstrInfo.td index 51f05254060..62b36b8a11e 100644 --- a/lib/Target/PowerPC/PPCInstrInfo.td +++ b/lib/Target/PowerPC/PPCInstrInfo.td @@ -940,10 +940,10 @@ def : Pat<(srl G8RC:$in, (i64 imm:$imm)), (RLDICL G8RC:$in, (SRL64 imm:$imm), imm:$imm)>; // Hi and Lo for Darwin Global Addresses. -def : Pat<(PPChi tglobaladdr:$in, (i32 0)), (LIS tglobaladdr:$in)>; -def : Pat<(PPClo tglobaladdr:$in, (i32 0)), (LI tglobaladdr:$in)>; -def : Pat<(PPChi tconstpool:$in, (i32 0)), (LIS tconstpool:$in)>; -def : Pat<(PPClo tconstpool:$in, (i32 0)), (LI tconstpool:$in)>; +def : Pat<(PPChi tglobaladdr:$in, 0), (LIS tglobaladdr:$in)>; +def : Pat<(PPClo tglobaladdr:$in, 0), (LI tglobaladdr:$in)>; +def : Pat<(PPChi tconstpool:$in, 0), (LIS tconstpool:$in)>; +def : Pat<(PPClo tconstpool:$in, 0), (LI tconstpool:$in)>; def : Pat<(add GPRC:$in, (PPChi tglobaladdr:$g, 0)), (ADDIS GPRC:$in, tglobaladdr:$g)>; def : Pat<(add GPRC:$in, (PPChi tconstpool:$g, 0)),