]> git.proxmox.com Git - mirror_qemu.git/blame - scripts/coccinelle/simplify_muldiv64.cocci
exec.c: get nodes_nb_alloc with one MAX calculation
[mirror_qemu.git] / scripts / coccinelle / simplify_muldiv64.cocci
CommitLineData
e9d51507
LV
1// replace muldiv64(i32, i32, x) by (uint64_t)i32 * i32 / x
2@@
3typedef uint32_t;
4typedef int32_t;
5{ uint32_t, int32_t, int, unsigned int } a, b;
6typedef uint64_t;
7expression c;
8@@
9
10-muldiv64(a,b,c)
11+(uint64_t) a * b / c