lkml.org 
[lkml]   [2010]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [thisops uV2 09/10] x86: this_cpu_cmpxchg and this_cpu_cmpxchg_double operations
From
Date
Le vendredi 26 novembre 2010 à 15:09 -0600, Christoph Lameter a écrit :
...

> +# Emulate 'cmpxchg16b %gs:(%rsi)' except we return the result in
> +# al not via the ZF. Caller will access al to get result.
> +#
> +cmpxchg16b_local_emu:
> + pushf
> + cli
> +
> + cmpq %gs:(%rsi), %rax
> + jne not_same
> + cmpq %gs:8(%rsi), %rdx
> + jne not_same
> +
> + movq %rbx, %gs:(%esi)

(%rsi) instead of (%esi) ?

> + movq %rcx, %gs:8(%esi)

same here

> +
> + popf
> + mov $1, %al
> + ret
> +
> + not_same:
> + popf
> + xor %al,%al
> + ret
> +
> +CFI_ENDPROC
> +ENDPROC(cmpxchg16b_local_emu)
>



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-11-27 07:33    [W:1.007 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site