Forráskód Böngészése

* some ideas for mm support implemented

florian 22 éve
szülő
commit
c70c620d9b
3 módosított fájl, 77 hozzáadás és 4 törlés
  1. 6 3
      compiler/i386/n386add.pas
  2. 19 1
      compiler/powerpc/cgcpu.pas
  3. 52 0
      compiler/x86/nx86add.pas

+ 6 - 3
compiler/i386/n386add.pas

@@ -30,7 +30,7 @@ interface
        node,nadd,cpubase;
 
     type
-       ti386addnode = class(taddnode)
+       ti386addnode = class(tx86addnode)
           procedure pass_2;override;
          protected
           function  first_addstring : tnode; override;
@@ -1494,7 +1494,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.83  2003-10-10 17:48:14  peter
+  Revision 1.84  2003-10-13 01:58:03  florian
+    * some ideas for mm support implemented
+
+  Revision 1.83  2003/10/10 17:48:14  peter
     * old trgobj moved to x86/rgcpu and renamed to trgx86fpu
     * tregisteralloctor renamed to trgobj
     * removed rgobj from a lot of units
@@ -1744,4 +1747,4 @@ end.
   Revision 1.29  2002/03/04 19:10:13  peter
     * removed compiler warnings
 
-}
+}

+ 19 - 1
compiler/powerpc/cgcpu.pas

@@ -34,9 +34,24 @@ unit cgcpu;
 
     type
       tcgppc = class(tcg)
+        rgint,
+        rgflags,
+        rgmm,
+        rgfpu : trgcpu;
         procedure init_register_allocators;override;
         procedure done_register_allocators;override;
 
+        function  getintregister(list:Taasmoutput;size:Tcgsize):Tregister;override;
+        function  getaddressregister(list:Taasmoutput):Tregister;override;
+        function  getfpuregister(list:Taasmoutput;size:Tcgsize):Tregister;override;
+        function  getmmregister(list:Taasmoutput;size:Tcgsize):Tregister;override;
+        procedure getexplicitregister(list:Taasmoutput;r:Tregister);override;
+        function  getabtintregister(list:Taasmoutput;size:Tcgsize):Tregister;override;
+        procedure ungetregister(list:Taasmoutput;r:Tregister);override;
+        procedure ungetreference(list:Taasmoutput;const r:Treference);override;
+        procedure allocexplicitregisters(list:Taasmoutput;rt:Tregistertype;r:Tsuperregisterset);override;
+        procedure deallocexplicitregisters(list:Taasmoutput;rt:Tregistertype;r:Tsuperregisterset);override;
+        procedure add_move_instruction(instr:Taicpu);override;
 
         { passing parameters, per default the parameter is pushed }
         { nr gives the number of the parameter (enumerated from   }
@@ -2372,7 +2387,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.128  2003-10-11 16:06:42  florian
+  Revision 1.129  2003-10-13 01:58:04  florian
+    * some ideas for mm support implemented
+
+  Revision 1.128  2003/10/11 16:06:42  florian
     * fixed some MMX<->SSE
     * started to fix ppc, needs an overhaul
     + stabs info improve for spilling, not sure if it works correctly/completly

+ 52 - 0
compiler/x86/nx86add.pas

@@ -0,0 +1,52 @@
+{
+    $Id$
+    Copyright (c) 2000-2002 by Florian Klaempfl
+
+    Common code generation for add nodes on the i386 and x86
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    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.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+{
+Common code generation for add nodes on the i386 and x86
+}
+unit nx86add;
+
+{$i fpcdefs.inc}
+
+  interface
+
+    uses
+       node,nadd,cpubase;
+
+    type
+       tx86addnode = class(taddnode)
+         procedure second_floataddsse;
+       end;
+
+
+  implementation
+
+    procedure tx86addnode.second_floataddsse;
+      begin
+      end;
+
+end.
+{
+  $Log$
+  Revision 1.1  2003-10-13 01:58:04  florian
+    * some ideas for mm support implemented
+}