[LLVMdev] A question about instruction operands.

Evan Cheng evan.cheng at apple.com
Wed Sep 24 10:24:50 PDT 2008


BTW, please use the operand constraint syntax instead of the  
deprecated isTwoAddress syntax:

let Constraints = "$src1 = $dst" in

Evan

On Sep 23, 2008, at 5:33 AM, Richard Osborne wrote:

> sanjiv gupta wrote:
>> I have a question:
>> In the pattern below from X86
>>
>> def INC8r  : I<0xFE, MRM0r, (outs GR8 :$dst), (ins GR8 :$src),
>> 			"inc{b}\tdst",
>> 		  [(set GR8:$dst, (add GR8:$src, 1))]>;
>>
>> Since we are emitting only "inc $dst",
>> What makes sure that the $src and $dst are same register?
>>
>> - Sanjiv
> It's enclosed inside :
>
> let isTwoAddress = 1 in {
> ...
> }
>
> (you'll need to scroll up a fair amount to find this).
>
> Richard
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list