[PATCH][TableGen] Allow shift operators to take bits<n>

Adam Nemet anemet at apple.com
Wed Jul 16 17:51:42 PDT 2014


Convert the operand to int if possible, i.e. if the value is properly
initialized.  (I suppose there is further room for improvement here to also
perform the shift if the uninitialized bits are shifted out.)

With this little change we can now compute the scaling factor for compressed
displacement with pure tablegen code in the X86 backend.  This is useful
because both the X86-disassembler-specific part of tablegen and the assembler
need this and TD is the natural sharing place.

The patch also adds the missing documentation for the shift and add operator.

Does this look good?

Thanks,
Adam

-------------- next part --------------
A non-text attachment was scrubbed...
Name: TableGen-Allow-shift-operators-to-take-bits-n.patch
Type: application/octet-stream
Size: 1768 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140716/5e9079be/attachment.obj>


More information about the llvm-commits mailing list