mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 22:09:28 +02:00
- remove ret check to make it more stable
git-svn-id: trunk@38580 -
This commit is contained in:
parent
fa3ee68004
commit
6c9d7e5c07
@ -47,7 +47,6 @@ asm
|
|||||||
mov eax, fs:[rbp+01] { mov еax, fs:5[locl] }
|
mov eax, fs:[rbp+01] { mov еax, fs:5[locl] }
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ This version works in all i8086 memory models }
|
|
||||||
function CompareCode(cp, cp2: CodePointer; sz: Integer): Boolean;
|
function CompareCode(cp, cp2: CodePointer; sz: Integer): Boolean;
|
||||||
var
|
var
|
||||||
lastbyte: Byte;
|
lastbyte: Byte;
|
||||||
@ -58,12 +57,14 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
{ check also that the last byte is a retn instruction }
|
{ check also that the last byte is a retn instruction }
|
||||||
|
{ size differs at least between linux and windows, so leave the ret check away
|
||||||
lastbyte:=PByte(cp)[sz-1];
|
lastbyte:=PByte(cp)[sz-1];
|
||||||
if lastbyte<>$C3 then
|
if lastbyte<>$C3 then
|
||||||
begin
|
begin
|
||||||
CompareCode := False;
|
CompareCode := False;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
}
|
||||||
CompareCode := True;
|
CompareCode := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user