hi,
i've just downloaded fpc198 and tried the following out. (there was a bug with the stack in fpc) //-------------------------------------------------------------------------- program bug2; uses sysutils; type tmmxint =array[0..3] of smallint; const x0 :tmmxint=(0,0,0,0); var a,b,r :tmmxint;
function paddw(a,b :tmmxint):tmmxint;assembler;inline; asm movq mm0, a paddw mm0, b movq @result, mm0 end;
inline uses registers to pass arguments. movq doesn't support registers. You need to load a first in a local temp or use a different calling convention like stdcall.
Note also that inline is disabled for assembler procedures (same as with delphi 2005).
//-------------------------------------------------------------------------- program bug; uses heaptrc,sysutils; begin markheap; end.
Use the bug repository to report bugs otherwise they will be forgotten.
Peter
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal