* Win32 SEH: handle 'Athlon prefetch bug' and SSE detection exceptions in __FPC_default_handler.

git-svn-id: trunk@27164 -
This commit is contained in:
sergei 2014-03-16 17:53:29 +00:00
parent a176c2d4f5
commit 17b5359db0

View File

@ -163,6 +163,21 @@ var
begin
if (rec.ExceptionFlags and EXCEPTION_UNWIND)=0 then
begin
{ Athlon prefetch bug? }
if (rec.ExceptionCode=STATUS_ACCESS_VIOLATION) and is_prefetch(pointer(context.eip)) then
begin
result:=ExceptionContinueExecution;
exit;
end
else if (rec.ExceptionCode=STATUS_ILLEGAL_INSTRUCTION) and sse_check then
begin
os_supports_sse:=False;
{ skip the offending movaps %xmm7,%xmm6 instruction }
inc(context.eip,3);
result:=ExceptionContinueExecution;
exit;
end;
RtlUnwind(@frame,nil,@rec,nil);
asm
{ RtlUnwind destroys nonvolatile registers, this assembler block prevents