mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 13:39:39 +01:00 
			
		
		
		
	* several fixes to get further with linux/ppc system unit compilation
This commit is contained in:
		
							parent
							
								
									e7a6cd18dd
								
							
						
					
					
						commit
						53a0b662b9
					
				@ -86,15 +86,16 @@ procedure FillDWord(var x;count : longint;value : DWord);
 | 
			
		||||
type
 | 
			
		||||
  longintarray = array [0..maxlongint div 4] of longint;
 | 
			
		||||
var
 | 
			
		||||
  I : longint;
 | 
			
		||||
  i : longint;
 | 
			
		||||
begin
 | 
			
		||||
  if Count<>0 then
 | 
			
		||||
   begin
 | 
			
		||||
     I:=Count;
 | 
			
		||||
     while I<>0 do
 | 
			
		||||
     i:=Count;
 | 
			
		||||
     while i<>0 do
 | 
			
		||||
      begin
 | 
			
		||||
        longintarray(X)[I-1]:=Value;
 | 
			
		||||
        Dec(I);
 | 
			
		||||
        { range checking must be disabled here }
 | 
			
		||||
        longintarray(x)[i-1]:=value;
 | 
			
		||||
        Dec(i);
 | 
			
		||||
      end;
 | 
			
		||||
   end;
 | 
			
		||||
end;
 | 
			
		||||
@ -945,7 +946,10 @@ end;
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  $Log$
 | 
			
		||||
  Revision 1.30  2002-07-29 09:23:11  jonas
 | 
			
		||||
  Revision 1.31  2002-07-29 21:28:16  florian
 | 
			
		||||
    * several fixes to get further with linux/ppc system unit compilation
 | 
			
		||||
 | 
			
		||||
  Revision 1.30  2002/07/29 09:23:11  jonas
 | 
			
		||||
    * fixed some datastructures > 2GB
 | 
			
		||||
 | 
			
		||||
  Revision 1.29  2002/07/28 21:39:28  florian
 | 
			
		||||
 | 
			
		||||
@ -166,7 +166,7 @@ begin
 | 
			
		||||
            int_AddRef (Data+Offset,Info);
 | 
			
		||||
      end;
 | 
			
		||||
    tkDynArray:
 | 
			
		||||
      fpc_dynarray_incr_ref(PPointer(Data)^,TypeInfo);
 | 
			
		||||
      fpc_dynarray_incr_ref(PPointer(Data)^);
 | 
			
		||||
{$ifdef HASINTF}
 | 
			
		||||
    tkInterface:
 | 
			
		||||
      Intf_Incr_Ref(PPointer(Data)^);
 | 
			
		||||
@ -176,6 +176,12 @@ end;
 | 
			
		||||
{$endif}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{$ifdef hascompilerproc}
 | 
			
		||||
{ alias for internal use }
 | 
			
		||||
{ we use another name else the compiler gets puzzled because of the wrong forward def }
 | 
			
		||||
procedure fpc_systemDecRef (Data, TypeInfo : Pointer);saveregisters;[external name 'FPC_DECREF'];
 | 
			
		||||
{$endif compilerproc}
 | 
			
		||||
 | 
			
		||||
{$ifndef FPC_SYSTEM_HAS_FPC_DECREF}
 | 
			
		||||
 | 
			
		||||
Procedure fpc_DecRef (Data, TypeInfo : Pointer);saveregisters;[Public,alias : 'FPC_DECREF'];  {$ifdef hascompilerproc} compilerproc; {$endif}
 | 
			
		||||
@ -206,7 +212,7 @@ begin
 | 
			
		||||
         Count:=PArrayRec(Temp)^.Count;  // get element Count
 | 
			
		||||
         TInfo:=PArrayRec(Temp)^.Info;   // Get element info
 | 
			
		||||
         For I:=0 to Count-1 do
 | 
			
		||||
           fpc_DecRef (Data+(I*size),TInfo);
 | 
			
		||||
           fpc_systemDecRef (Data+(I*size),TInfo);
 | 
			
		||||
      end;
 | 
			
		||||
    tkrecord:
 | 
			
		||||
      begin
 | 
			
		||||
@ -217,7 +223,7 @@ begin
 | 
			
		||||
      Count:=PRecRec(Temp)^.Count;  // get element Count
 | 
			
		||||
      For I:=1 to count do
 | 
			
		||||
        With PRecRec(Temp)^.elements[I] do
 | 
			
		||||
          fpc_DecRef (Data+Offset,Info);
 | 
			
		||||
          fpc_systemDecRef (Data+Offset,Info);
 | 
			
		||||
      end;
 | 
			
		||||
    tkDynArray:
 | 
			
		||||
      fpc_dynarray_decr_ref(PPointer(Data)^,TypeInfo);
 | 
			
		||||
@ -241,7 +247,10 @@ procedure fpc_finalize_array(data,typeinfo : pointer;count,size : longint); [Pub
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
 $Log$
 | 
			
		||||
 Revision 1.12  2002-04-25 20:14:57  peter
 | 
			
		||||
 Revision 1.13  2002-07-29 21:28:17  florian
 | 
			
		||||
   * several fixes to get further with linux/ppc system unit compilation
 | 
			
		||||
 | 
			
		||||
 Revision 1.12  2002/04/25 20:14:57  peter
 | 
			
		||||
   * updated compilerprocs
 | 
			
		||||
   * incr ref count has now a value argument instead of var
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -203,6 +203,10 @@ Begin
 | 
			
		||||
  inclocked(PWideRec(S-WideFirstOff)^.Ref);
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
{$ifdef hascompilerproc}
 | 
			
		||||
{ alias for internal use }
 | 
			
		||||
Procedure fpc_WideStr_Incr_Ref (S : Pointer);saveregisters;[external name 'FPC_WIDESTR_INCR_REF'];
 | 
			
		||||
{$endif compilerproc}
 | 
			
		||||
 | 
			
		||||
function fpc_WideStr_To_ShortStr (high_of_res: longint;const S2 : WideString): shortstring;[Public, alias: 'FPC_WIDESTR_TO_SHORTSTR'];  {$ifdef hascompilerproc} compilerproc; {$endif}
 | 
			
		||||
{
 | 
			
		||||
@ -849,7 +853,10 @@ end;
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  $Log$
 | 
			
		||||
  Revision 1.17  2002-04-26 15:19:05  peter
 | 
			
		||||
  Revision 1.18  2002-07-29 21:28:17  florian
 | 
			
		||||
    * several fixes to get further with linux/ppc system unit compilation
 | 
			
		||||
 | 
			
		||||
  Revision 1.17  2002/04/26 15:19:05  peter
 | 
			
		||||
    * use saveregisters for incr routines, saves also problems with
 | 
			
		||||
      the optimizer
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -558,7 +558,10 @@ end;
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  $Log$
 | 
			
		||||
  Revision 1.6  2002-07-28 20:43:48  florian
 | 
			
		||||
  Revision 1.7  2002-07-29 21:28:17  florian
 | 
			
		||||
    * several fixes to get further with linux/ppc system unit compilation
 | 
			
		||||
 | 
			
		||||
  Revision 1.6  2002/07/28 20:43:48  florian
 | 
			
		||||
    * several fixes for linux/powerpc
 | 
			
		||||
    * several fixes to MT
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -26,8 +26,8 @@
 | 
			
		||||
        pi := 3.14159265358979320;
 | 
			
		||||
      end;
 | 
			
		||||
 | 
			
		||||
    { $define FPC_SYSTEM_HAS_ABS}
 | 
			
		||||
    // function abs(d : extended) : extended;[internproc:in_abs_extended];
 | 
			
		||||
    {$define FPC_SYSTEM_HAS_ABS}
 | 
			
		||||
    function abs(d : extended) : extended;[internproc:in_abs_extended];
 | 
			
		||||
 | 
			
		||||
    {$define FPC_SYSTEM_HAS_SQR}
 | 
			
		||||
    function sqr(d : extended) : extended;[internproc:in_sqr_extended];
 | 
			
		||||
@ -205,7 +205,7 @@
 | 
			
		||||
                         Int to real helpers
 | 
			
		||||
 ****************************************************************************}
 | 
			
		||||
 | 
			
		||||
function fpc_int64_to_real(i: int64): double; compilerproc;
 | 
			
		||||
function fpc_int64_to_double(i: int64): double; compilerproc;
 | 
			
		||||
assembler;
 | 
			
		||||
{ input: high(i) in r3, low(i) in r4 }
 | 
			
		||||
{ output: double(i) in f0            }
 | 
			
		||||
@ -267,7 +267,10 @@ end ['r0','r3','f0','f1','f2','f3'];
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  $Log$
 | 
			
		||||
  Revision 1.5  2002-07-28 21:39:29  florian
 | 
			
		||||
  Revision 1.6  2002-07-29 21:28:17  florian
 | 
			
		||||
    * several fixes to get further with linux/ppc system unit compilation
 | 
			
		||||
 | 
			
		||||
  Revision 1.5  2002/07/28 21:39:29  florian
 | 
			
		||||
    * made abs a compiler proc if it is generic
 | 
			
		||||
 | 
			
		||||
  Revision 1.4  2002/07/28 20:43:49  florian
 | 
			
		||||
 | 
			
		||||
@ -771,7 +771,10 @@ End.
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  $Log$
 | 
			
		||||
  Revision 1.23  2002-07-28 20:43:49  florian
 | 
			
		||||
  Revision 1.24  2002-07-29 21:28:17  florian
 | 
			
		||||
    * several fixes to get further with linux/ppc system unit compilation
 | 
			
		||||
 | 
			
		||||
  Revision 1.23  2002/07/28 20:43:49  florian
 | 
			
		||||
    * several fixes for linux/powerpc
 | 
			
		||||
    * several fixes to MT
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user