rsmith added a comment.

In https://reviews.llvm.org/D33616#768287, @hans wrote:

> From looking in the Intel manual (Table 3-2, in 3.1.1.9 about 
> Bit(BitBase,BitOffset)) it does sound like the bit offset can be negative 
> *shudder*, so I suppose this is necessary and explains why the type is signed 
> in the first place? Hopefully most of these will be inlined into a context 
> where BitPos is constant or unsigned.


OK, but this code will produce the wrong answer in cases where `_BitPos` is 
negative, because signed division rounds towards zero rather than rounding down.


https://reviews.llvm.org/D33616



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to