From: Øyvind A. Holm Date: Fri, 25 May 2012 15:18:00 GMT Subject: Re: [PATCH 3/3] xdiff: import new 32-bit version of count_masked_bytes() Message-ID: In-Reply-To: <4FBBF8E9.7020103@lsrfire.ath.cx> On 22 May 2012 22:36, René Scharfe wrote: > Import the latest 32-bit implementation of count_masked_bytes() from > Linux (arch/x86/include/asm/word-at-a-time.h).  It's shorter and avoids > overflows and negative numbers. > > This fixes test failures on 32-bit, where negative partial results had > been shifted right using the "wrong" method (logical shift right instead > of arithmetic short right).  The compiler is free to chose the method, > so it was only wrong in the sense that it didn't work as intended by us. > > Reported-by: Øyvind A. Holm > Signed-off-by: Rene Scharfe > --- > Does this fix all the warnings, and do the tests pass?  I can only > reproduce the "shifting to far to the right" warning.. Hi, I finally got around to test this, and it compiles flawlessly with your three patches. No warnings, and the test suite seems to run without errors. Nice work, sir. Cheers, Øyvind