[aspectc-user] Small glitch in GCC's __asm__ syntax support

Stefan Marr aspectc at stefan-marr.de
Tue May 26 19:08:32 CEST 2009


just stumbled over a small problem with some assembly code in a header  
file. Looks like AspectC++ does not support the full GCC style  
assembly definitions.

The code is as follows:


inline void XADD(int32_t* var, int32_t increment) {
   __asm__ __volatile__(
          "lock xaddl %1,%0 ;\n"
        : "=m"  (*var)
        : "ir"  (increment), "m" (var)
        :                                 /* empty clobber-list */

g++ compiles it fine, but using ag++ results in an error.

The ac++ compiler complains about the last line beginning with ":",  
guess because its empty.

As a workaround, it is possible to remove this line.

Best regards

More information about the aspectc-user mailing list