On Tue, Jun 20, 2017 at 10:48:22AM -0700, Richard Henderson wrote: > On 06/20/2017 09:09 AM, Edgar E. Iglesias wrote: > >+ int width = imm_w - imm_s + 1; > >+ > >+ if (width == 0 || imm_w <= imm_s) { > > The width == 0 check is redundant; the imm_w <= imm_s check is wrong. It > should be <. > > If imm_w >= imm_s, as per the proper check, then width must be >= 1.
Right, will fix for v2. Thanks! Edgar