Selaa lähdekoodia

* some bugs related to FPC_ prefix fixed
* problems with pbyte sometimes defined and sometimes not for rttip.inc solved

pierre 27 vuotta sitten
vanhempi
commit
93d5b064b0
3 muutettua tiedostoa jossa 54 lisäystä ja 27 poistoa
  1. 14 10
      rtl/m68k/lowmath.inc
  2. 15 11
      rtl/m68k/m68k.inc
  3. 25 6
      rtl/m68k/rttip.inc

+ 14 - 10
rtl/m68k/lowmath.inc

@@ -42,7 +42,7 @@
 
 
 
-Procedure Single_Norm;Assembler;
+Procedure Single_Norm;[alias : 'FPC_SINGLE_NORM'];Assembler;
 {--------------------------------------------}
 { Low-level routine to normalize single  e   }
 {  IEEE floating point values. Never called  }
@@ -328,7 +328,7 @@ XDEF SINGLE_ADD
    moveq.l #-1,d1
 @alabel15:
    swap    d2                      { put sign into d2 (exponent is in d0)  }
-   jmp     SINGLE_NORM             { leave registers on stack for norm_sf  }
+   jmp     FPC_SINGLE_NORM             { leave registers on stack for norm_sf  }
 end;
 
 
@@ -493,7 +493,7 @@ XDEF SINGLE_MUL
    or.b    #1,d1      { set "sticky bit" if any low-order set      }
 @mlabel9:
    addq.w  #8,sp      { remove accumulator from stack              }
-   jmp     SINGLE_NORM{ (result in d4)                             }
+   jmp     FPC_SINGLE_NORM{ (result in d4)                             }
 
 @mretz:
    addq.w  #8,sp      { release accumulator space                  }
@@ -668,7 +668,7 @@ XDEF SINGLE_DIV
    moveq.l #-1,d1     { prevent tie case                              }
 @dlabel10:
    move.l  d3,d4      { save quotient mantissa                        }
-   jmp     SINGLE_NORM{ (registers on stack removed by norm_sf)       }
+   jmp     FPC_SINGLE_NORM{ (registers on stack removed by norm_sf)       }
 end;
 
 
@@ -785,11 +785,11 @@ XDEF LONG2SINGLE
 @l2slabel1:
    swap     d2           { follow SINGLE_NORM conventions   }
    clr.w    d1           { set rounding = 0                 }
-   jmp      SINGLE_NORM
+   jmp      FPC_SINGLE_NORM
 end;
 
 
-Procedure LongDiv; Assembler;
+Procedure LongDiv; [alias : 'FPC_LONGDIV'];Assembler;
 {--------------------------------------------}
 { Low-level routine to do signed long        }
 { division.                                  }
@@ -898,23 +898,27 @@ XDEF LONGDIV
    move.l      (sp)+,d4
 @zerodiv2:
    move.l      #200,d0
-   jsr         HALT_ERROR { RunError(200)                          }
+   jsr         FPC_HALT_ERROR { RunError(200)                          }
    rts                    { this should never occur...             }
 end;
 
 
-Procedure LongMod;Assembler;
+Procedure LongMod;[alias : 'FPC_LONGMOD'];Assembler;
 { see longdiv for info on calling convention }
 asm
 XDEF LONGMOD
-   jsr     LONGDIV
+   jsr     FPC_LONGDIV
    move.l  d1,d0      { return the remainder in d0 }
    rts
 end;
 
 {
   $Log$
-  Revision 1.3  1998-07-01 14:28:32  carl
+  Revision 1.4  1998-10-13 08:00:04  pierre
+    * some bugs related to FPC_ prefix fixed
+    * problems with pbyte sometimes defined and sometimes not for rttip.inc solved
+
+  Revision 1.3  1998/07/01 14:28:32  carl
     * LONGDIV bugfixed with signed and modulo
     * LONGDIV bugfix when divisor is less then 16 bits
 

+ 15 - 11
rtl/m68k/m68k.inc

@@ -46,7 +46,7 @@
 
 
 
-   Procedure FillChar(var x; count: longint; value: byte);
+   Procedure FillChar(var x;count:longint;value:byte);[public,alias: 'FPC_FILL_OBJECT'];
    begin
      asm
       move.l 8(a6), a0      { destination                   }
@@ -127,7 +127,7 @@
             move.l (a0),-(sp)
             { push method pointer }
             move.l a5,-(sp)
-            jsr GETMEM
+            jsr FPC_GETMEM
             { Restore all registers in the correct order }
             movem.l (sp)+,d0-a7
             { Memory size to a5 }
@@ -158,7 +158,7 @@
             move.l  (a0),-(sp)
             move.l  a5,-(sp)
             {                }
-            jsr  FILLOBJECT
+            jsr  FPC_FILLOBJECT
             { Restore all registers in the correct order }
             movem.l (sp)+,d0-a7
             { set the VMT address for the new created object }
@@ -211,7 +211,7 @@
             move.l d6,a1
             move.l a0,(a1)
             move.l a1,-(sp)
-            jsr    FREEMEM
+            jsr    FPC_FREEMEM
          @LHD_3:
             { Restore all registers in the correct order }
             movem.l (sp)+,d0-a7
@@ -285,7 +285,7 @@
 @co_re:
      move.l   (sp)+,d0
      move.b   #210,d0
-     jsr      HALT_ERROR
+     jsr      FPC_HALT_ERROR
 @end:
      move.l   (sp)+,d0
   end;
@@ -297,10 +297,10 @@
       end;
 
 
-    function get_caller_addr(BP : longint) : longint;
+    function get_caller_addr(framebp:longint):longint;
       begin
          asm
-            move.l BP,a0
+            move.l FRAMEBP,a0
             cmp.l #0,a0
             beq @Lnul_address
             move.l 4(a0),a0
@@ -309,11 +309,11 @@
          end ['a0'];
       end;
 
-    function get_caller_frame(bp : longint) : longint;
+    function get_caller_frame(framebp:longint):longint;
 
       begin
          asm
-            move.l bp,a0
+            move.l FRAMEBP,a0
             cmp.l  #0,a0
             beq    @Lnul_frame
             move.l (a0),a0
@@ -643,7 +643,7 @@ end;
   beq     @reboundend
 @rebounderr:
   move.l  #201,d0
-  jsr     HALT_ERROR
+  jsr     FPC_HALT_ERROR
 @reboundend:
  end;
 
@@ -676,7 +676,11 @@ end;
 
 {
   $Log$
-  Revision 1.11  1998-09-14 10:48:29  peter
+  Revision 1.12  1998-10-13 08:00:06  pierre
+    * some bugs related to FPC_ prefix fixed
+    * problems with pbyte sometimes defined and sometimes not for rttip.inc solved
+
+  Revision 1.11  1998/09/14 10:48:29  peter
     * FPC_ names
     * Heap manager is now system independent
 

+ 25 - 6
rtl/m68k/rttip.inc

@@ -16,8 +16,12 @@
 { Run-Time type information routines - processor dependent part }
 
 
-Procedure Initialize (Data,TypeInfo : pointer);[Alias : 'INITIALIZE'];
+Procedure Initialize (Data,TypeInfo : pointer);[Alias : 'FPC_INITIALIZE'];
 
+{ this definition is sometimes (depending on switches)
+  already defined or not so define it locally to avoid problems PM }
+Type
+    Pbyte = ^Byte;
 Var Temp       : PByte;
     I          : longint;
     Size,Count : longint;
@@ -52,8 +56,12 @@ begin
   end;
 end;
 
-Procedure Finalize (Data,TypeInfo: Pointer);[Alias : 'FINALIZE'];
+Procedure Finalize (Data,TypeInfo: Pointer);[Alias : 'FPC_FINALIZE'];
 
+{ this definition is sometimes (depending on switches)
+  already defined or not so define it locally to avoid problems PM }
+Type
+    Pbyte = ^Byte;
 Var Temp       : PByte;
     I          : longint;
     Size,Count : longint;
@@ -88,8 +96,12 @@ begin
   end;
 end;
 
-Procedure Addref (Data,TypeInfo : Pointer); [alias : 'ADDREF'];
+Procedure Addref (Data,TypeInfo : Pointer); [alias : 'FPC_ADDREF'];
 
+{ this definition is sometimes (depending on switches)
+  already defined or not so define it locally to avoid problems PM }
+Type
+    Pbyte = ^Byte;
 Var Temp       : PByte;
     I          : longint;
     Size,Count : longint;
@@ -124,8 +136,11 @@ begin
   end;
 end;
 
-Procedure DecRef (Data, TypeInfo : Pointer);
-
+Procedure DecRef (Data, TypeInfo : Pointer);[Public,alias : 'FPC_DECREF'];
+{ this definition is sometimes (depending on switches)
+  already defined or not so define it locally to avoid problems PM }
+Type
+    Pbyte = ^Byte;
 Var Temp       : PByte;
     I          : longint;
     Size,Count : longint;
@@ -162,7 +177,11 @@ end;
 
 {
  $Log$
- Revision 1.2  1998-06-08 19:26:53  michael
+ Revision 1.3  1998-10-13 08:00:07  pierre
+   * some bugs related to FPC_ prefix fixed
+   * problems with pbyte sometimes defined and sometimes not for rttip.inc solved
+
+ Revision 1.2  1998/06/08 19:26:53  michael
  + Implemented DecRef
 
  Revision 1.1  1998/06/08 15:32:08  michael