inline void func(int i, int* j)
{
asm("move.l %0, d0\n"
"move.l %0, a0\n"
"jsr _asmFunction\n"
: // no outputs
: "g"(i), "g"(j) // inputs
: "d0", "d1", "a0", "a1" // clobbers
);
}
I would change that to use
: "d0" (i), "a0" (j)
as inputs and leave out the "movel %0,d0" and "movel %0,a0" asm lines. BTW: you can tell the compiler that your asm code changes memory by using "m" in clobbers line. And "cc", to tell it that your code may change condition codes.