mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 09:19:39 +01:00 
			
		
		
		
	rtl/generic.inc, minor optimizations:
* fpc_help_constructor: call platform-optimized version of FillChar directly instead of going through generic overloaded version. * don't compile software multiplication routines if not necessary (the interface part already has similar $ifdef around) * fpc_shortstr_append_shortstr: use sizeint instead of integer (the latter is 16-bit, produces less efficient code on most platforms) git-svn-id: trunk@19727 -
This commit is contained in:
		
							parent
							
								
									32094761ef
								
							
						
					
					
						commit
						8dc6ebb5ed
					
				@ -752,7 +752,7 @@ begin
 | 
			
		||||
    end;
 | 
			
		||||
  if _self<>nil then
 | 
			
		||||
    begin
 | 
			
		||||
      fillchar(_self^,pvmt(vmtcopy)^.size,#0);
 | 
			
		||||
      fillchar(_self^,pvmt(vmtcopy)^.size,0);
 | 
			
		||||
      ppointer(_self+_vmt_pos)^:=vmtcopy;
 | 
			
		||||
    end;
 | 
			
		||||
  fpc_help_constructor:=_self;
 | 
			
		||||
@ -1025,7 +1025,7 @@ end;
 | 
			
		||||
procedure fpc_shortstr_append_shortstr(var s1:shortstring;const s2:shortstring);compilerproc;
 | 
			
		||||
    [public,alias:'FPC_SHORTSTR_APPEND_SHORTSTR'];
 | 
			
		||||
var
 | 
			
		||||
  s1l, s2l : integer;
 | 
			
		||||
  s1l, s2l : sizeint;
 | 
			
		||||
begin
 | 
			
		||||
  s1l:=length(s1);
 | 
			
		||||
  s2l:=length(s2);
 | 
			
		||||
@ -1292,6 +1292,7 @@ end;
 | 
			
		||||
{****************************************************************************
 | 
			
		||||
                          Software multiplication
 | 
			
		||||
****************************************************************************}
 | 
			
		||||
{$ifdef FPC_INCLUDE_SOFTWARE_MUL}
 | 
			
		||||
 | 
			
		||||
{$ifndef FPC_SYSTEM_HAS_MUL_INTEGER}
 | 
			
		||||
    function fpc_mul_integer(f1,f2 : integer;checkoverflow : boolean) : integer;[public,alias: 'FPC_MUL_INTEGER']; compilerproc;
 | 
			
		||||
@ -1447,6 +1448,8 @@ end;
 | 
			
		||||
      end;
 | 
			
		||||
{$endif FPC_SYSTEM_HAS_MUL_DWORD}
 | 
			
		||||
 | 
			
		||||
{$endif FPC_INCLUDE_SOFTWARE_MUL}
 | 
			
		||||
 | 
			
		||||
{****************************************************************************
 | 
			
		||||
                          Software longint/dword division
 | 
			
		||||
****************************************************************************}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user