Re: [PATCH 1/2] tcg: avoid integer overflow

2020-03-16 Thread Peter Maydell
On Mon, 16 Mar 2020 at 13:15, Yifei Jiang wrote: > > This fixes coverity issues 75234842, etc.,: Where does this issue number come from, by the way? It's not from the online Coverity Scan we use which is the issue ID we usually cite for coverity stuff. > 2221tcg_gen_andi_i64(t, t, dup_co

[PATCH 1/2] tcg: avoid integer overflow

2020-03-16 Thread Yifei Jiang
This fixes coverity issues 75234842, etc.,: 2221tcg_gen_andi_i64(t, t, dup_const(vece, 1)); CID 75234842: (OVERFLOW_BEFORE_WIDEN) . overflow_before_widen: Potentially overflowing expression "1 << nbit" with type "int" (32 bits, signed) is evaluated using 32-bit arithmetic, and the