lkml.org 
[lkml]   [2016]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [RFC PATCH] x86/hweight: Get rid of the special calling convention
    From
    Date
    On 05/04/2016 12:31 PM, Brian Gerst wrote:
    >>
    >> - asm (ALTERNATIVE("call __sw_hweight32", POPCNT32, X86_FEATURE_POPCNT)
    >> - : "="REG_OUT (res)
    >> - : REG_IN (w));
    >> + if (likely(static_cpu_has(X86_FEATURE_POPCNT))) {
    >> + asm volatile("popcnt %[w], %[res]" : [res] "=r" (res) : [w] "r" (w));
    >
    > Do all supported versions of the assembler know of the popcnt
    > instruction? That's why is was open coded before. The problem is
    > Intel and AMD are constantly adding new instructions and it's a long
    > cycle for the user's assembler to get updated.
    >

    Most likely not. It would be nice to have some more uniform solution to
    that. I'm wondering if we could use the -Wa option to load some kind of
    macro package.

    -hpa


    \
     
     \ /
      Last update: 2016-05-04 21:41    [W:2.760 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site