[LLVMdev] Tablegen binary literals

Sean Silva chisophugis at gmail.com
Thu Jul 31 11:27:11 PDT 2014


On Thu, Jul 31, 2014 at 12:31 AM, Tim Northover <t.p.northover at gmail.com>
wrote:

> > Yeah, exactly those 2 things.  I have them in separate patches, but I
> think
> > we only get the benefit from sized binary literals if we also allow them
> to
> > initialize multiple bits in another bits<n> type.
>
> It also allows type checking for single initializers. I've been caught
> out a couple of times when I thought I'd given 17 digits in "let
> Inst{16-0} = 0b1001000111011010" or similar.
>

Allowing underscores in the literal seems like it would help alleviate this
somewhat (do we already allow that?). That is what VHDL does ("Underlines
can be used to increase readability and have no impact on the value.").

-- Sean Silva


>
> Cheers.
>
> Tim.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140731/ff3aab2f/attachment.html>


More information about the llvm-dev mailing list