Hi (again),

could you please describe how you managed to compile and use the macro?

I created a small test-file (in C) with the following content:

#define MAGIC(service) do { \
        asm("sethi %0,%%g0" : : "g" (service)); \
} while (0)

#define ASMMAGIC(n) sethi n, %g0;


#define MAGIC_BREAKPOINT MAGIC(0x40000)


#endif /* _SIMICS_SIMICS_MAGIC_INSTRUCTION_H */


void main(void)
{
  MAGIC(6000);
}


I tried to compile it in the following way:

/opt/SUNWspro/bin/cc -o test test.c

But I got this error.

"test.c", line 24: syntax error before or at: :
cc: acomp failed for test.c

I think my Sun Studio compiler is version 11 so that should work, right?

/Mladen
--
This message posted from opensolaris.org

Reply via email to