Add some new IROps to support improved Memcheck analysis of strlen etc.
commit4271989815b5fc933c1e29bc75507c2726dc3738
authorJulian Seward <jseward@acm.org>
Tue, 20 Nov 2018 09:52:33 +0000 (20 10:52 +0100)
committerJulian Seward <jseward@acm.org>
Tue, 20 Nov 2018 09:52:33 +0000 (20 10:52 +0100)
treea043775f94c961e9084e552d3f38fcbd324b6924
parent7f1dd9d5aec1f1fd4eb0ae3a311358a914f1d73f
Add some new IROps to support improved Memcheck analysis of strlen etc.

This is part of the fix for bug 386945.  It adds the following IROps, plus
their supporting type- and printing- fragments:

Iop_Reverse8sIn32_x1: 32-bit byteswap.  A fancy name, but it is consistent
with naming for the other swapping IROps that already exist.

Iop_PopCount64, Iop_PopCount32: population count

Iop_ClzNat64, Iop_ClzNat32, Iop_CtzNat64, Iop_CtzNat32: counting leading and
trailing zeroes, with "natural" (Nat) semantics for a zero input, meaning, in
the case of zero input, return the number of bits in the word.  These
functionally overlap with the existing Iop_Clz64, Iop_Clz32, Iop_Ctz64,
Iop_Ctz32.  The existing operations are undefined in case of a zero input.
Adding these new variants avoids the complexity of having to change the
declared semantics of the existing operations.  Instead they are deprecated
but still available for use.
VEX/priv/ir_defs.c
VEX/pub/libvex_ir.h