View Issue Details

IDProjectCategoryView StatusLast Update
0038557FPCCompilerpublic2021-03-30 18:44
ReporterMarģers Assigned ToFlorian  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx86_64OSlinux 
Product Version3.3.1 
Fixed in Version3.3.1 
Summary0038557: internal error 200301231 in assembler routine
Descriptioninvestigating whats the problem in https://forum.lazarus.freepascal.org/index.php/topic,53489.0.html
i did come up with internal error 200301231
Steps To Reproduceattached example testgfxi.pas
culprit line: mov rax, where
TagsNo tags attached.
Fixed in Revision49087
FPCOldBugId
FPCTarget-
Attached Files

Activities

Marģers

2021-02-28 15:50

reporter  

testgfxi.pas (461 bytes)   
type
     gfxImage = record
          data: pointer;
          width, height: dWord;
     end;

function putPixel(where:gfxImage;x,y,col:dword):dword; assembler; nostackframe;
//begin
asm
     xor eax,eax
     //mov rax, where.data
     mov rax, where
end;
//end;

var a : gfxImage;
    z : dword;
begin
     a.data:= pointer(5);
     a.width := 8;
     a.height := 7;
     z:= putPixel (a, 1, 2, 3);
     writeln;
     writeln(' ',z,' ');
     writeln;
end.

testgfxi.pas (461 bytes)   

Marģers

2021-02-28 15:54

reporter   ~0129241

ups, it's internal error 200309201

Marģers

2021-02-28 16:02

reporter   ~0129242

ok so it's also internal error 200301231 in modified example
testgfx2.pas (581 bytes)   
type
     gfxImage = record
          data: pointer;
          width, height: dWord;
     end;

function putPixel(where:gfxImage;x,y,col:dword):dword; assembler; nostackframe;
//begin
asm
     xor eax,eax
     mov eax,x
     mov eax,y
     mov eax,col
     mov rax,rdi
     mov rax,rsi
     rol rax,32

     mov rax, where
     //mov rax, where.data
     //mov rax, where
end;
//end;

var a : gfxImage;
    z : dword;
begin
     a.data:= pointer(5);
     a.width := 8;
     a.height := 7;
     z:= putPixel (a, 1, 2, 3);
     writeln;
     writeln(' ',z,' ');
     writeln;
end.

testgfx2.pas (581 bytes)   

Issue History

Date Modified Username Field Change
2021-02-28 15:50 Marģers New Issue
2021-02-28 15:50 Marģers File Added: testgfxi.pas
2021-02-28 15:54 Marģers Note Added: 0129241
2021-02-28 16:02 Marģers Note Added: 0129242
2021-02-28 16:02 Marģers File Added: testgfx2.pas
2021-03-30 18:44 Florian Assigned To => Florian
2021-03-30 18:44 Florian Status new => resolved
2021-03-30 18:44 Florian Resolution open => fixed
2021-03-30 18:44 Florian Fixed in Version => 3.3.1
2021-03-30 18:44 Florian Fixed in Revision => 49087
2021-03-30 18:44 Florian FPCTarget => -