aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2024-12-10 14:45:44 -0600
committerRichard Henderson <richard.henderson@linaro.org>2025-06-30 07:42:37 -0600
commit9d80b3c89022279865220c23a1246a4e12786f27 (patch)
treea4ef991d5be20ce72d72cdb9f8e05afe07f6cf79
parente6e3733bf19eacec7bcaf6343619237f84ff840a (diff)
downloadqemu-9d80b3c89022279865220c23a1246a4e12786f27.zip
qemu-9d80b3c89022279865220c23a1246a4e12786f27.tar.gz
qemu-9d80b3c89022279865220c23a1246a4e12786f27.tar.bz2
tcg/optimize: Build and use o_bits in fold_deposit
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-rw-r--r--tcg/optimize.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tcg/optimize.c b/tcg/optimize.c
index c9c53f7..043568a 100644
--- a/tcg/optimize.c
+++ b/tcg/optimize.c
@@ -1847,7 +1847,7 @@ static bool fold_deposit(OptContext *ctx, TCGOp *op)
int ofs = op->args[3];
int len = op->args[4];
int width = 8 * tcg_type_size(ctx->type);
- uint64_t z_mask, s_mask;
+ uint64_t z_mask, o_mask, s_mask;
if (ti_is_const(t1) && ti_is_const(t2)) {
return tcg_opt_gen_movi(ctx, op, op->args[0],
@@ -1882,7 +1882,9 @@ static bool fold_deposit(OptContext *ctx, TCGOp *op)
}
z_mask = deposit64(t1->z_mask, ofs, len, t2->z_mask);
- return fold_masks_zs(ctx, op, z_mask, s_mask);
+ o_mask = deposit64(t1->o_mask, ofs, len, t2->o_mask);
+
+ return fold_masks_zos(ctx, op, z_mask, o_mask, s_mask);
}
static bool fold_divide(OptContext *ctx, TCGOp *op)