]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
ir_opt.c: Fix mkZeroOfPrimopResultType
authorFlorian Krohm <flo2030@eich-krohm.de>
Thu, 4 Sep 2025 13:01:52 +0000 (13:01 +0000)
committerFlorian Krohm <flo2030@eich-krohm.de>
Thu, 4 Sep 2025 13:01:52 +0000 (13:01 +0000)
In c93dba5adbd5d I forgot to adjust mkZeroOfPrimopResultType.

This function needs to go. See also 7270e04ab8eb7.

I should be able to query IROp properties easily and for all IRops.
E.g. instead of calling mkZeroOfPrimopResultType I want this:

mkZero(irop->result_type)

VEX/priv/ir_opt.c

index 1e4ba670e310a41127f0690f5e34cbd6c97dc130..9ed002ea423d4d5749ee29a79f01fa010c1b66d7 100644 (file)
@@ -1243,7 +1243,9 @@ static Bool notBool ( Bool b )
 static IRExpr* mkZeroOfPrimopResultType ( IROp op )
 {
    switch (op) {
+      case Iop_Sub8:
       case Iop_Xor8:  return IRExpr_Const(IRConst_U8(0));
+      case Iop_Sub16:
       case Iop_Xor16: return IRExpr_Const(IRConst_U16(0));
       case Iop_Sub32:
       case Iop_Xor32: return IRExpr_Const(IRConst_U32(0));