[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Simple contribution please?
From: |
Richard Braun |
Subject: |
Re: Simple contribution please? |
Date: |
Wed, 17 Aug 2016 10:43:46 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Wed, Aug 17, 2016 at 08:46:34AM +0200, Samuel Thibault wrote:
> - Are we sure that the direction flag is cleared on entry of the assembly
> snippets?
Yes, gcc makes sure it's cleared on entry. See [1] for reference.
> - I don't think the memcmp, strlen and strcmp snippets need a memory clobber?
I'm not sure. Nothing here tells the compiler that the memory
referenced is read and I don't know what kind of side effects this
could introduce. After a bit of research, I found this message [2]
which seems to support this thinking.
> - should we really use assembly snippets for strcpy and strcmp? In my
> non-virtualized tests, a simple C loop such as
> do { test = *dest++ = *src++; } while(test);
> actually goes quite faster thanks to the gcc optimizer, and the
> non-rep snippet won't buy virtualized time (and I guess we don't run
> str functions on memory-mapped devices anyway...)
Actually, assembly isn't used for these functions. Take a look at the
ARCH_STRING_XXX macros at the beginning of the file. These are used in
X15 to select between machine specific and generic versions, which we
could also use later.
--
Richard Braun
[1] https://gcc.gnu.org/ml/gcc/2008-03/msg00330.html
[2] https://lkml.org/lkml/2011/8/11/356
- Simple contribution please?, Samuel Thibault, 2016/08/12
- Re: Simple contribution please?, Richard Braun, 2016/08/12
- Re: Simple contribution please?, Richard Braun, 2016/08/12
- Re: Simple contribution please?, Samuel Thibault, 2016/08/12
- Re: Simple contribution please?, Richard Braun, 2016/08/12
- Re: Simple contribution please?, Samuel Thibault, 2016/08/17
- Re: Simple contribution please?, Samuel Thibault, 2016/08/17
- Re: Simple contribution please?, Richard Braun, 2016/08/17
- Re: Simple contribution please?, Samuel Thibault, 2016/08/17
- Re: Simple contribution please?,
Richard Braun <=
- Re: Simple contribution please?, Samuel Thibault, 2016/08/17
- Re: Simple contribution please?, Richard Braun, 2016/08/17
- Re: Simple contribution please?, Samuel Thibault, 2016/08/17