not the best solution, but still better than using the stack.
on a small loop I gain 5 HBL between VBCC and GCC 8

Code: Select all
static inline void SpriteDraw(s16 x, s16 y, u16 tile, u16 size)
{
asm volatile
(
"move.w %0,%%d0\n\t"
"move.w %1,%%d1\n\t"
"move.w %2,%%d2\n\t"
"move.w %3,%%d3\n\t"
"jsr SpriteDraw"
:
: "r"(x), "r"(y), "r"(tile), "r"(size)
: "%d0", "%d1", "%d2", "%d3", "%a0", "cc", "memory"
);
}