Inline assembly
Posted: Sun Jun 18, 2006 4:54 pm
I've got a problem with the toolchain, where I'm doing something like this:
static inline void SetupMatrix (MATRIX mat)
{
asm __volatile__ ("\n\
lqc2 vf4,0x00(%0)\n\
lqc2 vf5,0x10(%0)\n\
lqc2 vf6,0x20(%0)\n\
lqc2 vf7,0x30(%0)\n\
": : "r" (mat));
}
The compiler is throwing up this error:
error: Internal compiler error at expr.c:2672
Where the line it is throwing up on is asm __volatile__ line. It is also complaining about this:
error C2143: syntax error : missing ')' before ':'
Which is referring to the ": : "r" (mat)); line
Any ideas?
static inline void SetupMatrix (MATRIX mat)
{
asm __volatile__ ("\n\
lqc2 vf4,0x00(%0)\n\
lqc2 vf5,0x10(%0)\n\
lqc2 vf6,0x20(%0)\n\
lqc2 vf7,0x30(%0)\n\
": : "r" (mat));
}
The compiler is throwing up this error:
error: Internal compiler error at expr.c:2672
Where the line it is throwing up on is asm __volatile__ line. It is also complaining about this:
error C2143: syntax error : missing ')' before ':'
Which is referring to the ": : "r" (mat)); line
Any ideas?