mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 16:39:24 +01:00 
			
		
		
		
	* 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:
		
							parent
							
								
									353be907c7
								
							
						
					
					
						commit
						7af95cbf06
					
				@ -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
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user