19/11/2017 23:16, Aleksey Baulin:
> A warning is issued when using an argument to likely() or unlikely()
> builtins which is evaluated to a pointer value, as __builtin_expect()
> expects a 'long int' type for its first argument. With this fix
> a pointer value is converted to an integer with the va
On Sun, 14 Jan 2018 01:45:42 +0300
Aleksey Baulin wrote:
> Please see my comments inline.
>
> On Sun, Jan 14, 2018 at 1:24 AM, Thomas Monjalon
> wrote:
>
> > Hi,
> >
> > I moved your top-post below and did some comments inline.
> > More opinions are welcome.
> >
> > 13/01/2018 23:05, Aleksey B
Please see my comments inline.
On Sun, Jan 14, 2018 at 1:24 AM, Thomas Monjalon
wrote:
> Hi,
>
> I moved your top-post below and did some comments inline.
> More opinions are welcome.
>
> 13/01/2018 23:05, Aleksey Baulin:
> > On Fri, Jan 12, 2018 at 6:35 PM, Thomas Monjalon
> > wrote:
> > > 21/
Hi,
I moved your top-post below and did some comments inline.
More opinions are welcome.
13/01/2018 23:05, Aleksey Baulin:
> On Fri, Jan 12, 2018 at 6:35 PM, Thomas Monjalon
> wrote:
> > 21/11/2017 08:05, Aleksey Baulin:
> > > On Mon, Nov 20, 2017 at 4:36 PM, Wiles, Keith
> > wrote:
> > > > > O
This is an interesting question. Perhaps, even a philosophical one. :-)
'likely(pointer)' is a perfectly legal statement in C language, as well as
a concise one as
compared to a more explicit (and redundant/superfluous) 'likely(pointer !=
NULL)'. If you
_require_ this kind of explicitness in cases
21/11/2017 08:05, Aleksey Baulin:
> On Mon, Nov 20, 2017 at 4:36 PM, Wiles, Keith wrote:
> > > On Nov 19, 2017, at 4:16 PM, Aleksey Baulin
> > wrote:
> > > -#define unlikely(x) __builtin_expect((x),0)
> > > +#define unlikely(x) __builtin_expect(!!(x), 0)
> >
> > I have not looked at the generat
Sorry for late response. Jim had given the correct answer already.
You won't get an extra instruction with compiler optimization turned on.
Aleksey.
On Mon, Nov 20, 2017 at 4:36 PM, Wiles, Keith wrote:
>
>
> > On Nov 19, 2017, at 4:16 PM, Aleksey Baulin
> wrote:
> >
> > A warning is issued whe
> On Nov 20, 2017, at 7:36 AM, Wiles, Keith wrote:
>
>> On Nov 19, 2017, at 4:16 PM, Aleksey Baulin wrote:
>>
>> #ifndef unlikely
>> -#define unlikely(x) __builtin_expect((x),0)
>> +#define unlikely(x) __builtin_expect(!!(x), 0)
>
> I have not looked at the generated code, but does this add
> On Nov 19, 2017, at 4:16 PM, Aleksey Baulin wrote:
>
> A warning is issued when using an argument to likely() or unlikely()
> builtins which is evaluated to a pointer value, as __builtin_expect()
> expects a 'long int' type for its first argument. With this fix
> a pointer value is converted
A warning is issued when using an argument to likely() or unlikely()
builtins which is evaluated to a pointer value, as __builtin_expect()
expects a 'long int' type for its first argument. With this fix
a pointer value is converted to an integer with the value of 0 or 1.
Signed-off-by: Aleksey Bau
10 matches
Mail list logo