mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 10:26:06 +02:00
* fixed tmoddivnode.pass_typecheck on 64-bit CPUs; I was wrong about uint64 div uint64 producing int64 on 64-bit CPUs; this fixes make cycle on e.g. x86_64
git-svn-id: branches/i8086@24226 -
This commit is contained in:
parent
f84fc17edc
commit
70a0d2989c
@ -279,18 +279,12 @@ implementation
|
|||||||
if (is_64bitint(left.resultdef) or
|
if (is_64bitint(left.resultdef) or
|
||||||
is_64bitint(right.resultdef)) then
|
is_64bitint(right.resultdef)) then
|
||||||
begin
|
begin
|
||||||
{ nickysn note: In previous versions of FPC, uint64 div/mod uint64
|
|
||||||
produces int64 on 64-bit CPUs and uint64 on 32-bit. I'm not sure why,
|
|
||||||
but I'm putting these ifdefs for backwards compatibility. }
|
|
||||||
{$ifndef cpu64bitaddr}
|
|
||||||
if is_signed(rd) or is_signed(ld) then
|
if is_signed(rd) or is_signed(ld) then
|
||||||
begin
|
begin
|
||||||
{$endif cpu64bitaddr}
|
|
||||||
if (ld.ordtype<>s64bit) then
|
if (ld.ordtype<>s64bit) then
|
||||||
inserttypeconv(left,s64inttype);
|
inserttypeconv(left,s64inttype);
|
||||||
if (rd.ordtype<>s64bit) then
|
if (rd.ordtype<>s64bit) then
|
||||||
inserttypeconv(right,s64inttype);
|
inserttypeconv(right,s64inttype);
|
||||||
{$ifndef cpu64bitaddr}
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
@ -299,7 +293,6 @@ implementation
|
|||||||
if (rd.ordtype<>u64bit) then
|
if (rd.ordtype<>u64bit) then
|
||||||
inserttypeconv(right,u64inttype);
|
inserttypeconv(right,u64inttype);
|
||||||
end;
|
end;
|
||||||
{$endif cpu64bitaddr}
|
|
||||||
resultdef:=left.resultdef;
|
resultdef:=left.resultdef;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user