Avoid overflow error for single MinValue in rtl syshelph.inc for x86_64 CPU

git-svn-id: trunk@33012 -
This commit is contained in:
pierre 2016-01-28 14:20:51 +00:00
parent 1d5e9ba35f
commit 1e5883b6d1

View File

@ -858,8 +858,13 @@ implementation
if is_constrealnode(left) then
begin
trealconstnode(left).value_real:=-trealconstnode(left).value_real;
{ Avoid integer overflow on x86_64 CPU for currency value }
{ i386 uses fildll/fchs/fistll instructions which never seem
to raise any coprocessor flags .. }
{$push}{$Q-}
trealconstnode(left).value_currency:=-trealconstnode(left).value_currency;
result:=left;
{$pop}
left:=nil;
exit;
end;