[llvm-commits] [llvm] r93565 - in /llvm/trunk: include/llvm/Target/Target.td lib/Target/X86/AsmPrinter/X86MCInstLower.cpp

Chris Lattner clattner at apple.com
Fri Jan 15 14:46:29 PST 2010


On Jan 15, 2010, at 2:22 PM, Dale Johannesen wrote:
> Author: johannes
> Date: Fri Jan 15 16:22:35 2010
> New Revision: 93565
>
> URL: http://llvm.org/viewvc/llvm-project?rev=93565&view=rev
> Log:
> DEBUG_VALUE is now variable sized, as it has a
> target-dependent memory address representation in it.
> Restore X86 printing of DEBUG_VALUE; lowering is
> done in X86RegisterInfo using the normal algorithm.

Ok.

> +  case TargetInstrInfo::DEBUG_VALUE: {
> +    if (!VerboseAsm)
> +      return;
> +    O << '\t' << MAI->getCommentString() << "DEBUG_VALUE: ";
> +    unsigned NOps = MI->getNumOperands();

Do you plan to move this into the target-independent AsmPrinter code?

> +    // cast away const; DIetc do not take const operands for some  
> reason
> +    DIVariable V((MDNode*)(MI->getOperand(NOps-1).getMetadata()));

This shouldn't need a cast.

> +    O << V.getName();
> +    O << " <- ";
> +    if (NOps==3) {
> +      // Variable is in register
> +      assert(MI- 
> >getOperand(0).getType()==MachineOperand::MO_Register);
> +      printOperand(MI, 0);
> +    } else {
> +      // Frame address.  Currently handles ESP or ESP + offset only
> +      assert(MI- 
> >getOperand(0).getType()==MachineOperand::MO_Register);
> +      assert(MI- 
> >getOperand(3).getType()==MachineOperand::MO_Immediate);

What about EBP?

-Chris



More information about the llvm-commits mailing list