lkml.org 
[lkml]   [2009]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: "eliminate warn_on_slowpath()" change causes many gcc-3.2.3 warnings
Linus Torvalds wrote:
>
> Don't do this. That just forces a load off a complex pointer instead, with
> no upsides. At least if it was
>
> extern const char warn_slowpath_nofmt[];
>
> it would only load the pointer itself, which is still a fairly expensive
> op, but at least doesn't require the extra memory load.
>
> But you'd be better off jusst making it something like
>
> #define NO_FMT ((const char *)(-1))
>
> instead, which is really much more obvious, and doesn't need any of that
> "get a pointer" overhead.
>

At least on x86, the two ops should be the same cost?

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.



\
 
 \ /
  Last update: 2009-01-18 00:47    [W:0.066 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site