[llvm-dev] Parsing Operands at TableGen Level

Sky Flyer via llvm-dev llvm-dev at lists.llvm.org
Tue Sep 15 07:15:32 PDT 2015


Hi all,

is it possible in TableGen to set value to instruction bits based on the
operands?
In other words, parsing the instruction at the TableGen level.

for instance:

"add $Rd, $Rn, $imm"

I want to have something like this:

*Inst{8} = ($Rn == Test::A0)  1 : 0;*

Is there any way to do that in TableGen? If not is there any example in the
provided example codes?

Cheers,
ES
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150915/9a6c3c73/attachment-0001.html>


More information about the llvm-dev mailing list