__sync_compare_and_swap_16 argument alignment

Tim Blechmann tim@klingt.org
Thu Feb 7 13:55:00 GMT 2008


hi all,

from my experience, the __sync_compare_and_swap_16 functions have the 
signatures:

__sync_compare_and_swap_16 (type *ptr, type oldval, type newval)

that doesn't quite map to the CMPXCHG16B instruction, since the ptr 
argument is required to be 16 byte aligned ...

i am not sure, but shouldn't the signature be something like:
__sync_compare_and_swap_16 (type __attribute__ ((__aligned__(16))) *ptr, 
type oldval, type newval)
? (at least for the x86_64 architecture)

thanks in advance, tim

-- 
tim@klingt.org
http://tim.klingt.org

The composer makes plans, music laughs.
  Morton Feldman



More information about the Gcc-help mailing list