[llvm] r177830 - MCize the bcl instruction in PPCAsmPrinter
Bill Schmidt
wschmidt at linux.vnet.ibm.com
Mon Mar 25 19:40:16 PDT 2013
Hi Hal,
On Sat, 2013-03-23 at 20:53 +0000, Hal Finkel wrote:
> Author: hfinkel
> Date: Sat Mar 23 15:53:15 2013
> New Revision: 177830
>
> URL: http://llvm.org/viewvc/llvm-project?rev=177830&view=rev
> Log:
> MCize the bcl instruction in PPCAsmPrinter
>
> I recently added a BCL instruction definition as part of implementing SjLj
> support. This can also be used to MCize bcl emission in the asm printer.
>
> No functionality change intended.
>
> Modified:
> llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp
>
> Modified: llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp?rev=177830&r1=177829&r2=177830&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp (original)
> +++ llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp Sat Mar 23 15:53:15 2013
> @@ -911,18 +911,19 @@ EmitFunctionStubs(const MachineModuleInf
> OutStreamer.EmitLabel(Stub);
> OutStreamer.EmitSymbolAttribute(RawSym, MCSA_IndirectSymbol);
>
> + const MCExpr *Anon = MCSymbolRefExpr::Create(AnonSymbol, OutContext);
> +
> // mflr r0
> OutStreamer.EmitInstruction(MCInstBuilder(PPC::MFLR).addReg(PPC::R0));
> - // FIXME: MCize this.
> - OutStreamer.EmitRawText("\tbcl 20, 31, " + Twine(AnonSymbol->getName()));
> + // bcl 20, 31, AnonSymbol
> + OutStreamer.EmitInstruction(MCInstBuilder(PPC::BCL).addExpr(Anon));
Just want to reiterate that I'd like to see the BI and BO fields
specified explicitly on PPC::BCL. :)
Thanks,
Bill
> OutStreamer.EmitLabel(AnonSymbol);
> // mflr r11
> OutStreamer.EmitInstruction(MCInstBuilder(PPC::MFLR).addReg(PPC::R11));
> // addis r11, r11, ha16(LazyPtr - AnonSymbol)
> const MCExpr *Sub =
> MCBinaryExpr::CreateSub(MCSymbolRefExpr::Create(LazyPtr, OutContext),
> - MCSymbolRefExpr::Create(AnonSymbol, OutContext),
> - OutContext);
> + Anon, OutContext);
> OutStreamer.EmitInstruction(MCInstBuilder(PPC::ADDIS)
> .addReg(PPC::R11)
> .addReg(PPC::R11)
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list