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

Re: [PATCH v6 2/2] refs.c: SSE4.2 optimizations for check_refname_component

From
Duy Nguyen <pclouds@gmail.com>
Date
Jun 4, 2014, 11:21 UTC
Message-ID
<CACsJy8CK3LNaPVNv=EfFX06uOgpujAz364ZDFL3HBPicDNF57w@mail.gmail.com>
In-Reply-To
<538ED2F1.9030003@web.de>
On Wed, Jun 4, 2014 at 3:04 PM, Torsten Bögershausen <tboegi@web.de> wrote:
Show 23 quoted lines
>
> On 2014-06-04 05.38, David Turner wrote:
> []
>> []
>> diff --git a/Makefile b/Makefile
>> index a53f3a8..dd2127a 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -1326,6 +1326,11 @@ else
>>               COMPAT_OBJS += compat/win32mmap.o
>>       endif
>>  endif
>> +ifdef NO_SSE42
>> +     BASIC_CFLAGS += -DNO_SSE42
>> +else
>> +     BASIC_CFLAGS += -msse4.2
>> +endif
> This does work for some people, but break for others, like the systems in my test-lab.
> On 2 different systems the gcc has support for -msse4.2, but the processor has not,
> and t5511 fails with "Illegal instruction".
> How can that be?
> The maintainer of a Linux distro wants to ship gcc with all possible features,
> an the end-user can compile the code with all the features his very processor has.

I think glibc code uses cpuid instruction to decide whether to use optimized version. May be we can do the same? If we go that route and have a way to detect sse support from compiler, then we can drop NO_SSE42, enable all and pick one at runtime.

-- 
Duy
Previous: Torsten BögershausenNext: Torsten Bögershausen
Message 4 of 14 in “refs.c: optimize check_refname_component()”
  1. 1/2 refs.c: optimize check_refname_component()David Turner, Jun 4, 2014
  2. 2/2 refs.c: SSE4.2 optimizations for check_refname_componentDavid Turner, Jun 4, 2014
  3. Torsten BögershausenJun 4, 2014
  4. Duy NguyenJun 4, 2014
  5. Torsten BögershausenJun 4, 2014
  6. David TurnerJun 4, 2014
  7. Torsten BögershausenJun 5, 2014
  8. Ondřej BílkaJun 5, 2014
  9. David TurnerJun 5, 2014
  10. Torsten BögershausenJun 5, 2014
  11. David TurnerJun 5, 2014
  12. David TurnerJun 4, 2014
  13. Junio C HamanoJun 4, 2014
  14. David TurnerJun 5, 2014

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.