scripts: add muldiv64() checking coccinelle scripts

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
Laurent Vivier 2016-05-09 15:24:55 +02:00 committed by Michael Tokarev
parent 96165b9eb4
commit e9d5150739
4 changed files with 46 additions and 0 deletions

View file

@ -0,0 +1,11 @@
// replace muldiv64(i32, i32, x) by (uint64_t)i32 * i32 / x
@@
typedef uint32_t;
typedef int32_t;
{ uint32_t, int32_t, int, unsigned int } a, b;
typedef uint64_t;
expression c;
@@
-muldiv64(a,b,c)
+(uint64_t) a * b / c