Ver código fonte

* made abs a compiler proc if it is generic

florian 23 anos atrás
pai
commit
6d4e01d74f
4 arquivos alterados com 39 adições e 21 exclusões
  1. 5 2
      rtl/inc/generic.inc
  2. 8 5
      rtl/inc/genmath.inc
  3. 9 4
      rtl/powerpc/math.inc
  4. 17 10
      rtl/powerpc/powerpc.inc

+ 5 - 2
rtl/inc/generic.inc

@@ -497,7 +497,7 @@ begin
    RunError(220);
 end;
 
-{$endif ndef FPC_SYSTEM_HAS_FPC_CHECK_OBJECT_EXT}
+{$endif not FPC_SYSTEM_HAS_FPC_CHECK_OBJECT_EXT}
 
 
 {****************************************************************************
@@ -945,7 +945,10 @@ end;
 
 {
   $Log$
-  Revision 1.28  2002-07-28 20:43:47  florian
+  Revision 1.29  2002-07-28 21:39:28  florian
+    * made abs a compiler proc if it is generic
+
+  Revision 1.28  2002/07/28 20:43:47  florian
     * several fixes for linux/powerpc
     * several fixes to MT
 

+ 8 - 5
rtl/inc/genmath.inc

@@ -268,14 +268,14 @@ Function float32_to_int32_round_to_zero( a: Float32 ): longint;
 
 
 {$ifndef FPC_SYSTEM_HAS_ABS}
-    function abs(d : Real) : Real;[internconst:in_const_abs];
+    function fpc_abs_real(d : Real) : Real; compilerproc;
     begin
        if( d < 0.0 ) then
-         abs := -d
+         fpc_abs_real := -d
       else
-         abs := d ;
+         fpc_abs_real := d ;
     end;
-{$endif}
+{$endif not FPC_SYSTEM_HAS_ABS}
 
 
     function frexp(x:Real; var e:Integer ):Real;
@@ -1020,7 +1020,10 @@ Function float32_to_int32_round_to_zero( a: Float32 ): longint;
 
 {
   $Log$
-  Revision 1.4  2002-07-28 20:43:48  florian
+  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:48  florian
     * several fixes for linux/powerpc
     * several fixes to MT
 

+ 9 - 4
rtl/powerpc/math.inc

@@ -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];
@@ -68,11 +68,13 @@
       end;
 
 
+    }
+    {$define FPC_SYSTEM_HAS_INT}
+    {$warning FIX ME}
     function int(d : extended) : extended;[internconst:in_const_int];
       begin
         runerror(207);
       end;
-    }
 
     {$define FPC_SYSTEM_HAS_TRUNC}
     {$warning FIX ME}
@@ -265,7 +267,10 @@ end ['r0','r3','f0','f1','f2','f3'];
 
 {
   $Log$
-  Revision 1.4  2002-07-28 20:43:49  florian
+  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
     * several fixes for linux/powerpc
     * several fixes to MT
 

+ 17 - 10
rtl/powerpc/powerpc.inc

@@ -535,7 +535,7 @@ asm
 end;
 
 {$define FPC_SYSTEM_HAS_FPC_HELP_FAIL}
-procedure fpc_help_fail;assembler;[public,alias:'FPC_HELP_FAIL']; {$ifdef hascompilerproc} compilerproc; {$endif}
+procedure fpc_help_fail;assembler;[public,alias:'FPC_HELP_FAIL']; compilerproc;
 assembler;
 asm
 {$warning FIX ME!}
@@ -550,7 +550,7 @@ procedure fpc_help_destructor;assembler;[public,alias:'FPC_HELP_DESTRUCTOR']; {$
 *)
 
 {$define FPC_SYSTEM_HAS_FPC_NEW_CLASS}
-procedure fpc_new_class;assembler;[public,alias:'FPC_NEW_CLASS']; {$ifdef hascompilerproc} compilerproc; {$endif}
+procedure fpc_new_class;assembler;[public,alias:'FPC_NEW_CLASS']; compilerproc;
 assembler;
 asm
 {$warning FIX ME!}
@@ -559,7 +559,7 @@ end;
 
 
 {$define FPC_SYSTEM_HAS_FPC_DISPOSE_CLASS}
-procedure fpc_dispose_class;assembler;[public,alias:'FPC_DISPOSE_CLASS']; {$ifdef hascompilerproc} compilerproc; {$endif}
+procedure fpc_dispose_class;assembler;[public,alias:'FPC_DISPOSE_CLASS']; compilerproc;
 assembler;
 asm
 {$warning FIX ME!}
@@ -578,18 +578,22 @@ end;
 
 
 
-{define FPC_SYSTEM_HAS_FPC_CHECK_OBJECT}
-{ we want the stack for debugging !! PM }
-(*
-use generic implementation for now
-procedure fpc_check_object(obj : pointer);[public,alias:'FPC_CHECK_OBJECT']; {$ifdef hascompilerproc} compilerproc; {$endif}
-*)
+{$define FPC_SYSTEM_HAS_FPC_CHECK_OBJECT}
+{ use generic implementation for now }
+{ that's a problem currently, the generic has a another prototy than this defined in compproc.inc (FK) }
+procedure fpc_check_object(obj : pointer);assembler; compilerproc;
+asm
+{$warning FIX ME!}
+// !!!!!!!!!!!
+end;
 
 { use generic implementation for now }
 { that's a problem currently, the generic has a another prototy than this defined in compproc.inc (FK) }
 {$define FPC_SYSTEM_HAS_FPC_CHECK_OBJECT_EXT}
 procedure fpc_check_object_ext; compilerproc;assembler;
 asm
+{$warning FIX ME!}
+// !!!!!!!!!!!
 end;
 
 {****************************************************************************
@@ -852,7 +856,10 @@ end ['r3','r10'];
 
 {
   $Log$
-  Revision 1.9  2002-07-28 20:43:49  florian
+  Revision 1.10  2002-07-28 21:39:29  florian
+    * made abs a compiler proc if it is generic
+
+  Revision 1.9  2002/07/28 20:43:49  florian
     * several fixes for linux/powerpc
     * several fixes to MT