[LLVMdev] Bitwidth of Machine Instructions

Babak Salamat bsalamat at uci.edu
Fri Jun 8 13:53:32 PDT 2007


On Jun 8, 2007, at 10:05 AM, Chris Lattner wrote:

> On Fri, 8 Jun 2007, Babak Salamat wrote:
>> I am wondering if there is any way to figure out bitwidth of Machine
>> Instructions. I see that ValueType information is available for nodes
>> of DAG, but I couldn't find similar info for Machine Instructions. I
>> particularly need this information for x86 target.
>> I appreciate your help and comments in this regard.
>
> Do you mean the size of an instruction, or the size of an operand?   
> Given
> a virtual or physical register, you can find the register class,  
> then get
> the MVT::ValueType that the regclass can hold.
>
> -Chris
>

Well, what I am looking for is the size of data that an instruction  
operates on. For example, if there is a mov instruction I need to  
know whether it is movb or movl or any other variant.

-Babak





More information about the llvm-dev mailing list