I'm a bit confused on this one. The standard cmpxchg() takes a scalar
and a pointer, and returns a scalar. The equivalent for the "double"
variety would be to return a compound object, basically:
struct double_ulong {
unsigned long v[2];
};
... which can be returned in registers on both i386 and x86-64.
It's a bit clumsy from a type perspective, but I'm not sure that that is
a bad thing. Doing too much type genericity has caused us problems in
the past.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
--