[llvm-commits] [llvm] r114563 - in /llvm/trunk/lib/Target/ARM/AsmPrinter: ARMInstPrinter.cpp ARMInstPrinter.h

Chris Lattner clattner at apple.com
Wed Sep 22 14:37:14 PDT 2010


On Sep 22, 2010, at 11:37 AM, Jim Grosbach wrote:

> Author: grosbach
> Date: Wed Sep 22 13:37:14 2010
> New Revision: 114563
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=114563&view=rev
> Log:
> Add PrintSpecial() handling for  in ARM MC instruction printer.

Hi Jim,

What instructions are using ${:comment}?  Are they pseudo instructions that should be handled at mcinst lowering time?  Would a disassembler ever create them?

-Chris

> 
> Modified:
>    llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp
>    llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.h
> 
> Modified: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp?rev=114563&r1=114562&r2=114563&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp (original)
> +++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp Wed Sep 22 13:37:14 2010
> @@ -736,3 +736,11 @@
>   uint64_t Val = ARM_AM::decodeNEONModImm(EncodedImm, EltBits);
>   O << "#0x" << utohexstr(Val);
> }
> +
> +void ARMInstPrinter::PrintSpecial(const MCInst *MI, raw_ostream &O,
> +                                  const char *Kind) {
> +  if (strcmp(Kind, "comment") == 0)
> +    O << "@";
> +  else
> +    abort();
> +}
> 
> Modified: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.h?rev=114563&r1=114562&r2=114563&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.h (original)
> +++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.h Wed Sep 22 13:37:14 2010
> @@ -110,8 +110,7 @@
>   void printNEONModImmOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
> 
>   void printPCLabel(const MCInst *MI, unsigned OpNum, raw_ostream &O);
> -  // FIXME: Implement.
> -  void PrintSpecial(const MCInst *MI, raw_ostream &O, const char *Kind) {}
> +  void PrintSpecial(const MCInst *MI, raw_ostream &O, const char *Kind);
> };
> 
> }
> 
> 
> _______________________________________________
> 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