[fpc-pascal] fpc198 and old bugs
Bartek
bbartek at gmx.net
Fri Feb 25 18:47:48 CET 2005
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;
begin
a:=x0;b:=x0;r:=x0;
a[0]:=1;b[0]:=1;
r:=paddw(a,b);
writeln(r[0]);
end.
//--------------------------------------------------------------------------
compilations aborts with:
//--------------------------------------------------------------------------
Assembling bug2
bug2.pas(8,13) Error: Error while assembling exitcode 1
bug2.pas(8,13) Fatal: There were 2 errors compiling module, stopping
//--------------------------------------------------------------------------
other programs also using assembler compiled well.
i've also tried this one out:
//--------------------------------------------------------------------------
program bug;
uses heaptrc,sysutils;
begin
markheap;
end.
//--------------------------------------------------------------------------
output:
//--------------------------------------------------------------------------
? Free Pascal IDE Version 1.0.2 [2005/02/21]
? Compiler Version 1.9.8
? GBD Version GDB 6.2.1
? Cygwin "E:\fpc198\bin\i386-win32\cygwin1.dll" version 1005.12.0.0
Running "e:\fpc198\work\bug.exe /P"
Marked memory at $00083514 invalid
Wrong signature $AAAAAAAA instead of 8736A0C5
$004072DB
$00404E74
$0040C6D6
$004096B4
$0040C473
$0040C1C9
$004082C6
$00408088
$004022C7
//--------------------------------------------------------------------------
thanks for help in advance
bartek
More information about the fpc-pascal
mailing list