From 6d4e01d74f7ad027c3e5ffe41ba0454d4e791202 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 28 Jul 2002 21:39:28 +0000 Subject: [PATCH] * made abs a compiler proc if it is generic --- rtl/inc/generic.inc | 7 +++++-- rtl/inc/genmath.inc | 13 ++++++++----- rtl/powerpc/math.inc | 13 +++++++++---- rtl/powerpc/powerpc.inc | 27 +++++++++++++++++---------- 4 files changed, 39 insertions(+), 21 deletions(-) diff --git a/rtl/inc/generic.inc b/rtl/inc/generic.inc index e8d5b4ce83..a19f1ddcac 100644 --- a/rtl/inc/generic.inc +++ b/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 diff --git a/rtl/inc/genmath.inc b/rtl/inc/genmath.inc index 259becb85e..e238767039 100644 --- a/rtl/inc/genmath.inc +++ b/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 diff --git a/rtl/powerpc/math.inc b/rtl/powerpc/math.inc index 4778d50205..740d969823 100644 --- a/rtl/powerpc/math.inc +++ b/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 diff --git a/rtl/powerpc/powerpc.inc b/rtl/powerpc/powerpc.inc index bf53ef01d3..3e78b40a87 100644 --- a/rtl/powerpc/powerpc.inc +++ b/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