lkml.org 
[lkml]   [2010]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: x86: A fast way to check capabilities of the current cpu
    On 12/15/2010 01:30 PM, Miguel Ojeda wrote:
    >
    > In this case it this_cpu_*_test_bit() return an int, but they act as a
    > bool and are used in if()s; where is the catch?
    >

    If they aren't, and are stored in a variable for whatever reason, then
    the || form will generate additional instructions to booleanize the
    value for no good reason.

    -hpa


    \
     
     \ /
      Last update: 2010-12-15 22:43    [W:3.895 / U:0.176 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site