[fpc-pascal] fpc198 and old bugs

Peter Vreman peter at freepascal.org
Tue Mar 8 22:12:37 CET 2005


At 21:15 8-3-2005, you wrote:
>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





More information about the fpc-pascal mailing list