mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-12 08:49:33 +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] }
|
||||
end;
|
||||
|
||||
{ This version works in all i8086 memory models }
|
||||
function CompareCode(cp, cp2: CodePointer; sz: Integer): Boolean;
|
||||
var
|
||||
lastbyte: Byte;
|
||||
@ -58,12 +57,14 @@ begin
|
||||
exit;
|
||||
end;
|
||||
{ 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];
|
||||
if lastbyte<>$C3 then
|
||||
begin
|
||||
CompareCode := False;
|
||||
exit;
|
||||
end;
|
||||
}
|
||||
CompareCode := True;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user