sergei 
							
						 
					 
					
						
						
						
						
							
						
						
							8dc6ebb5ed 
							
						 
					 
					
						
						
							
							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 - 
						
					 
					
						2011-12-02 20:55:53 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							d7f7a9bb76 
							
						 
					 
					
						
						
							
							* patch by Alexander Shishkin to clean up $ifopt usage by $push/$pop,  resolves   #20346  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@19256 - 
						
					 
					
						2011-09-27 20:22:40 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Jonas Maebe 
							
						 
					 
					
						
						
						
						
							
						
						
							c5dfa9d354 
							
						 
					 
					
						
						
							
							* fixed fpc_shortstr_concat() in case the max length for the destination is  
						
						 
						
						... 
						
						
						
						already smaller than the length of the first string (probably cannot
    happen currently, but may be in the future as a result of optimizations)
git-svn-id: trunk@17886 - 
						
					 
					
						2011-06-30 15:48:52 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							efea42bcdf 
							
						 
					 
					
						
						
							
							* rewrote Ror/Rol/Sar so that it can be completely folded into a const by the compiler  
						
						 
						
						... 
						
						
						
						if possible, the copied (dist and xxx) expressions are folded by the CSE so they don't hurt
git-svn-id: trunk@17764 - 
						
					 
					
						2011-06-16 20:27:11 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								sergei 
							
						 
					 
					
						
						
						
						
							
						
						
							4ebc34c5e7 
							
						 
					 
					
						
						
							
							* Promoted result type of FPC_PCHAR_LENGTH and FPC_PWIDECHAR_LENGTH to SizeInt.  
						
						 
						
						... 
						
						
						
						+ Check for nil pointer in FPC_PWIDECHAR_LENGTH
git-svn-id: trunk@17733 - 
						
					 
					
						2011-06-13 04:59:17 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							0bc3ec2b8a 
							
						 
					 
					
						
						
							
							* fix headers of fpc_mul helpers  
						
						 
						
						... 
						
						
						
						git-svn-id: branches/avr@17029 - 
						
					 
					
						2011-02-26 21:01:27 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							b4d4d4b208 
							
						 
					 
					
						
						
							
							* compilation fix  
						
						 
						
						... 
						
						
						
						git-svn-id: branches/avr@17021 - 
						
					 
					
						2011-02-26 20:56:36 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							d5455cf6ac 
							
						 
					 
					
						
						
							
							+ software multiplication support for OS_16,OS_S16,OS_32,OS_S32  
						
						 
						
						... 
						
						
						
						git-svn-id: branches/avr@17020 - 
						
					 
					
						2011-02-26 20:33:01 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							5dae691c96 
							
						 
					 
					
						
						
							
							* implementation of bit scan intrinsics by Richard Vida,  resolves   #17592  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@16174 - 
						
					 
					
						2010-10-16 15:03:30 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							dfc2652062 
							
						 
					 
					
						
						
							
							+ support of compiler intrinsic sar* using a patch by Benjamin Rosseaux,  resolves   #15606  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@14834 - 
						
					 
					
						2010-01-31 16:47:01 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							6ff15f46e2 
							
						 
					 
					
						
						
							
							* made SwapEndian(<16 Bit>); inlined  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@13453 - 
						
					 
					
						2009-07-26 13:50:57 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								ivost 
							
						 
					 
					
						
						
						
						
							
						
						
							02d177c885 
							
						 
					 
					
						
						
							
							* added FillQWord, IndexQWord, but CompareQWord is still missing  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@13282 - 
						
					 
					
						2009-06-15 21:35:52 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Jonas Maebe 
							
						 
					 
					
						
						
						
						
							
						
						
							b912e00440 
							
						 
					 
					
						
						
							
							* renamed rol/ror functions into rolbyte/rolword/roldword/rolqword  
						
						 
						
						... 
						
						
						
						(and the same for ror), because their operation is very dependent on the
    operand size, and it's fairly easy to misjudge the bitwidth of the outcome
    of an expression in Pascal if you are not intimately familiar with the
    language (or if you don't know the exact types of all involved values in
    an expression)
git-svn-id: trunk@12621 - 
						
					 
					
						2009-01-28 12:56:27 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Jonas Maebe 
							
						 
					 
					
						
						
						
						
							
						
						
							22aacd2a60 
							
						 
					 
					
						
						
							
							* return 0 for length(pchar(0)), like Kylix does (using corrected and  
						
						 
						
						... 
						
						
						
						multi-platform version of patch in r12461, which caused the i386 version
    of fpc_pchar_length to return 0 in all cases, which used tabs, and did
    not include a test case)
git-svn-id: trunk@12464 - 
						
					 
					
						2009-01-01 22:02:17 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Jonas Maebe 
							
						 
					 
					
						
						
						
						
							
						
						
							bc9e7c5580 
							
						 
					 
					
						
						
							
							* fixed syntax errors in r11708 (and it wasn't tested in the nightly  
						
						 
						
						... 
						
						
						
						Sparc regressions tests because Solaris is an FPC_USE_LIBC platform,
    and these use memset rather than the generic fillchar)
git-svn-id: trunk@11711 - 
						
					 
					
						2008-09-05 13:14:41 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Jonas Maebe 
							
						 
					 
					
						
						
						
						
							
						
						
							af05770a7c 
							
						 
					 
					
						
						
							
							* fixed alignment code in generic fillchar (not sure why  
						
						 
						
						... 
						
						
						
						tests/test/tfillchr didn't fail in the nightly sparc tests)
git-svn-id: trunk@11708 - 
						
					 
					
						2008-09-04 21:42:51 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							20e632c8d8 
							
						 
					 
					
						
						
							
							* reorganized ror/rol defines  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@11472 - 
						
					 
					
						2008-07-28 13:03:18 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							1afb1aa9cc 
							
						 
					 
					
						
						
							
							+ ror/rol functions  
						
						 
						
						... 
						
						
						
						+ internal compiler support for ror/rol on i386
git-svn-id: trunk@11466 - 
						
					 
					
						2008-07-27 17:12:32 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							d672700a59 
							
						 
					 
					
						
						
							
							* some avr fixes  
						
						 
						
						... 
						
						
						
						+ cpu16 type defines
git-svn-id: trunk@11380 - 
						
					 
					
						2008-07-13 18:16:24 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								yury 
							
						 
					 
					
						
						
						
						
							
						
						
							d1dd8bd928 
							
						 
					 
					
						
						
							
							* Fixed warning and notes.  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@10899 - 
						
					 
					
						2008-05-07 12:35:03 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Jonas Maebe 
							
						 
					 
					
						
						
						
						
							
						
						
							95637dea75 
							
						 
					 
					
						
						
							
							* fixed swapendian(smallint) (bug found by Joost van der Sluis)  
						
						 
						
						... 
						
						
						
						* based swap(smallint) and swap(word) on swapendian(smallint/word),
    since the same bug was already fixed in swap(smallint) in r6752
    (so these routines now share the same code)
  * fixed potential range error in swapendian(word)
  + added basic test for the above four routines
git-svn-id: trunk@10840 - 
						
					 
					
						2008-04-29 22:14:43 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								micha 
							
						 
					 
					
						
						
						
						
							
						
						
							83b7f81f81 
							
						 
					 
					
						
						
							
							+ add no-fpu support to compiler/rtl for powerpc-linux (-Cfnone)  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@10422 - 
						
					 
					
						2008-03-02 12:59:02 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								peter 
							
						 
					 
					
						
						
						
						
							
						
						
							1561d97465 
							
						 
					 
					
						
						
							
							* optimize write loop in int_str  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@9794 - 
						
					 
					
						2008-01-19 16:48:12 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Jonas Maebe 
							
						 
					 
					
						
						
						
						
							
						
						
							bf9b021749 
							
						 
					 
					
						
						
							
							* optimized align() so it no longer contains any branches which  
						
						 
						
						... 
						
						
						
						are undecidable at compile time
  + basic test for align() function
git-svn-id: trunk@9674 - 
						
					 
					
						2008-01-07 21:41:12 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							c64ab62bdf 
							
						 
					 
					
						
						
							
							* fixed CompareChar0,  resolves   #10151  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@9219 - 
						
					 
					
						2007-11-12 20:01:57 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							c794ec6de0 
							
						 
					 
					
						
						
							
							* fix Index*Word for CPUs requiring proper alignment  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@9105 - 
						
					 
					
						2007-11-03 15:51:11 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							b59fdbeb93 
							
						 
					 
					
						
						
							
							* CompareWord and CompareDWord fixed for building with <2.3.1  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@9087 - 
						
					 
					
						2007-11-02 23:33:57 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								yury 
							
						 
					 
					
						
						
						
						
							
						
						
							3d1d9815ac 
							
						 
					 
					
						
						
							
							* Fixed CompareDWord.  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@9058 - 
						
					 
					
						2007-11-02 11:19:10 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								yury 
							
						 
					 
					
						
						
						
						
							
						
						
							5e9dd6cd4c 
							
						 
					 
					
						
						
							
							* Fixed CompareDWord after r8827 (compiler warnings should not be ignored :).  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@9038 - 
						
					 
					
						2007-11-01 13:42:01 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								yury 
							
						 
					 
					
						
						
						
						
							
						
						
							2770652beb 
							
						 
					 
					
						
						
							
							* Fixed unreachable code warnings and removed not used variable.  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@9036 - 
						
					 
					
						2007-11-01 13:28:08 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							7da7364ee7 
							
						 
					 
					
						
						
							
							* refactored SysResetFPU into SysInitFPU and SysResetFPU  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@8966 - 
						
					 
					
						2007-10-28 12:06:49 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							7878f0feb3 
							
						 
					 
					
						
						
							
							* made all fpc_*_to_shortstr helpers a procedure,  resolves   #8580  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@8898 - 
						
					 
					
						2007-10-21 17:33:18 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							4b69743c92 
							
						 
					 
					
						
						
							
							* fixed compilation on non sigbusing cpus  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@8829 - 
						
					 
					
						2007-10-16 21:14:41 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							3f24d63176 
							
						 
					 
					
						
						
							
							* fixed Compare* for CPUs requiring natural alignment  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@8827 - 
						
					 
					
						2007-10-16 20:32:59 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								peter 
							
						 
					 
					
						
						
						
						
							
						
						
							4f862a23a7 
							
						 
					 
					
						
						
							
							* fixed alignment leftover in compare  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@8823 - 
						
					 
					
						2007-10-16 17:53:00 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							96eaeeaf98 
							
						 
					 
					
						
						
							
							* fixed Index* for 64 Bit CPUs  
						
						 
						
						... 
						
						
						
						* use forward move as much as possible
git-svn-id: trunk@8778 - 
						
					 
					
						2007-10-13 19:06:41 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Jonas Maebe 
							
						 
					 
					
						
						
						
						
							
						
						
							775ee6f563 
							
						 
					 
					
						
						
							
							* len=0 should not be treated as overflow in comparebyte/word/dword  
						
						 
						
						... 
						
						
						
						(further fix to r8754, fixes regresssion of twide4 on sparc/solaris)
git-svn-id: trunk@8765 - 
						
					 
					
						2007-10-11 17:10:29 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Jonas Maebe 
							
						 
					 
					
						
						
						
						
							
						
						
							b5a1a6c6b4 
							
						 
					 
					
						
						
							
							* fixed generic index- and comparebyte/word/dword for limits which  
						
						 
						
						... 
						
						
						
						overflow the pointer range (fixes tw3612 regression on sparc/solaris)
git-svn-id: trunk@8754 - 
						
					 
					
						2007-10-09 11:00:15 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								peter 
							
						 
					 
					
						
						
						
						
							
						
						
							e8322a83e4 
							
						 
					 
					
						
						
							
							* optimized generic implementations to use pointers instead of  
						
						 
						
						... 
						
						
						
						array accesses. This also allows better register variable
    optimizations
git-svn-id: trunk@8742 - 
						
					 
					
						2007-10-07 18:36:18 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Jonas Maebe 
							
						 
					 
					
						
						
						
						
							
						
						
							9bd4fe433b 
							
						 
					 
					
						
						
							
							* fixed buffer overflows in int_str() + test  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@8395 - 
						
					 
					
						2007-09-07 14:06:08 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								micha 
							
						 
					 
					
						
						
						
						
							
						
						
							d95b9082bb 
							
						 
					 
					
						
						
							
							* add memory barrier prototypes + implementation for i386 and sparc + use lwsync for powerpc64  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@8240 - 
						
					 
					
						2007-08-07 20:37:08 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								micha 
							
						 
					 
					
						
						
						
						
							
						
						
							7475f656f8 
							
						 
					 
					
						
						
							
							+ add memory barrier routines for powerpc/64  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@8179 - 
						
					 
					
						2007-07-28 12:47:48 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								daniel 
							
						 
					 
					
						
						
						
						
							
						
						
							bb5fea342f 
							
						 
					 
					
						
						
							
							* RTL updates needed to successfully cycle with -CIcommon_type.  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@8119 - 
						
					 
					
						2007-07-21 19:22:28 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								daniel 
							
						 
					 
					
						
						
						
						
							
						
						
							32216bcccd 
							
						 
					 
					
						
						
							
							* ptrint -> ptruint  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@7888 - 
						
					 
					
						2007-07-01 09:41:07 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								daniel 
							
						 
					 
					
						
						
						
						
							
						
						
							8ee5966a2e 
							
						 
					 
					
						
						
							
							* Fix comparedword and change it to cardinal.  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@7804 - 
						
					 
					
						2007-06-24 21:17:43 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Jonas Maebe 
							
						 
					 
					
						
						
						
						
							
						
						
							9cec910eb9 
							
						 
					 
					
						
						
							
							* changed *string_to_*chararray helpers from functions into procedures  
						
						 
						
						... 
						
						
						
						because on win64 the location of a function result can depend on its
    size (so some chararrays had to be returned in registers and others
    by reference, which means it's impossible to have a generic function
    declaration which works in all cases) (mantis #8533 )
  * pad constant string assignments to chararrays with #0  up to the
    length of the chararray for 2.0.x compatibility (fixes
    tests/test/tarray3)
git-svn-id: trunk@6915 - 
						
					 
					
						2007-03-18 12:20:01 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Jonas Maebe 
							
						 
					 
					
						
						
						
						
							
						
						
							a2c3826281 
							
						 
					 
					
						
						
							
							* changed fpc_big_chararray and fpc_big_widechararray from  
						
						 
						
						... 
						
						
						
						array[0..1023] into array[0..0], because they're used as
    dummy return types for the Xstring_to_chararray helpers,
    and if a smaller array is actually passed as result then
    having a larger array declared will cause -gt to
    overwrite other data
git-svn-id: trunk@6855 - 
						
					 
					
						2007-03-14 19:45:07 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								peter 
							
						 
					 
					
						
						
						
						
							
						
						
							cd767cf5c8 
							
						 
					 
					
						
						
							
							* i386 uses generic fpc_compare_shortstr_equal  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@6335 - 
						
					 
					
						2007-02-04 16:24:02 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								daniel 
							
						 
					 
					
						
						
						
						
							
						
						
							e8050233af 
							
						 
					 
					
						
						
							
							+ Patch by Thorsten Engler to optimize string comparisons for = and <> cases. (Mantis  #8231 )  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@6241 - 
						
					 
					
						2007-01-28 10:58:52 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							b3a1868ff0 
							
						 
					 
					
						
						
							
							* correct masking of exceptions in genmath code  
						
						 
						
						... 
						
						
						
						git-svn-id: trunk@5965 - 
						
					 
					
						2007-01-14 10:44:10 +00:00