Re: [PATCH] target/arm: Fix signed integer overflow undefined behavior.

2025-02-19 Thread Stephen Longfield
On Wed, Feb 19, 2025 at 7:26 AM Peter Maydell wrote: > On Tue, 18 Feb 2025 at 22:22, Stephen Longfield > wrote: > > > > The problem is internal to t32_expandimm_imm, the imm intermediate > > immediate value. This value is sourced from x, which always comes from > > the return of a deposit32 call

Re: [PATCH] target/arm: Fix signed integer overflow undefined behavior.

2025-02-19 Thread Peter Maydell
On Tue, 18 Feb 2025 at 22:22, Stephen Longfield wrote: > > The problem is internal to t32_expandimm_imm, the imm intermediate > immediate value. This value is sourced from x, which always comes from > the return of a deposit32 call, which returns uint32_t already. > > It's extracted via: int imm =

[PATCH] target/arm: Fix signed integer overflow undefined behavior.

2025-02-18 Thread Stephen Longfield
The problem is internal to t32_expandimm_imm, the imm intermediate immediate value. This value is sourced from x, which always comes from the return of a deposit32 call, which returns uint32_t already. It's extracted via: int imm = extract32(x, 0, 8);, so the value will be between 0-255 It is the