* LLVM does not support 128 bits arithmetic on 32 bit platforms, which we

need for overflow checking -> use RTL built-ins

git-svn-id: trunk@41205 -
This commit is contained in:
Jonas Maebe 2019-02-03 21:01:02 +00:00
parent 353be907c7
commit 7af95cbf06

View File

@ -3706,6 +3706,21 @@ implementation
else
expectloc:=LOC_JUMP;
end
{$else if defined(llvm) and cpu32bitalu}
{ llvm does not support 128 bit math on 32 bit targets, which is
necessary for overflow checking 64 bit operations }
else if (torddef(ld).ordtype in [s64bit,u64bit,scurrency]) and
(cs_check_overflow in current_settings.localswitches) and
(nodetype in [addn,subn,muln]) then
begin
result := first_add64bitint;
if assigned(result) then
exit;
if nodetype in [addn,subn,muln,andn,orn,xorn] then
expectloc:=LOC_REGISTER
else
expectloc:=LOC_JUMP;
end
{$endif not(cpu64bitalu) and not(cpuhighleveltarget)}
{ generic 32bit conversion }
else