Browse Source

* fixed powerpc compilation problems

florian 23 years ago
parent
commit
3ec544be88

+ 10 - 11
compiler/ncgmem.pas

@@ -82,6 +82,10 @@ implementation
 {$ifdef delphi}
 {$ifdef delphi}
       sysutils,
       sysutils,
 {$endif}
 {$endif}
+{$ifdef GDB}
+      strings,
+      gdb,
+{$endif GDB}
       globtype,systems,
       globtype,systems,
       cutils,verbose,globals,
       cutils,verbose,globals,
       symconst,symtype,symdef,symsym,symtable,defbase,paramgr,
       symconst,symtype,symdef,symsym,symtable,defbase,paramgr,
@@ -89,17 +93,9 @@ implementation
       cginfo,cgbase,pass_2,
       cginfo,cgbase,pass_2,
       pass_1,nld,ncon,nadd,
       pass_1,nld,ncon,nadd,
       cpubase,
       cpubase,
-      cgobj,tgobj,rgobj,ncgutil,symbase,
-{$ifdef GDB}
-  {$ifdef delphi}
-      sysutils,
-  {$else}
-      strings,
-  {$endif}
-      gdb
-{$endif GDB}
+      cgobj,tgobj,rgobj,ncgutil,symbase
       ;
       ;
-      
+
 
 
 {*****************************************************************************
 {*****************************************************************************
                             TCGLOADNODE
                             TCGLOADNODE
@@ -880,7 +876,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.19  2002-08-10 14:46:29  carl
+  Revision 1.20  2002-08-11 06:14:40  florian
+    * fixed powerpc compilation problems
+
+  Revision 1.19  2002/08/10 14:46:29  carl
     + moved target_cpu_string to cpuinfo
     + moved target_cpu_string to cpuinfo
     * renamed asmmode enum.
     * renamed asmmode enum.
     * assembler reader has now less ifdef's
     * assembler reader has now less ifdef's

+ 5 - 2
compiler/ncgset.pas

@@ -790,7 +790,7 @@ implementation
                 first:=true;
                 first:=true;
                 scratch_reg := cg.get_scratch_reg_int(exprasmlist);
                 scratch_reg := cg.get_scratch_reg_int(exprasmlist);
                 genitem(hp);
                 genitem(hp);
-                cg.free_scratch_reg(exprasmlist);
+                cg.free_scratch_reg(exprasmlist,scratch_reg);
                 cg.a_jmp_always(exprasmlist,elselabel);
                 cg.a_jmp_always(exprasmlist,elselabel);
              end;
              end;
         end;
         end;
@@ -949,7 +949,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.12  2002-08-10 17:15:12  jonas
+  Revision 1.13  2002-08-11 06:14:40  florian
+    * fixed powerpc compilation problems
+
+  Revision 1.12  2002/08/10 17:15:12  jonas
     * optimizations and bugfix
     * optimizations and bugfix
 
 
   Revision 1.11  2002/07/28 09:24:18  carl
   Revision 1.11  2002/07/28 09:24:18  carl

+ 6 - 3
compiler/powerpc/nppcadd.pas

@@ -212,7 +212,7 @@ interface
                 unsigned := not unsigned;
                 unsigned := not unsigned;
 
 
             if (unsigned and
             if (unsigned and
-                (right.location.value) <= high(word)) or
+                ((right.location.value) <= high(word))) or
                (not(unsigned) and
                (not(unsigned) and
                 (longint(right.location.value) >= low(smallint)) and
                 (longint(right.location.value) >= low(smallint)) and
                 (longint(right.location.value) <= high(smallint))) then
                 (longint(right.location.value) <= high(smallint))) then
@@ -1302,7 +1302,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.7  2002-08-10 17:15:31  jonas
+  Revision 1.8  2002-08-11 06:14:40  florian
+    * fixed powerpc compilation problems
+
+  Revision 1.7  2002/08/10 17:15:31  jonas
     * various fixes and optimizations
     * various fixes and optimizations
 
 
   Revision 1.6  2002/08/06 20:55:24  florian
   Revision 1.6  2002/08/06 20:55:24  florian
@@ -1325,4 +1328,4 @@ end.
   Revision 1.1  2002/07/26 12:31:57  jonas
   Revision 1.1  2002/07/26 12:31:57  jonas
     + intial implementation of add nodes, only integer/enumeration/pointer/...
     + intial implementation of add nodes, only integer/enumeration/pointer/...
       handling is finished
       handling is finished
-}
+}

+ 5 - 2
compiler/powerpc/nppccnv.pas

@@ -255,7 +255,7 @@ implementation
            cg.free_scratch_reg(exprasmlist,valuereg);
            cg.free_scratch_reg(exprasmlist,valuereg);
 
 
          tmpfpureg := rg.getregisterfpu(exprasmlist);
          tmpfpureg := rg.getregisterfpu(exprasmlist);
-         a_loadfpu_ref_reg(exprasmlist,OS_F64,tempconst.location.reference,
+         cg.a_loadfpu_ref_reg(exprasmlist,OS_F64,tempconst.location.reference,
            tmpfpureg);
            tmpfpureg);
          tempconst.free;
          tempconst.free;
 
 
@@ -418,7 +418,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.20  2002-08-10 17:15:31  jonas
+  Revision 1.21  2002-08-11 06:14:41  florian
+    * fixed powerpc compilation problems
+
+  Revision 1.20  2002/08/10 17:15:31  jonas
     * various fixes and optimizations
     * various fixes and optimizations
 
 
   Revision 1.19  2002/07/29 21:23:44  florian
   Revision 1.19  2002/07/29 21:23:44  florian

+ 10 - 8
compiler/powerpc/rasm.pas

@@ -30,10 +30,10 @@ Interface
 uses
 uses
   node;
   node;
 
 
-   { 
+   {
      This routine is called to parse the instructions in assembler
      This routine is called to parse the instructions in assembler
      blocks. It returns a complete list of directive and instructions
      blocks. It returns a complete list of directive and instructions
-   }  
+   }
    function assemble: tnode;
    function assemble: tnode;
 
 
 
 
@@ -52,22 +52,24 @@ Implementation
        { pass 1 }
        { pass 1 }
        nbas,
        nbas,
        { parser }
        { parser }
-       scanner,
-       rautils
+       scanner
+       // ,rautils
        ;
        ;
 
 
     function assemble : tnode;
     function assemble : tnode;
      begin
      begin
      end;
      end;
-     
+
 Begin
 Begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.1  2002-08-10 14:52:52  carl
+  Revision 1.2  2002-08-11 06:14:41  florian
+    * fixed powerpc compilation problems
+
+  Revision 1.1  2002/08/10 14:52:52  carl
     + moved target_cpu_string to cpuinfo
     + moved target_cpu_string to cpuinfo
     * renamed asmmode enum.
     * renamed asmmode enum.
     * assembler reader has now less ifdef's
     * assembler reader has now less ifdef's
     * move from nppcmem.pas -> ncgmem.pas vec. node.
     * move from nppcmem.pas -> ncgmem.pas vec. node.
-
-}  
+}