Просмотр исходного кода

* arm fixes to the common rtl code
* some generic math code fixed
* ...

florian 22 лет назад
Родитель
Сommit
8d771df2d4

+ 108 - 2
rtl/arm/arm.inc

@@ -15,9 +15,115 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
  **********************************************************************}
+
+
+{****************************************************************************
+                       stack frame related stuff
+****************************************************************************}
+
+{$define FPC_SYSTEM_HAS_GET_FRAME}
+function get_frame:pointer;assembler;{$ifdef SYSTEMINLINE}inline;{$endif}
+asm
+        mov    r0,fp
+end ['R0'];
+
+
+{$define FPC_SYSTEM_HAS_GET_CALLER_ADDR}
+function get_caller_addr(framebp:pointer):pointer;assembler;{$ifdef SYSTEMINLINE}inline;{$endif}
+asm
+(*!!!!!!
+        movl    framebp,%eax
+        orl     %eax,%eax
+        jz      .Lg_a_null
+        movl    4(%eax),%eax
+.Lg_a_null:
+*)
+end ['R0'];
+
+
+{$define FPC_SYSTEM_HAS_GET_CALLER_FRAME}
+function get_caller_frame(framebp:pointer):pointer;assembler;{$ifdef SYSTEMINLINE}inline;{$endif}
+asm
+(*!!!!!
+        movl    framebp,%eax
+        orl     %eax,%eax
+        jz      .Lgnf_null
+        movl    (%eax),%eax
+.Lgnf_null:
+*)
+end ['R0'];
+
+
+{$define FPC_SYSTEM_HAS_SPTR}
+Function Sptr : Longint;assembler;{$ifdef SYSTEMINLINE}inline;{$endif}
+asm
+        mov    r0,sp
+end ['R0'];
+
+
+{
+{$define FPC_SYSTEM_HAS_FILLCHAR}
+Procedure FillChar(var x;count:longint;value:byte);assembler;
+
+* void *memset (dstpp, c, len) */
+
+asm
+	mov	a4, a1
+	cmp	a2, $8		// at least 8 bytes to do?
+	blt	.Fillchar2
+	orr	a3, a3, a3, lsl $8
+	orr	a3, a3, a3, lsl $16
+.Fillchar0:
+	tst	a4, $3		// aligned yet?
+	strneb	a3, [a4], $1
+	subne	a2, a2, $1
+	bne	.Fillchar0
+	mov	ip, a3
+.Fillchar1:
+	cmp	a2, $8		// 8 bytes still to do?
+	blt	.Fillchar2
+	stmia	a4!, {a3, ip}
+	sub	a2, a2, $8
+	cmp	a2, $8		// 8 bytes still to do?
+	blt	.Fillchar2
+	stmia	a4!, {a3, ip}
+	sub	a2, a2, $8
+	cmp	a2, $8		// 8 bytes still to do?
+	blt	.Fillchar2
+	stmia	a4!, {a3, ip}
+	sub	a2, a2, $8
+	cmp	a2, $8		// 8 bytes still to do?
+	stmgeia	a4!, {a3, ip}
+	subge	a2, a2, $8
+	bge	.Fillchar1
+.Fillchar2:
+	movs	a2, a2		// anything left?
+	RETINSTR(moveq,pc,lr)	// nope
+	rsb	a2, a2, $7
+	add	pc, pc, a2, lsl $2
+	mov	r0, r0
+	strb	a3, [a4], $1
+	strb	a3, [a4], $1
+	strb	a3, [a4], $1
+	strb	a3, [a4], $1
+	strb	a3, [a4], $1
+	strb	a3, [a4], $1
+	strb	a3, [a4], $1
+	RETINSTR(mov,pc,lr)
+end;
+
+}
+
+
+
 {
   $Log$
-  Revision 1.1  2003-08-21 16:41:54  florian
+  Revision 1.2  2003-09-03 14:09:37  florian
+    * arm fixes to the common rtl code
+    * some generic math code fixed
+    * ...
+
+  Revision 1.1  2003/08/21 16:41:54  florian
     * empty dummy files
     + [long|set]jmp implemented
-}
+}

+ 14 - 2
rtl/arm/math.inc

@@ -14,9 +14,21 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
  **********************************************************************}
+
+    {$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];
+
 {
   $Log$
-  Revision 1.1  2003-08-21 16:41:54  florian
+  Revision 1.2  2003-09-03 14:09:37  florian
+    * arm fixes to the common rtl code
+    * some generic math code fixed
+    * ...
+
+  Revision 1.1  2003/08/21 16:41:54  florian
     * empty dummy files
     + [long|set]jmp implemented
-}
+}

+ 7 - 2
rtl/arm/setjump.inc

@@ -18,7 +18,7 @@
 function setjmp(var S : jmp_buf) : longint;assembler;[Public, alias : 'FPC_SETJMP'];
   asm
      stmia   r0,{v1-v6, sl, fp, sp, lr}
-     {!!!! fix me ?}
+     (*!!!! fix me ?*)
   end;
 
 procedure longjmp(var S : jmp_buf;value : longint);assembler;[Public, alias : 'FPC_LONGJMP'];
@@ -32,7 +32,12 @@ procedure longjmp(var S : jmp_buf;value : longint);assembler;[Public, alias : 'F
 
 {
   $Log$
-  Revision 1.1  2003-08-21 16:41:54  florian
+  Revision 1.2  2003-09-03 14:09:37  florian
+    * arm fixes to the common rtl code
+    * some generic math code fixed
+    * ...
+
+  Revision 1.1  2003/08/21 16:41:54  florian
     * empty dummy files
     + [long|set]jmp implemented
 }

+ 50 - 6
rtl/inc/generic.inc

@@ -32,7 +32,7 @@ begin
   if count <= 0 then exit;
   Dec(count);
   for i:=0 to count do
-         bytearray(dest)[i]:=bytearray(source)[i];
+    bytearray(dest)[i]:=bytearray(source)[i];
 end;
 {$endif not FPC_SYSTEM_HAS_MOVE}
 
@@ -568,11 +568,10 @@ begin
   move(s2[1],fpc_shortstr_concat[s1l+1],s2l);
   fpc_shortstr_concat[0]:=chr(s1l+s2l);
 end;
-
 {$endif ndef FPC_SYSTEM_HAS_FPC_SHORTSTR_CONCAT}
 
-{$ifndef FPC_SYSTEM_HAS_FPC_SHORTSTR_APPEND_SHORTSTR}
 
+{$ifndef FPC_SYSTEM_HAS_FPC_SHORTSTR_APPEND_SHORTSTR}
 procedure fpc_shortstr_append_shortstr(var s1:shortstring;const s2:shortstring);{$ifdef hascompilerproc} compilerproc; {$endif}
     [public,alias:'FPC_SHORTSTR_APPEND_SHORTSTR'];
 var
@@ -585,11 +584,10 @@ begin
   move(s2[1],s1[s1l+1],s2l);
   s1[0]:=chr(s1l+s2l);
 end;
-
 {$endif ndef FPC_SYSTEM_HAS_FPC_SHORTSTR_APPEND_SHORTSTR}
 
-{$ifndef FPC_SYSTEM_HAS_FPC_SHORTSTR_COMPARE}
 
+{$ifndef FPC_SYSTEM_HAS_FPC_SHORTSTR_COMPARE}
 function fpc_shortstr_compare(const left,right:shortstring) : longint;[public,alias:'FPC_SHORTSTR_COMPARE']; {$ifdef hascompilerproc} compilerproc; {$endif}
 var
    s1,s2,max,i : byte;
@@ -791,6 +789,47 @@ end;
                                  Math
 ****************************************************************************}
 
+{****************************************************************************
+                          Software longint/dword division
+****************************************************************************}
+{$ifdef FPC_INCLUDE_SOFTWARE_MOD_DIV}
+
+{$ifndef FPC_SYSTEM_HAS_DIV_DWORD}
+function fpc_div_dword(n,z : dword) : dword; [public,alias: 'FPC_DIV_DWORD']; {$ifdef hascompilerproc} compilerproc; {$endif}
+  begin
+    {!!!!}
+  end;
+{$endif FPC_SYSTEM_HAS_DIV_DWORD}
+
+
+{$ifndef FPC_SYSTEM_HAS_MOD_DWORD}
+function fpc_mod_dword(n,z : dword) : dword; [public,alias: 'FPC_MOD_DWORD']; {$ifdef hascompilerproc} compilerproc; {$endif}
+  begin
+    {!!!!}
+  end;
+{$endif FPC_SYSTEM_HAS_MOD_DWORD}
+
+
+{$ifndef FPC_SYSTEM_HAS_DIV_LONGINT}
+function fpc_div_longint(n,z : longint) : longint; [public,alias: 'FPC_DIV_LONGINT']; {$ifdef hascompilerproc} compilerproc; {$endif}
+  begin
+    {!!!!}
+  end;
+{$endif FPC_SYSTEM_HAS_DIV_LONGINT}
+
+
+{$ifndef FPC_SYSTEM_HAS_MOD_LONGINT}
+function fpc_mod_longint(n,z : longint) : longint; [public,alias: 'FPC_MOD_LONGINT']; {$ifdef hascompilerproc} compilerproc; {$endif}
+  begin
+    {!!!!}
+  end;
+{$endif FPC_SYSTEM_HAS_MOD_LONGINT}
+
+{$endif FPC_INCLUDE_SOFTWARE_MOD_DIV}
+
+
+{****************************************************************************}
+
 {$ifndef FPC_SYSTEM_HAS_ABS_LONGINT}
 function abs(l:longint):longint;{$ifdef SYSTEMINLINE}inline;{$endif}[internconst:in_const_abs];
 begin
@@ -975,7 +1014,12 @@ end;
 
 {
   $Log$
-  Revision 1.60  2003-06-01 14:50:17  jonas
+  Revision 1.61  2003-09-03 14:09:37  florian
+    * arm fixes to the common rtl code
+    * some generic math code fixed
+    * ...
+
+  Revision 1.60  2003/06/01 14:50:17  jonas
     * fpc_shortstr_append_shortstr has to use high(s1) instead of 255 as
       maxlen
     + ppc version of fpc_shortstr_append_shortstr

+ 38 - 9
rtl/inc/genmath.inc

@@ -233,7 +233,8 @@ Function float32_to_int32_round_to_zero( a: Float32 ): longint;
  End;
 
 
-    function trunc(d : real) : longint;[internconst:in_const_trunc];
+  {$warning FIX ME !! }
+  function trunc(d : real) : int64;[internconst:in_const_trunc];
     var
      l: longint;
      f32 : float32;
@@ -321,7 +322,7 @@ Function float32_to_int32_round_to_zero( a: Float32 ): longint;
 {$ifndef FPC_SYSTEM_HAS_ABS}
     function fpc_abs_real(d : Real) : Real; compilerproc;
     begin
-       if( d < 0.0 ) then
+       if (d<0.0) then
          fpc_abs_real := -d
       else
          fpc_abs_real := d ;
@@ -600,9 +601,9 @@ Function float32_to_int32_round_to_zero( a: Float32 ): longint;
 {$ifdef hascompilerproc}
     function round(d : Real) : int64;[internconst:in_const_round, external name 'FPC_ROUND'];
 
-    function fpc_round(d : Real) : int64;assembler;[public, alias:'FPC_ROUND'];{$ifdef hascompilerproc}compilerproc;{$endif hascompilerproc}
+    function fpc_round(d : Real) : int64;[public, alias:'FPC_ROUND'];{$ifdef hascompilerproc}compilerproc;{$endif hascompilerproc}
 {$else}
-    function round(d : Real) : int64;assembler;[internconst:in_const_round];
+    function round(d : Real) : int64;[internconst:in_const_round];
 {$endif hascompilerproc}
      var
       fr: Real;
@@ -611,17 +612,17 @@ Function float32_to_int32_round_to_zero( a: Float32 ): longint;
        fr := Frac(d);
        tr := Trunc(d);
        if fr > 0.5 then
-          Round:=Trunc(d)+1
+          result:=Trunc(d)+1
        else
        if fr < 0.5 then
-          Round:=Trunc(d)
+          result:=Trunc(d)
        else { fr = 0.5 }
           { check sign to decide ... }
           { as in Turbo Pascal...    }
           if d >= 0.0 then
-            Round := Trunc(d)+1
+            result:=Trunc(d)+1
           else
-            Round := Trunc(d);
+            result:=Trunc(d);
     end;
 {$endif}
 
@@ -1051,6 +1052,29 @@ Function float32_to_int32_round_to_zero( a: Float32 ): longint;
 {$endif}
 
 
+{$ifdef FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE}
+
+{$ifndef FPC_SYSTEM_HAS_QWORD_TO_DOUBLE}
+function fpc_qword_to_double(q : qword): double; compilerproc;
+  begin
+     result:=dword(q and $ffffffff)+dword(q shr 32)*4294967296.0;
+  end;
+{$endif FPC_SYSTEM_HAS_INT64_TO_DOUBLE}
+
+
+{$ifndef FPC_SYSTEM_HAS_INT64_TO_DOUBLE}
+function fpc_int64_to_double(i : int64): double; compilerproc;
+  begin
+    if i<0 then
+      result:=-double(qword(-i))
+    else
+      result:=qword(i);
+  end;
+{$endif FPC_SYSTEM_HAS_INT64_TO_DOUBLE}
+
+{$endif FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE}
+
+
 {$ifdef SUPPORT_DOUBLE}
 {****************************************************************************
                     Helper routines to support old TP styled reals
@@ -1088,7 +1112,12 @@ Function float32_to_int32_round_to_zero( a: Float32 ): longint;
 
 {
   $Log$
-  Revision 1.14  2003-05-24 13:39:32  jonas
+  Revision 1.15  2003-09-03 14:09:37  florian
+    * arm fixes to the common rtl code
+    * some generic math code fixed
+    * ...
+
+  Revision 1.14  2003/05/24 13:39:32  jonas
     * fsqrt is an optional instruction in the ppc architecture and isn't
       implemented by any current ppc afaik, so use the generic sqrt routine
       instead (adapted so it works with compilerproc)

+ 44 - 1
rtl/inc/int64.inc

@@ -30,6 +30,44 @@
        end;
 {$endif ENDIAN_BIG}
 
+
+{$ifdef  FPC_INCLUDE_SOFTWARE_SHIFT_INT64}
+
+{$ifndef FPC_SYSTEM_HAS_SHL_QWORD}
+    function fpc_shl_qword(value,shift : qword) : qword; [public,alias: 'FPC_SHL_QWORD']; {$ifdef hascompilerproc} compilerproc; {$endif}
+      begin
+        {!!!!}
+      end;
+{$endif FPC_SYSTEM_HAS_SHL_QWORD}
+
+
+{$ifndef FPC_SYSTEM_HAS_SHR_QWORD}
+   function fpc_shr_qword(value,shift : qword) : qword; [public,alias: 'FPC_SHR_QWORD']; {$ifdef hascompilerproc} compilerproc; {$endif}
+      begin
+        {!!!!}
+      end;
+{$endif FPC_SYSTEM_HAS_SHR_QWORD}
+
+
+{$ifndef FPC_SYSTEM_HAS_SHL_INT64}
+    function fpc_shl_int64(value,shift : int64) : int64; [public,alias: 'FPC_SHL_INT64']; {$ifdef hascompilerproc} compilerproc; {$endif}
+      begin
+        {!!!!}
+      end;
+{$endif FPC_SYSTEM_HAS_SHL_INT64}
+
+
+{$ifndef FPC_SYSTEM_HAS_SHR_INT64}
+    function fpc_shr_int64(value,shift : int64) : int64; [public,alias: 'FPC_SHR_INT64']; {$ifdef hascompilerproc} compilerproc; {$endif}
+      begin
+        {!!!!}
+      end;
+{$endif FPC_SYSTEM_HAS_SHR_INT64}
+
+
+{$endif FPC_INCLUDE_SOFTWARE_SHIFT_INT64}
+
+
     function count_leading_zeros(q : qword) : longint;
 
       var
@@ -603,7 +641,12 @@
 
 {
   $Log$
-  Revision 1.20  2003-05-12 11:17:55  florian
+  Revision 1.21  2003-09-03 14:09:37  florian
+    * arm fixes to the common rtl code
+    * some generic math code fixed
+    * ...
+
+  Revision 1.20  2003/05/12 11:17:55  florian
     * fixed my commit, strange, it didn't give any conflicts with Jonas patch
 
   Revision 1.19  2003/05/12 11:16:21  florian

+ 14 - 8
rtl/inc/system.inc

@@ -88,7 +88,6 @@ Procedure Rewrite(var f : TypedFile); [INTERNPROC: In_Rewrite_TypedFile];
   {$ifdef SYSPROCDEFINED}
     {$Error Can't determine processor type !}
   {$endif}
-  {$define ENDIAN_LITTLE}
   {$i i386.inc}  { Case dependent, don't change }
 {$endif cpui386}
 
@@ -96,7 +95,6 @@ Procedure Rewrite(var f : TypedFile); [INTERNPROC: In_Rewrite_TypedFile];
   {$ifdef SYSPROCDEFINED}
     {$Error Can't determine processor type !}
   {$endif}
-  {$define ENDIAN_BIG}
   {$i m68k.inc}  { Case dependent, don't change }
   {$define SYSPROCDEFINED}
 {$endif cpum68k}
@@ -105,7 +103,6 @@ Procedure Rewrite(var f : TypedFile); [INTERNPROC: In_Rewrite_TypedFile];
   {$ifdef SYSPROCDEFINED}
     {$Error Can't determine processor type !}
   {$endif}
-  {$define ENDIAN_LITTLE}
   {$i x86_64.inc}  { Case dependent, don't change }
   {$define SYSPROCDEFINED}
 {$endif cpux86_64}
@@ -114,7 +111,6 @@ Procedure Rewrite(var f : TypedFile); [INTERNPROC: In_Rewrite_TypedFile];
   {$ifdef SYSPROCDEFINED}
     {$Error Can't determine processor type !}
   {$endif}
-  {$define ENDIAN_BIG}
   {$i powerpc.inc}  { Case dependent, don't change }
   {$define SYSPROCDEFINED}
 {$endif cpupowerpc}
@@ -123,7 +119,6 @@ Procedure Rewrite(var f : TypedFile); [INTERNPROC: In_Rewrite_TypedFile];
   {$ifdef SYSPROCDEFINED}
     {$Error Can't determine processor type !}
   {$endif}
-  {$define ENDIAN_BIG}
   {$i alpha.inc}  { Case dependent, don't change }
   {$define SYSPROCDEFINED}
 {$endif cpualpha}
@@ -132,7 +127,6 @@ Procedure Rewrite(var f : TypedFile); [INTERNPROC: In_Rewrite_TypedFile];
   {$ifdef SYSPROCDEFINED}
     {$Error Can't determine processor type !}
   {$endif}
-  {$define ENDIAN_LITTLE}
   {$i ia64.inc}  { Case dependent, don't change }
   {$define SYSPROCDEFINED}
 {$endif cpuiA64}
@@ -141,11 +135,18 @@ Procedure Rewrite(var f : TypedFile); [INTERNPROC: In_Rewrite_TypedFile];
   {$ifdef SYSPROCDEFINED}
     {$Error Can't determine processor type !}
   {$endif}
-  {$define ENDIAN_BIG}
   {$i sparc.inc}  { Case dependent, don't change }
   {$define SYSPROCDEFINED}
 {$endif cpusparc}
 
+{$ifdef cpuarm}
+  {$ifdef SYSPROCDEFINED}
+    {$Error Can't determine processor type !}
+  {$endif}
+  {$i arm.inc}  { Case dependent, don't change }
+  {$define SYSPROCDEFINED}
+{$endif cpuarm}
+
 procedure fillchar(var x;count : longint;value : boolean);{$ifdef SYSTEMINLINE}inline;{$endif}
 begin
   fillchar(x,count,byte(value));
@@ -766,7 +767,12 @@ end;
 
 {
   $Log$
-  Revision 1.41  2003-08-21 22:10:55  olle
+  Revision 1.42  2003-09-03 14:09:37  florian
+    * arm fixes to the common rtl code
+    * some generic math code fixed
+    * ...
+
+  Revision 1.41  2003/08/21 22:10:55  olle
     - removed parameter from fpc_iocheck
     * changed processor compiler directive * to cpu*
 

+ 24 - 1
rtl/inc/systemh.inc

@@ -147,6 +147,24 @@ Type
   PComp = ^Comp;
 {$endif CPUSPARC}
 
+{$ifdef CPUARM}
+  {$define DEFAULT_DOUBLE}
+
+  {$define SUPPORT_SINGLE}
+  {$define SUPPORT_DOUBLE}
+
+  {$define FPC_INCLUDE_SOFTWARE_MOD_DIV}
+  {$define FPC_INCLUDE_SOFTWARE_SHIFT_INT64}
+  {$define FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE}
+
+  ValSInt = Longint;
+  ValUInt = Cardinal;
+  ValReal = Real;
+
+  { Comp type does not exist on fpu }
+  Comp    = int64;
+{$endif CPUARM}
+
 {$ifdef CPU64}
   StrLenInt = Int64;
   SizeInt = Int64;
@@ -672,7 +690,12 @@ const
 
 {
   $Log$
-  Revision 1.70  2003-09-01 20:47:23  peter
+  Revision 1.71  2003-09-03 14:09:37  florian
+    * arm fixes to the common rtl code
+    * some generic math code fixed
+    * ...
+
+  Revision 1.70  2003/09/01 20:47:23  peter
     * pcomp added for sparc
 
   Revision 1.69  2003/05/01 08:05:23  florian

+ 15 - 2
rtl/inc/variant.inc

@@ -67,6 +67,14 @@ Begin
   end;
 End;
 
+function fpc_variant_to_dynarray(const v : variant;typeinfo : pointer) : pointer;compilerproc;
+  begin
+  end;
+  
+function fpc_dynarray_to_variant(const v : variant;typeinfo : pointer) : pointer;compilerproc;
+  begin
+  end;
+
 { ---------------------------------------------------------------------
     Overloaded operators.
   ---------------------------------------------------------------------}
@@ -578,7 +586,12 @@ procedure initvariantmanager;
 
 {
   $Log$
-  Revision 1.12  2002-10-10 19:24:28  florian
+  Revision 1.13  2003-09-03 14:09:37  florian
+    * arm fixes to the common rtl code
+    * some generic math code fixed
+    * ...
+
+  Revision 1.12  2002/10/10 19:24:28  florian
     + write(ln) support for variants added
 
   Revision 1.11  2002/10/09 20:13:26  florian
@@ -602,4 +615,4 @@ procedure initvariantmanager;
   Revision 1.5  2002/09/07 15:07:46  peter
     * old logs removed and tabs fixed
 
-}
+}

+ 18 - 2
rtl/linux/signal.inc

@@ -19,7 +19,7 @@
 Const 			// OS specific parameters for general sigset behaviour
    SIG_MAXSIG      = 1024;	// highest signal version
    wordsinsigset   = 32;	// words in sigset_t
-   ln2bitsinword   = 5;         { 32bit : ln(32)/ln(2)=5 } 
+   ln2bitsinword   = 5;         { 32bit : ln(32)/ln(2)=5 }
 
    ln2bitmask	   = 2 shl ln2bitsinword - 1;
 
@@ -125,6 +125,7 @@ type
   end;
 {$endif cpui386}
 
+
 {$Ifdef cpum68k}
   PSigContextRec = ^SigContextRec;
   SigContextRec = record
@@ -132,12 +133,15 @@ type
   end;
 {$endif cpum68k}
 
+
 {$ifdef cpupowerpc}
   PSigContextRec = ^SigContextRec;
   SigContextRec = record
     { dummy for now PM }
   end;
 {$endif cpupowerpc}
+
+
 {$ifdef cpusparc}
   PSigContextRec = ^SigContextRec;
   SigContextRec = record
@@ -145,6 +149,13 @@ type
   end;
 {$endif cpusparc}
 
+
+{$ifdef cpuarm}
+  PSigContextRec = ^SigContextRec;
+  SigContextRec = record
+    { dummy for now PM }
+  end;
+{$endif cpuarm}
 (*
   PSigInfoRec = ^SigInfoRec;
   SigInfoRec = record
@@ -224,7 +235,12 @@ type
 
 {
   $Log$
-  Revision 1.10  2003-08-21 22:24:52  olle
+  Revision 1.11  2003-09-03 14:09:37  florian
+    * arm fixes to the common rtl code
+    * some generic math code fixed
+    * ...
+
+  Revision 1.10  2003/08/21 22:24:52  olle
     - removed parameter from fpc_iocheck
 
   Revision 1.9  2002/12/24 21:30:20  mazen

+ 28 - 0
rtl/objpas/rtlconst.pp

@@ -0,0 +1,28 @@
+{
+    $Id$
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2003 by Florian Klaempfl
+    member of the Free Pascal development team
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+unit rtlconst;
+
+  interface
+
+  implementation
+
+end.
+{
+  $Log$
+  Revision 1.1  2003-09-03 14:09:37  florian
+    * arm fixes to the common rtl code
+    * some generic math code fixed
+    * ...
+}

+ 28 - 0
rtl/objpas/sysconst.pp

@@ -0,0 +1,28 @@
+{
+    $Id$
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2003 by Florian Klaempfl
+    member of the Free Pascal development team
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+unit sysconst;
+
+  interface
+
+  implementation
+
+end.
+{
+  $Log$
+  Revision 1.1  2003-09-03 14:09:37  florian
+    * arm fixes to the common rtl code
+    * some generic math code fixed
+    * ...
+}

+ 9 - 3
rtl/powerpc/math.inc

@@ -152,7 +152,7 @@ LTruncNoAdd:
         beq    cr0,LTruncPositive
         subfic r4,r4,0
         subfze r3,r3
-LTruncPositive: 
+LTruncPositive:
       end;
 
 
@@ -248,7 +248,7 @@ LRoundNoAdd:
         beq    cr0,LRoundPositive
         subfic r4,r4,0
         subfze r3,r3
-LRoundPositive: 
+LRoundPositive:
       end;
 
 
@@ -342,6 +342,7 @@ LRoundPositive:
                          Int to real helpers
  ****************************************************************************}
 
+{$define FPC_SYSTEM_HAS_INT64_TO_DOUBLE}
 function fpc_int64_to_double(i: int64): double; compilerproc;
 assembler;
 { input: high(i) in r4, low(i) in r3 }
@@ -424,7 +425,12 @@ end;
 
 {
   $Log$
-  Revision 1.27  2003-08-08 22:02:05  olle
+  Revision 1.28  2003-09-03 14:09:37  florian
+    * arm fixes to the common rtl code
+    * some generic math code fixed
+    * ...
+
+  Revision 1.27  2003/08/08 22:02:05  olle
     * small bugfix macos
 
   Revision 1.26  2003/06/14 12:41:08  jonas

+ 7 - 2
rtl/unix/sysunix.inc

@@ -804,7 +804,12 @@ End.
 
 {
   $Log$
-  Revision 1.32  2003-08-21 22:21:00  olle
+  Revision 1.33  2003-09-03 14:09:37  florian
+    * arm fixes to the common rtl code
+    * some generic math code fixed
+    * ...
+
+  Revision 1.32  2003/08/21 22:21:00  olle
     - removed parameter from fpc_iocheck
 
   Revision 1.31  2002/10/14 19:39:17  peter
@@ -847,4 +852,4 @@ End.
   Revision 1.19  2002/03/11 19:10:33  peter
     * Regenerated with updated fpcmake
 
-}
+}

+ 14 - 5
rtl/win32/Makefile.fpc

@@ -14,7 +14,7 @@ units=$(SYSTEMUNIT) systhrds objpas strings \
       sysutils typinfo math varutils variants \
       cpu mmx charset ucomplex getopts \
       wincrt winmouse winevent sockets printer dynlibs \
-      video mouse keyboard types comobj
+      video mouse keyboard types comobj dateutils rtlconst sysconst
 rsts=math varutils typinfo
 
 [require]
@@ -92,10 +92,10 @@ SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
 
 wprt0$(OEXT) : $(PRT0).as
         $(AS) -o wprt0$(OEXT) $(PRT0).as
-        
+
 gprt0$(OEXT) : gprt0.as
         $(AS) -o gprt0$(OEXT) gprt0.as
-        
+
 
 wdllprt0$(OEXT) : wdllprt0.as
         $(AS) -o wdllprt0$(OEXT) wdllprt0.as
@@ -186,12 +186,21 @@ varutils$(PPUEXT) : varutils.pp $(OBJPASDIR)/cvarutil.inc \
                     objpas$(PPUEXT) $(OBJPASDIR)/varutilh.inc
         $(COMPILER) -I$(OBJPASDIR) varutils.pp
 
-types$(PPUEXT) : $(OBJPASDIR/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
+types$(PPUEXT) : $(OBJPASDIR)/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
         $(COMPILER) $(OBJPASDIR)/types.pp
 
 comobj$(PPUEXT) : comobj.pp activex$(PPUEXT) sysutils$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) $(OBJPASDIR)/comobjh.inc $(OBJPASDIR)/comobj.inc
         $(COMPILER) -I$(OBJPASDIR) comobj.pp
 
+rtlconst$(PPUEXT) : $(OBJPASDIR)/rtlconst.pp
+	$(COMPILER) $(OBJPASDIR)/rtlconst.pp
+
+sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp
+	$(COMPILER) $(OBJPASDIR)/sysconst.pp
+
+dateutils$(PPUEXT) : $(OBJPASDIR)/dateutils.pp
+	$(COMPILER) $(OBJPASDIR)/dateutils.pp
+
 #
 # Other system-independent RTL Units
 #
@@ -215,4 +224,4 @@ ucomplex$(PPUEXT) : $(INC)/ucomplex.pp math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
 # Other system-dependent RTL Units
 #
 
-callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT)
+callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT)