git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/3] xdiff: import new 32-bit version of count_masked_bytes()

From
Øyvind A. Holm <sunny@sunbase.org>
Date
May 25, 2012, 15:18 UTC
Message-ID
<CAA787rkRZudv96wJ4WPFWt7k0Y628dvhxrPes1g6rbw8C_Kiog@mail.gmail.com>
In-Reply-To
<4FBBF8E9.7020103@lsrfire.ath.cx>
On 22 May 2012 22:36, René Scharfe <rene.scharfe@lsrfire.ath.cx> wrote:
Show 14 quoted lines
> 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 <sunny@sunbase.org>
> Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
> ---
> 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

Previous: René Scharfe
Message 11 of 11 in “tr/xdiff-fast-hash generates warnings and breaks tests”
  1. Øyvind A. HolmMay 16, 2012
  2. René ScharfeMay 17, 2012
  3. Øyvind A. HolmMay 17, 2012
  4. Junio C HamanoMay 17, 2012
  5. René ScharfeMay 17, 2012
  6. Øyvind A. HolmMay 19, 2012
  7. 1/3 xdiff: avoid compiler warnings with XDL_FAST_HASH on 32-bit machinesRené Scharfe, May 22, 2012
  8. 2/3 xdiff: avoid more compiler warnings with XDL_FAST_HASH on 32-bit machinesRené Scharfe, May 22, 2012
  9. Thomas RastMay 23, 2012
  10. 3/3 xdiff: import new 32-bit version of count_masked_bytes()René Scharfe, May 22, 2012
  11. Øyvind A. HolmMay 25, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.