diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2021-11-09 23:17:59 +0100 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2021-11-11 11:47:01 +0100 |
commit | 225bec0c0e42b5b0be3007fd01de6e082a8ee9bf (patch) | |
tree | 182b02538308d2e80acefe10eeebad4a13d4c7a3 /tcg | |
parent | 1b9fc6d8ba6667ceb56a3392e84656dcaed0d676 (diff) |
tcg/optimize: Add an extra cast to fold_extract2
There is no bug, but silence a warning about computation
in int32_t being assigned to a uint64_t.
Reported-by: Coverity CID 1465220
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg')
-rw-r--r-- | tcg/optimize.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tcg/optimize.c b/tcg/optimize.c index dbb2d46e88..2397f2cf93 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -1365,7 +1365,7 @@ static bool fold_extract2(OptContext *ctx, TCGOp *op) v2 <<= 64 - shr; } else { v1 = (uint32_t)v1 >> shr; - v2 = (int32_t)v2 << (32 - shr); + v2 = (uint64_t)((int32_t)v2 << (32 - shr)); } return tcg_opt_gen_movi(ctx, op, op->args[0], v1 | v2); } |