Hi all

In r215084 I changed tablegen so that binary literals such as 0b01 are now bits values and not integers.

What this means for users of tablegen is that this used to work because it was silently zero extended:

bits<3> x = 0b01;

but now you need to use the correct number of bits everywhere, i.e.,

bits<3> x = 0b001;

I’ve updated tablegen to give a useful error message in this case:

error: Value ‘x’ of type ‘bits<3>’ is incompatible with initializer ‘{ 0, 1 }’ of type bit initializer with length 2’

bits<3> x = 0b01;

^

Thanks,

Pete