* New VEX API function LibVEX_set_VexControl
+* The deprecated IROps: Iop_Clz32/64 and Iop_Ctz32/64 have been removed
+
* ================== PLATFORM CHANGES =================
* ==================== TOOL CHANGES ===================
506930 valgrind allows SIGKILL being reset to SIG_DFL
506967 Implement and override mallinfo2
506970 mmap needs an EBADF fd_allowed check
+507033 Remove deprecated Iop_Clz32/64 and Iop_Ctz32/64
507173 s390x: Crash when constant folding is disabled
507720 Review syscalls returning file descriptors (other platforms)
507721 Wire up illumos and Solaris mallinfo
case Iop_MullU32: vex_printf("MullU32"); return;
case Iop_MullU64: vex_printf("MullU64"); return;
- case Iop_Clz64: vex_printf("Clz64"); return;
- case Iop_Clz32: vex_printf("Clz32"); return;
- case Iop_Ctz64: vex_printf("Ctz64"); return;
- case Iop_Ctz32: vex_printf("Ctz32"); return;
-
case Iop_ClzNat64: vex_printf("ClzNat64"); return;
case Iop_ClzNat32: vex_printf("ClzNat32"); return;
case Iop_CtzNat64: vex_printf("CtzNat64"); return;
case Iop_ExpCmpNE16: case Iop_ExpCmpNE32: case Iop_ExpCmpNE64:
case Iop_MullS8: case Iop_MullS16: case Iop_MullS32: case Iop_MullS64:
case Iop_MullU8: case Iop_MullU16: case Iop_MullU32: case Iop_MullU64:
- case Iop_Clz64: case Iop_Clz32: case Iop_Ctz64: case Iop_Ctz32:
case Iop_ClzNat64: case Iop_ClzNat32: case Iop_CtzNat64: case Iop_CtzNat32:
case Iop_PopCount64: case Iop_PopCount32:
case Iop_CmpLT32S: case Iop_CmpLT64S: case Iop_CmpLE32S: case Iop_CmpLE64S:
case Iop_MullU64: case Iop_MullS64:
BINARY(Ity_I64,Ity_I64, Ity_I128);
- case Iop_Clz32: case Iop_Ctz32:
case Iop_ClzNat32: case Iop_CtzNat32:
case Iop_PopCount32:
UNARY(Ity_I32, Ity_I32);
- case Iop_Clz64: case Iop_Ctz64:
case Iop_ClzNat64: case Iop_CtzNat64:
case Iop_PopCount64:
UNARY(Ity_I64, Ity_I64);
}
}
-/* Helpers for folding Clz32/64. */
-static UInt fold_Clz64 ( ULong value )
-{
- UInt i;
- vassert(value != 0ULL); /* no defined semantics for arg==0 */
- for (i = 0; i < 64; ++i) {
- if (0ULL != (value & (((ULong)1) << (63 - i)))) return i;
- }
- vassert(0);
- /*NOTREACHED*/
- return 0;
-}
-
-static UInt fold_Clz32 ( UInt value )
-{
- UInt i;
- vassert(value != 0); /* no defined semantics for arg==0 */
- for (i = 0; i < 32; ++i) {
- if (0 != (value & (((UInt)1) << (31 - i)))) return i;
- }
- vassert(0);
- /*NOTREACHED*/
- return 0;
-}
-
/* Helpers for folding ClzNat32/64. */
static UInt fold_ClzNat64 ( ULong value )
{
break;
}
- case Iop_Clz32: {
- UInt u32 = e->Iex.Unop.arg->Iex.Const.con->Ico.U32;
- if (u32 != 0)
- e2 = IRExpr_Const(IRConst_U32(fold_Clz32(u32)));
- break;
- }
- case Iop_Clz64: {
- ULong u64 = e->Iex.Unop.arg->Iex.Const.con->Ico.U64;
- if (u64 != 0ULL)
- e2 = IRExpr_Const(IRConst_U64(fold_Clz64(u64)));
- break;
- }
-
case Iop_ClzNat32: {
UInt u32 = e->Iex.Unop.arg->Iex.Const.con->Ico.U32;
e2 = IRExpr_Const(IRConst_U32(fold_ClzNat32(u32)));
Iop_MullU8, Iop_MullU16, Iop_MullU32, Iop_MullU64,
/* Counting bits */
- /* Ctz64/Ctz32/Clz64/Clz32 are UNDEFINED when given arguments of zero.
- You must ensure they are never given a zero argument. As of
- 2018-Nov-14 they are deprecated. Try to use the Nat variants
- immediately below, if you can.
- */
- Iop_Clz64, Iop_Clz32, /* count leading zeroes */
- Iop_Ctz64, Iop_Ctz32, /* count trailing zeros */
/* Count leading/trailing zeroes, with "natural" semantics for the
case where the input is zero: then the result is the number of bits
in the word. */
case Iop_2xm1F64:
return mkPCastTo(mce, Ity_I64, vatom);
- case Iop_Clz32:
- case Iop_Ctz32:
- return mkPCastTo(mce, Ity_I32, vatom);
-
case Iop_32Sto64:
case Iop_32Uto64:
case Iop_V128to64:
tl_assert(sameKindedAtoms(atom,vatom));
switch (czop) {
- case Iop_Ctz32: case Iop_CtzNat32:
+ case Iop_CtzNat32:
ty = Ity_I32;
xorOp = Iop_Xor32;
subOp = Iop_Sub32;
andOp = Iop_And32;
one = mkU32(1);
break;
- case Iop_Ctz64: case Iop_CtzNat64:
+ case Iop_CtzNat64:
ty = Ity_I64;
xorOp = Iop_Xor64;
subOp = Iop_Sub64;
tl_assert(sameKindedAtoms(atom,vatom));
switch (czop) {
- case Iop_Clz32: case Iop_ClzNat32:
+ case Iop_ClzNat32:
ty = Ity_I32;
shrOp = Iop_Shr32;
notOp = Iop_Not32;
andOp = Iop_And32;
mkRight = mkRight32;
break;
- case Iop_Clz64: case Iop_ClzNat64:
+ case Iop_ClzNat64:
ty = Ity_I64;
shrOp = Iop_Shr64;
notOp = Iop_Not64;
case Iop_NegF16:
return mkPCastTo(mce, Ity_I16, vatom);
- case Iop_Ctz32: case Iop_CtzNat32:
- case Iop_Ctz64: case Iop_CtzNat64:
+ case Iop_CtzNat32:
+ case Iop_CtzNat64:
return expensiveCountTrailingZeroes(mce, op, atom, vatom);
- case Iop_Clz32: case Iop_ClzNat32:
- case Iop_Clz64: case Iop_ClzNat64:
+ case Iop_ClzNat32:
+ case Iop_ClzNat64:
return expensiveCountLeadingZeroes(mce, op, atom, vatom);
// PopCount32: this is slightly pessimistic. It is true that the
{ DEFOP(Iop_MullU16, UNDEF_LEFT), .s390x = 1, .amd64 = 1, .x86 = 1, .arm = 0, .ppc64 = 0, .ppc32 = 0, .mips32 =0, .mips64 = 0 },
{ DEFOP(Iop_MullU32, UNDEF_LEFT), .s390x = 1, .amd64 = 1, .x86 = 1, .arm = 1, .ppc64 = 1, .ppc32 = 1, .mips32 =0, .mips64 = 1 }, // mips asserts
{ DEFOP(Iop_MullU64, UNDEF_LEFT), .s390x = 1, .amd64 = 1, .x86 = 0, .arm = 0, .ppc64 = 1, .ppc32 = 0, .mips32 =0, .mips64 = 1 }, // ppc32, mips assert
- { DEFOP(Iop_Clz64, UNDEF_ALL), .s390x = 0, .amd64 = 0, .x86 = 0, .arm = 0, .ppc64 = 1, .ppc32 = 0, .mips32 =0, .mips64 = 0 }, // ppc32 asserts
- { DEFOP(Iop_Clz32, UNDEF_ALL), .s390x = 0, .amd64 = 0, .x86 = 0, .arm = 0, .ppc64 = 1, .ppc32 = 1, .mips32 =0, .mips64 = 0 },
- { DEFOP(Iop_Ctz64, UNDEF_ALL), .s390x = 0, .amd64 = 0, .x86 = 0, .arm = 0, .ppc64 = 0, .ppc32 = 0, .mips32 =0, .mips64 = 0 },
- { DEFOP(Iop_Ctz32, UNDEF_ALL), .s390x = 0, .amd64 = 0, .x86 = 0, .arm = 0, .ppc64 = 0, .ppc32 = 0, .mips32 =0, .mips64 = 0 },
{ DEFOP(Iop_ClzNat64, UNDEF_ALL), .s390x = 1, .amd64 = 1, .x86 = 0, .arm = 0, .ppc64 = 1, .ppc32 = 0, .mips32 =0, .mips64 = 1 }, // ppc32 asserts
{ DEFOP(Iop_ClzNat32, UNDEF_ALL), .s390x = 0, .amd64 = 0, .x86 = 1, .arm = 1, .ppc64 = 1, .ppc32 = 1, .mips32 =1, .mips64 = 1 },
{ DEFOP(Iop_CtzNat64, UNDEF_ALL), .s390x = 0, .amd64 = 1, .x86 = 0, .arm = 0, .ppc64 = 1, .ppc32 = 0, .mips32 =0, .mips64 = 0 },
{ OPNAME(Left32), Ity_I32, 1, Ity_I32 },
{ OPNAME(Left64), Ity_I64, 1, Ity_I64 },
-// { OPNAME(Clz32), Ity_I32, 1, Ity_I32 }, // deprecated, undefined behaviour
-// { OPNAME(Clz64), Ity_I64, 1, Ity_I64 }, // deprecated, undefined behaviour
-
-// { OPNAME(Ctz32), Ity_I32, 1, Ity_I32 }, // deprecated, undefined behaviour
-// { OPNAME(Ctz64), Ity_I64, 1, Ity_I64 }, // deprecated, undefined behaviour
-
{ OPNAME(ClzNat32), Ity_I32, 1, Ity_I32, ONLY2(ppc, x86) },
{ OPNAME(ClzNat64), Ity_I64, 1, Ity_I64, EXCEPT2(ppc32, x86) },