Newbie: Basic stuff

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Newbie: Basic stuff

Sanjiv Gupta
What does MIOperandInfo exactly mean while defining an Operand class?
 
e.g. here
 
class X86MemOperand<string printMethod> : Operand<iPTR> {
  let PrintMethod = printMethod;
  let MIOperandInfo = (ops ptr_rc, i8imm, ptr_rc, i32imm);
}

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Newbie: Basic stuff

Chris Lattner

On Dec 4, 2007, at 9:02 PM, Sanjiv Gupta wrote:

> What does MIOperandInfo exactly mean while defining an Operand class?
>
> e.g. here
>
> class X86MemOperand<string printMethod> : Operand<iPTR> {
>   let PrintMethod = printMethod;
>   let MIOperandInfo = (ops ptr_rc, i8imm, ptr_rc, i32imm);
> }

This declares X86MemOperand as an "Operand", in the selection DAG  
sense.  In the selection DAG, the type of this operand is iPTR (either  
i32 or i64 on x86).

MIOperandInfo specifies the number and types of MachineInstr operands  
(MachineOperand) that the dag operand corresponds to.  See this doc  
(Representing X86 addressing modes in MachineInstrs):
http://llvm.org/docs/CodeGenerator.html#x86

... for a description of what each of these is.

-Chris
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev