@@ -15006,6 +15006,69 @@ namespace BinaryNinja {
1500615006 */
1500715007 ExprId Not(size_t size, ExprId a, uint32_t flags = 0, const ILSourceLocation& loc = ILSourceLocation());
1500815008
15009+ /*! Reverse the byte order of expression \c value of size \c size potentially setting flags
15010+
15011+ \param size The size of the result in bytes
15012+ \param a The expression to byte swap
15013+ \param flags Flags to set
15014+ \param loc Optional IL Location this expression was added from.
15015+ \return The expression <tt>bswap.<size>{<flags>}(value)</tt>
15016+ */
15017+ ExprId ByteSwap(size_t size, ExprId a, uint32_t flags = 0, const ILSourceLocation& loc = ILSourceLocation());
15018+
15019+ /*! Count the number of set bits in expression \c value of size \c size potentially setting flags
15020+
15021+ \param size The size of the result in bytes
15022+ \param a The expression to count set bits in
15023+ \param flags Flags to set
15024+ \param loc Optional IL Location this expression was added from.
15025+ \return The expression <tt>popcnt.<size>{<flags>}(value)</tt>
15026+ */
15027+ ExprId PopulationCount(size_t size, ExprId a, uint32_t flags = 0, const ILSourceLocation& loc = ILSourceLocation());
15028+
15029+ /*! Count the number of leading zero bits in expression \c value of size \c size potentially setting flags.
15030+ The result is <tt>8 * size</tt> when \c value is zero.
15031+
15032+ \param size The size of the result in bytes
15033+ \param a The expression to count leading zeros in
15034+ \param flags Flags to set
15035+ \param loc Optional IL Location this expression was added from.
15036+ \return The expression <tt>clz.<size>{<flags>}(value)</tt>
15037+ */
15038+ ExprId CountLeadingZeros(size_t size, ExprId a, uint32_t flags = 0, const ILSourceLocation& loc = ILSourceLocation());
15039+
15040+ /*! Count the number of trailing zero bits in expression \c value of size \c size potentially setting flags.
15041+ The result is <tt>8 * size</tt> when \c value is zero.
15042+
15043+ \param size The size of the result in bytes
15044+ \param a The expression to count trailing zeros in
15045+ \param flags Flags to set
15046+ \param loc Optional IL Location this expression was added from.
15047+ \return The expression <tt>ctz.<size>{<flags>}(value)</tt>
15048+ */
15049+ ExprId CountTrailingZeros(size_t size, ExprId a, uint32_t flags = 0, const ILSourceLocation& loc = ILSourceLocation());
15050+
15051+ /*! Reverse the bit order of expression \c value of size \c size potentially setting flags
15052+
15053+ \param size The size of the result in bytes
15054+ \param a The expression to bit reverse
15055+ \param flags Flags to set
15056+ \param loc Optional IL Location this expression was added from.
15057+ \return The expression <tt>rbit.<size>{<flags>}(value)</tt>
15058+ */
15059+ ExprId ReverseBits(size_t size, ExprId a, uint32_t flags = 0, const ILSourceLocation& loc = ILSourceLocation());
15060+
15061+ /*! Count the number of leading bits that match the sign bit in expression \c value of size \c size,
15062+ not counting the sign bit itself, potentially setting flags
15063+
15064+ \param size The size of the result in bytes
15065+ \param a The expression to count leading sign bits in
15066+ \param flags Flags to set
15067+ \param loc Optional IL Location this expression was added from.
15068+ \return The expression <tt>cls.<size>{<flags>}(value)</tt>
15069+ */
15070+ ExprId CountLeadingSigns(size_t size, ExprId a, uint32_t flags = 0, const ILSourceLocation& loc = ILSourceLocation());
15071+
1500915072 /*! Two's complement sign-extends the expression in \c value to \c size bytes
1501015073
1501115074 \param size The size of the result in bytes
@@ -15886,6 +15949,12 @@ namespace BinaryNinja {
1588615949 size_t size, ExprId left, ExprId right, const ILSourceLocation& loc = ILSourceLocation());
1588715950 ExprId Neg(size_t size, ExprId src, const ILSourceLocation& loc = ILSourceLocation());
1588815951 ExprId Not(size_t size, ExprId src, const ILSourceLocation& loc = ILSourceLocation());
15952+ ExprId ByteSwap(size_t size, ExprId src, const ILSourceLocation& loc = ILSourceLocation());
15953+ ExprId PopulationCount(size_t size, ExprId src, const ILSourceLocation& loc = ILSourceLocation());
15954+ ExprId CountLeadingZeros(size_t size, ExprId src, const ILSourceLocation& loc = ILSourceLocation());
15955+ ExprId CountTrailingZeros(size_t size, ExprId src, const ILSourceLocation& loc = ILSourceLocation());
15956+ ExprId ReverseBits(size_t size, ExprId src, const ILSourceLocation& loc = ILSourceLocation());
15957+ ExprId CountLeadingSigns(size_t size, ExprId src, const ILSourceLocation& loc = ILSourceLocation());
1588915958 ExprId SignExtend(size_t size, ExprId src, const ILSourceLocation& loc = ILSourceLocation());
1589015959 ExprId ZeroExtend(size_t size, ExprId src, const ILSourceLocation& loc = ILSourceLocation());
1589115960 ExprId LowPart(size_t size, ExprId src, const ILSourceLocation& loc = ILSourceLocation());
@@ -16287,6 +16356,12 @@ namespace BinaryNinja {
1628716356 size_t size, ExprId left, ExprId right, const ILSourceLocation& loc = ILSourceLocation());
1628816357 ExprId Neg(size_t size, ExprId src, const ILSourceLocation& loc = ILSourceLocation());
1628916358 ExprId Not(size_t size, ExprId src, const ILSourceLocation& loc = ILSourceLocation());
16359+ ExprId ByteSwap(size_t size, ExprId src, const ILSourceLocation& loc = ILSourceLocation());
16360+ ExprId PopulationCount(size_t size, ExprId src, const ILSourceLocation& loc = ILSourceLocation());
16361+ ExprId CountLeadingZeros(size_t size, ExprId src, const ILSourceLocation& loc = ILSourceLocation());
16362+ ExprId CountTrailingZeros(size_t size, ExprId src, const ILSourceLocation& loc = ILSourceLocation());
16363+ ExprId ReverseBits(size_t size, ExprId src, const ILSourceLocation& loc = ILSourceLocation());
16364+ ExprId CountLeadingSigns(size_t size, ExprId src, const ILSourceLocation& loc = ILSourceLocation());
1629016365 ExprId SignExtend(size_t size, ExprId src, const ILSourceLocation& loc = ILSourceLocation());
1629116366 ExprId ZeroExtend(size_t size, ExprId src, const ILSourceLocation& loc = ILSourceLocation());
1629216367 ExprId LowPart(size_t size, ExprId src, const ILSourceLocation& loc = ILSourceLocation());
0 commit comments