[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] arguments in registers instead of stack in gcc



static __inline__ void call_asmfunc(int* pointer)
{
       register int* param __asm__("a0") = pointer;

       __asm__ volatile
       ("jsr _asmfunc"
       :                       /* outputs */
       : "g"(param)            /* inputs */
       : "d0", "d1", "a1"      /* clobbered regs */
       );
}
Ouch ouch ouch :) This is even more error-prone than my "default" method, i.e. adding move.l 4(sp),a0 before move.l a0,something into the code. Good news is compiler with m68k-atari-mint target which can solve this is on its way to us ;-)

--
MiKRO / Mystic Bytes
http://mikro.atari.org