Hi,
I don't know why, but using __asm__ actually worked! thanks!
Now, to the thing I wanted to do from the start - to define a macro that
contains inline assembler (GCC style) with a clobber list. This is what I had
in mind:
#define MAGIC_QL(n,id,ql) do { \
__asm__("mov " #id ", %g1\n\t" \
"mov " #ql ", %g2\n\t" \
"sethi " #n ", %g0" : : :"g1", "g2" ); \
} while(0)
This compiles without problems. I figured that I don't need to specify g0 in
clobber list since it is generally not used anyway.
But, the problem is that the following macro is also swallowed by the compiler.
The only change I've made is adding % to g1 and g2 in the clobber.
#define MAGIC_QL(n,id,ql) do { \
__asm__("mov " #id ", %g1\n\t" \
"mov " #ql ", %g2\n\t" \
"sethi " #n ", %g0" : : :"%g1", "%g2" ); \
} while(0)
I'm unsure what syntax I should use. Anybody who knows the correct syntax?
Regards,
Mladen
--
This message posted from opensolaris.org