mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-30 17:51:32 +01:00 
			
		
		
		
	* i386 uses generic fpc_compare_shortstr_equal
git-svn-id: trunk@6335 -
This commit is contained in:
		
							parent
							
								
									0a5001438f
								
							
						
					
					
						commit
						cd767cf5c8
					
				| @ -937,14 +937,6 @@ asm | ||||
|         movl    saveesi,%esi | ||||
|         movl    saveebx,%ebx | ||||
| end; | ||||
| 
 | ||||
| function fpc_shortstr_compare_equal(const left,right:shortstring): longint; [public,alias:'FPC_SHORTSTR_COMPARE_EQUAL']; compilerproc; | ||||
| begin | ||||
|   Result := longint(left[0]) - longint(right[0]); | ||||
|   if Result = 0 then | ||||
|     Result := CompareByte(left[1],right[1], longint(left[0])); | ||||
| end; | ||||
| 
 | ||||
| {$endif FPC_SYSTEM_HAS_FPC_SHORTSTR_COMPARE} | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -693,31 +693,19 @@ begin | ||||
|   else | ||||
|     exit(0); | ||||
| end; | ||||
| 
 | ||||
| function fpc_shortstr_compare_equal(const left,right:shortstring) : longint;[public,alias:'FPC_SHORTSTR_COMPARE_EQUAL']; compilerproc; | ||||
| var | ||||
|    s1,s2,i : byte; | ||||
|    d : longint; | ||||
| begin | ||||
|   s1:=length(left); | ||||
|   s2:=length(right); | ||||
|   if s1<>s2 then | ||||
|     exit(-1) | ||||
|   else | ||||
|     for i:=1 to s1 do | ||||
|       begin | ||||
|        d:=byte(left[i])-byte(right[i]); | ||||
|        if d>0 then | ||||
|          exit(1) | ||||
|        else if d<0 then | ||||
|          exit(-1); | ||||
|       end; | ||||
|   exit(0); | ||||
| end; | ||||
| 
 | ||||
| 
 | ||||
| {$endif ndef FPC_SYSTEM_HAS_FPC_SHORTSTR_COMPARE} | ||||
| 
 | ||||
| 
 | ||||
| {$ifndef FPC_SYSTEM_HAS_FPC_SHORTSTR_COMPARE_EQUAL} | ||||
| function fpc_shortstr_compare_equal(const left,right:shortstring): longint; [public,alias:'FPC_SHORTSTR_COMPARE_EQUAL']; compilerproc; | ||||
| begin | ||||
|   Result := longint(left[0]) - longint(right[0]); | ||||
|   if Result = 0 then | ||||
|     Result := CompareByte(left[1],right[1], longint(left[0])); | ||||
| end; | ||||
| {$endif ndef FPC_SYSTEM_HAS_FPC_SHORTSTR_COMPARE_EQUAL} | ||||
| 
 | ||||
| 
 | ||||
| {$ifndef FPC_SYSTEM_HAS_FPC_PCHAR_TO_SHORTSTR} | ||||
| 
 | ||||
| function fpc_pchar_to_shortstr(p:pchar):shortstring;[public,alias:'FPC_PCHAR_TO_SHORTSTR']; compilerproc; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 peter
						peter