View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006574 | JEDI Code Library | JclGraphUtils | public | 2017-06-10 05:14 | 2023-11-11 23:45 |
Reporter | mksjgj | Assigned To | AHUser | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | Version 2.5 (Subversion repository/Daily zips) | ||||
Target Version | Fixed in Version | Version 2.5 (Subversion repository/Daily zips) | |||
Summary | 0006574: assembler version of M_CombineReg corrupt the memory | ||||
Description | the following code will get an error: Project BlendColor.exe raised exception class $C0000092 with message 'floating point stack check at 0x00407015'. procedure TForm25.BitBtn1Click(Sender: TObject); var c32:TColor32; begin c32 := CombineReg( Color32(clRed),Color32(clBlue), 100); Caption := ColorToString( WinColor(c32) ); end; but if you comment the source and force using the pascal version,it will work very well: procedure SetupFunctions; var CpuInfo: TCpuInfo; begin //WIMDC CpuInfo := CPUID; MMX_ACTIVE := (CpuInfo.Features and MMX_FLAG) = MMX_FLAG; // if MMX_ACTIVE then // begin // // link MMX functions // CombineReg := M_CombineReg; // CombineMem := M_CombineMem; // BlendReg := M_BlendReg; // BlendMem := M_BlendMem; // BlendRegEx := M_BlendRegEx; // BlendMemEx := M_BlendMemEx; // BlendLine := M_BlendLine; // BlendLineEx := M_BlendLineEx; // end // else begin // link non-MMX functions CombineReg := _CombineReg; CombineMem := _CombineMem; BlendReg := _BlendReg; BlendMem := _BlendMem; BlendRegEx := _BlendRegEx; BlendMemEx := _BlendMemEx; BlendLine := _BlendLine; BlendLineEx := _BlendLineEx; end; end; | ||||
Additional Information | IDE: Delphi Berlin | ||||
Tags | No tags attached. | ||||
Fixed in GIT commit | 2a4c7ff1da4fc53b74cda8cef27cda6f52b208ae | ||||
Fixed in SVN revision | |||||
IDE version | All | ||||
|
You must call "EMMS;" after using the MMX instruction set, because MMX "trashes" the FPU registers. Fixed in git main branch. The fix removes all MMX instructions and replaces them with the SSE2 instruction set (if available). This removes the need the explicit call "EMMS;". Nowadays you shouldn't run int a CPU that doesn't have SSE2 support. |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-06-10 05:14 | mksjgj | New Issue | |
2017-06-10 05:14 | mksjgj | IDE version | => All |
2023-11-11 23:45 | AHUser | Assigned To | => AHUser |
2023-11-11 23:45 | AHUser | Status | new => resolved |
2023-11-11 23:45 | AHUser | Resolution | open => fixed |
2023-11-11 23:45 | AHUser | Fixed in Version | => Version 2.5 (Subversion repository/Daily zips) |
2023-11-11 23:45 | AHUser | Fixed in GIT commit | => 2a4c7ff1da4fc53b74cda8cef27cda6f52b208ae |
2023-11-11 23:45 | AHUser | Note Added: 0022060 |