lkml.org 
[lkml]   [2009]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 0/4] amd64_edac: misc fixes
From
On Mon, Jun 1, 2009 at 10:02 AM, H. Peter Anvin <hpa@zytor.com> wrote:
> H. Peter Anvin wrote:
>>
>> Yes, we would have to do something like that.
>>
>> However, if you're doing that you shouldn't use typeof() there...
>> instead this should be turned into an inline function with explicit
>> 64-bit types.
>>
>> It would be good if we could get Kbuild to export some kind of macro
>> that we can use to test binutils version, so we can do something like:
>>
>> #if BINUTILS_VERSION >= KERNEL_VERSION(2,18,50)
>> /* Do the right thing */
>> #else
>> /* Do the wrong thing */
>> #endif
>>
>
> The other option, and perhaps a better option, is to key it on the
> version of gcc; then we can use the gcc intrinsics __builtin_popcount(),
> __builtin_popcountl() and __builtin_popcountll(), which should produce
> better code since gcc can schedule them appropriately.
>
> Probably also means passing -msse4.2 to gcc while hoping that that
> doesn't enable any #TS-generating instructions (SSE 4.2 is mostly a
> collection of integer instructions).
>
> (H.J., any comments?)
>

I don't think -msse4.2 will generate any SSE instructions unless you
turn on the vectorizer.


--
H.J.


\
 
 \ /
  Last update: 2009-06-01 19:33    [W:0.065 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site