lkml.org 
[lkml]   [2011]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 13/15] x86: add cmpxchg_flag() variant
On 08/23/2011 12:52 PM, Christoph Lameter wrote:
>
> Should be relatively straightforward if you make the processor flag a
> builtin variable.
>
> i.e. __processor_flag_zero, __processor_flag__gt etc.
>
> Then the inline cmpxchg functions could simply do a
>
> return __processor_flag_zero;
>
> The code generator then needs to realize from the expression that we are
> referring to the zero flag and insert the correct jxx instruction.
>

The right thing is probably to have not the *flags* but the *conditions*
(exposed as variables):

bool __builtin_x86_s, __builtin_x86_ns;
bool __builtin_x86_pe, __builtin_x86_po;
...


Or perhaps even

register bool x86_s asm("s");?

H.J. thoughts/ideas?

-hpa


\
 
 \ /
  Last update: 2011-08-23 23:07    [W:0.139 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site