math: improve how bitwise ANDs are handled
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 15 Jul 2013 06:38:38 +0000 (09:38 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 15 Jul 2013 06:38:38 +0000 (09:38 +0300)
commite4251a39fb409ff9c0e03b04e51acd60f38a92fc
tree50db7601450137fca42e514df5cb93a5677c23aa
parent3fb8f3522fa3c6a2a2eca4e45e08c86fbda6ed2f
math: improve how bitwise ANDs are handled

Before it just calculated the the 0-max from both sides and took the
intersection.  In the new way, we take zero, and the min with one bit set
up to the max for both sides and find the intersection.

So before if we had 0xff00 then we took "0-0xff00" but now we do
"0,0x0100-0xff00"  It's still not very accurate really but it's an
improvement.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_math.c
validation/sm_bitwise1.c [new file with mode: 0644]