Bläddra i källkod

+ first step of variable vmt offset
offset is stored in R_EDI (R_D0)
if objectvmtoffset is defined

pierre 27 år sedan
förälder
incheckning
2312760103
2 ändrade filer med 27 tillägg och 5 borttagningar
  1. 13 2
      rtl/i386/i386.inc
  2. 14 3
      rtl/m68k/m68k.inc

+ 13 - 2
rtl/i386/i386.inc

@@ -159,6 +159,7 @@ asm
      8 VMT-Address
      4 main programm-Addr
      0 %ebp
+     edi contains the vmt position
 }
       { eax isn't touched anywhere, so it doesn't have to reloaded }
         movl    8(%ebp),%eax
@@ -179,7 +180,7 @@ asm
         call    GETMEM
 {$endif}
         popal
-      { Memory size to %esi }
+      { Memory position to %esi }
         movl    (%esi),%esi
         addl    $4,%esp
       { If no memory available : fail() }
@@ -204,7 +205,12 @@ asm
         call    FPC_FILL_OBJECT
         popal
       { set the VMT address for the new created object }
+{$ifdef OBJECTVMTOFFSET}
+      { the offset is in %edi since the calling and has not been changed !! }
+        movl    %eax,(%esi,%edi,1)
+{$else OBJECTVMTOFFSET}
         movl    %eax,(%esi)
+{$endif OBJECTVMTOFFSET}
         orl     %eax,%eax
 .LHC_5:
 end;
@@ -690,7 +696,12 @@ end;
 
 {
   $Log$
-  Revision 1.25  1998-09-28 11:02:34  peter
+  Revision 1.26  1998-10-15 11:35:02  pierre
+   + first step of variable vmt offset
+     offset is stored in R_EDI (R_D0)
+     if objectvmtoffset is defined
+
+  Revision 1.25  1998/09/28 11:02:34  peter
     * added some more $ifdef FPCNAMES
 
   Revision 1.24  1998/09/28 10:23:43  florian

+ 14 - 3
rtl/m68k/m68k.inc

@@ -130,9 +130,9 @@
             jsr FPC_GETMEM
             { Restore all registers in the correct order }
             movem.l (sp)+,d0-a7
-            { Memory size to a5 }
+            { Memory position to a5 }
             move.l (a5),a5
-            add.l  #4,sp
+            addq.l  #4,sp
             { If no memory available : fail() }
             move.l a5,d0
             tst.l  d0         { set flags for a5 }
@@ -162,8 +162,14 @@
             { Restore all registers in the correct order }
             movem.l (sp)+,d0-a7
             { set the VMT address for the new created object }
+{$ifdef OBJECTVMTOFFSET}
+      { the offset is in %edi since the calling and has not been changed !! }
+            move.l 8(a6),d1
+            move.l d1,(a5,d0.l)
+{$else OBJECTVMTOFFSET}
             move.l 8(a6),d0
             move.l d0,(a5)
+{$endif OBJECTVMTOFFSET}
             or.l d0,d0
          @LHC_5:
             rts
@@ -676,7 +682,12 @@ end;
 
 {
   $Log$
-  Revision 1.12  1998-10-13 08:00:06  pierre
+  Revision 1.13  1998-10-15 11:35:03  pierre
+   + first step of variable vmt offset
+     offset is stored in R_EDI (R_D0)
+     if objectvmtoffset is defined
+
+  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