what is the proper asm spec for xchg

Sean McNeil sean at mcneil.com
Thu Dec 23 11:31:29 PST 2004


I'm looking at why audio/sdl_mixer will not compile and I see that
devel/sdl12 has an include with

#elif defined(__GNUC__) && defined(__x86_64__)
static __inline__ Uint16 SDL_Swap16(Uint16 x)
{
        __asm__("xchgb %b0,%h0" : "=q" (x) :  "0" (x));
        return x;
}

This appears to be incorrect as it is giving errors when compiled.  Does
anyone more conversant with asm directives for amd64 have an idea what
this should be?

Thanks,
Sean

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-amd64/attachments/20041223/4b15304f/attachment.bin


More information about the freebsd-amd64 mailing list