[llvm-dev] Getting bit numbers in TableGen interfaces. (original) (raw)

Ivan Kulagin via llvm-dev llvm-dev at lists.llvm.org
Mon May 18 09:32:36 PDT 2020


Hi,

I have the following code in TableGen language:

bits<32> insn;
bits<4> CRm = {0, 0, 1, 1};
let insn{11-8} = CRm;

Is there a way to get the bit numbers (in this case 11-8, to which a list of constant bits (CRm) is assigned) using Record interfaces? When I iterate bits of insn, it doesn’t contain the VarBitInit of CRm, because insn consists of the BinInit objects.

Thanks, Ivan



More information about the llvm-dev mailing list