[LLVMdev] encoding scaled values

Steve King steve at metrokings.com
Thu Sep 25 11:16:21 PDT 2014


Hello LLVM,
I have a value that is encoded as that value shifted right by 2.  I
can see two ways to do this.
First way using the tblgen definition for this instruction, something like this:

bits<10> Value;
Inst{7-0} = Value{9-2};  // 2-bit effective downshift

Second way with custom EncoderMethod and DecoderMethods specified on
the operand.

Which way is best?

Thanks,
-steve



More information about the llvm-dev mailing list