Browse Source

- removed the hcodegen use in the new cg, use cgbase instead

florian 26 years ago
parent
commit
fa19f0aa09

+ 7 - 1
compiler/cpubase.pas

@@ -693,6 +693,9 @@ type
      symbol      : pasmsymbol;
      offsetfixup : longint;
      options     : trefoptions;
+{$ifdef newcg}
+     alignment   : byte;+
+{$endif newcg}
   end;
 
 {*****************************************************************************
@@ -1091,7 +1094,10 @@ end;
 end.
 {
   $Log$
-  Revision 1.13  1999-09-15 20:35:39  florian
+  Revision 1.14  1999-10-14 14:57:51  florian
+    - removed the hcodegen use in the new cg, use cgbase instead
+
+  Revision 1.13  1999/09/15 20:35:39  florian
     * small fix to operator overloading when in MMX mode
     + the compiler uses now fldz and fld1 if possible
     + some fixes to floating point registers

+ 5 - 2
compiler/daopt386.pas

@@ -1653,7 +1653,7 @@ Begin
   RefInSequence := TmpResult
 End;
 
-Function ArrayRefsEq(const r1, r2: TReference): Boolean;
+Function ArrayRefsEq(const r1, r2: TReference): Boolean;{$ifdef tp}far;{$endif}
 Begin
   ArrayRefsEq := (R1.Offset+R1.OffsetFixup = R2.Offset+R2.OffsetFixup) And
                  (R1.Segment = R2.Segment) And
@@ -2385,7 +2385,10 @@ End.
 
 {
  $Log$
- Revision 1.62  1999-10-07 16:07:35  jonas
+ Revision 1.63  1999-10-14 14:57:52  florian
+   - removed the hcodegen use in the new cg, use cgbase instead
+
+ Revision 1.62  1999/10/07 16:07:35  jonas
    * small bugfix in ArrayRefsEq
 
  Revision 1.61  1999/09/29 13:49:53  jonas

+ 11 - 2
compiler/hcodegen.pas

@@ -22,6 +22,12 @@
 }
 unit hcodegen;
 
+{$ifdef newcg}
+interface
+
+implementation
+{$else newcg}
+
   interface
 
     uses
@@ -363,12 +369,15 @@ implementation
          address:=a;
          typ:=p;
       end;
-
+{$endif newcg}
 end.
 
 {
   $Log$
-  Revision 1.44  1999-10-13 10:42:15  peter
+  Revision 1.45  1999-10-14 14:57:52  florian
+    - removed the hcodegen use in the new cg, use cgbase instead
+
+  Revision 1.44  1999/10/13 10:42:15  peter
     * cgmessagepos functions
 
   Revision 1.43  1999/09/27 23:44:51  peter

+ 10 - 2
compiler/htypechk.pas

@@ -61,7 +61,12 @@ implementation
        cobjects,verbose,globals,
        symconst,
        types,
-       hcodegen;
+{$ifdef newcg}
+       cgbase
+{$else}
+       hcodegen
+{$endif}
+       ;
 
 {****************************************************************************
                              Convert
@@ -714,7 +719,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.40  1999-09-26 21:30:15  peter
+  Revision 1.41  1999-10-14 14:57:52  florian
+    - removed the hcodegen use in the new cg, use cgbase instead
+
+  Revision 1.40  1999/09/26 21:30:15  peter
     + constant pointer support which can happend with typecasting like
       const p=pointer(1)
     * better procvar parsing in typed consts

+ 28 - 1
compiler/new/README

@@ -1,3 +1,12 @@
+$Id$
+
+History
+-------
+
+13th oct 1999              remark about alignment added (FK)
+
+CVS Log see at the end of that file
+
 frame_pointer              contains the register used as frame pointer
 stack_pointer              contains the register used as stack pointer
 self_pointer               contains the register used as self pointer
@@ -47,7 +56,7 @@ and only important for the i386/m68k probably.
 > of any procedure called by the current one (the caller must reserve space
 > for the callee's parameters on it's own stack because you can't push
 > values on the stack in the middle of a procedure (no frame pointer))
-> 
+>
 > Jonas
 
 the parameter passed to g_stackframe_entry contains the size of the all local space which is
@@ -60,3 +69,21 @@ and you have to add extra space to do that.
 
 
 
+Alignment
+---------
+
+The alignment is handled very easily: treference contains a field
+alignment which describes the ensured alignment for the node, possible
+values: 1,2,4,8,16 (1 means unligned). The code generator must update
+that field at the appropriate places and take care of it when
+generating the code
+
+
+CVS Log
+-------
+
+$Log$
+Revision 1.4  1999-10-14 14:57:54  florian
+  - removed the hcodegen use in the new cg, use cgbase instead
+
+

+ 6 - 2
compiler/new/cgbase.pas

@@ -59,7 +59,8 @@ unit cgbase;
           retdef : pdef;
           { return type }
           sym : pprocsym;
-          { symbol of the function }
+          { symbol of the function, and the sym for result variable }
+          resultfuncretsym,
           funcretsym : pfuncretsym;
           { the definition of the proc itself }
           { why was this a pdef only ?? PM    }
@@ -427,7 +428,10 @@ unit cgbase;
 end.
 {
   $Log$
-  Revision 1.10  1999-10-12 21:20:46  florian
+  Revision 1.11  1999-10-14 14:57:54  florian
+    - removed the hcodegen use in the new cg, use cgbase instead
+
+  Revision 1.10  1999/10/12 21:20:46  florian
     * new codegenerator compiles again
 
   Revision 1.9  1999/09/10 18:48:11  florian

+ 5 - 1
compiler/new/powerpc/cpubase.pas

@@ -284,6 +284,7 @@ type
      symaddr     : trefsymaddr;
      offsetfixup : longint;
      options     : trefoptions;
+     alignment   : byte;
   end;
 
 const symaddr2str: array[trefsymaddr] of string[3] = ('','@ha','@l');
@@ -548,7 +549,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.7  1999-09-15 20:35:47  florian
+  Revision 1.8  1999-10-14 14:57:55  florian
+    - removed the hcodegen use in the new cg, use cgbase instead
+
+  Revision 1.7  1999/09/15 20:35:47  florian
     * small fix to operator overloading when in MMX mode
     + the compiler uses now fldz and fld1 if possible
     + some fixes to floating point registers

+ 5 - 2
compiler/new/tgobj.pas

@@ -30,7 +30,7 @@ unit tgobj;
       cpuinfo,
       cpuasm,
       tainst,
-      cobjects,globals,tree,hcodegen,verbose,files,aasm;
+      cobjects,globals,tree,cgbase,verbose,files,aasm;
 
     type
        tregisterset = set of tregister;
@@ -692,7 +692,10 @@ unit tgobj;
 end.
 {
   $Log$
-  Revision 1.7  1999-10-12 21:20:47  florian
+  Revision 1.8  1999-10-14 14:57:54  florian
+    - removed the hcodegen use in the new cg, use cgbase instead
+
+  Revision 1.7  1999/10/12 21:20:47  florian
     * new codegenerator compiles again
 
   Revision 1.6  1999/09/10 18:48:11  florian

+ 9 - 3
compiler/options.pas

@@ -1058,10 +1058,13 @@ begin
   def_symbol('CPU68');
 {$endif}
 {$ifdef ALPHA}
-  def_symbol('ALPHA');
+  def_symbol('CPUALPHA');
 {$endif}
 {$ifdef powerpc}
-  def_symbol('POWERPC');
+  def_symbol('CPUPOWERPC');
+{$endif}
+{$ifdef m68k}
+  def_symbol('CPU68K');
 {$endif}
 
 { get default messagefile }
@@ -1230,7 +1233,10 @@ end;
 end.
 {
   $Log$
-  Revision 1.25  1999-10-13 10:24:49  peter
+  Revision 1.26  1999-10-14 14:57:52  florian
+    - removed the hcodegen use in the new cg, use cgbase instead
+
+  Revision 1.25  1999/10/13 10:24:49  peter
     * dpmi can only be set after reading the options
 
   Revision 1.24  1999/10/03 19:44:41  peter

+ 11 - 2
compiler/pdecl.pas

@@ -69,7 +69,13 @@ unit pdecl;
        ,pbase,ptconst,pexpr,psub,pexports
        { processor specific stuff }
        { codegen }
-       ,hcodegen,hcgdata
+{$ifdef newcg}
+       ,cgbase
+{$else}
+       ,hcodegen
+{$endif}
+
+       ,hcgdata
        ;
 
     const
@@ -2611,7 +2617,10 @@ unit pdecl;
 end.
 {
   $Log$
-  Revision 1.163  1999-10-06 17:39:14  peter
+  Revision 1.164  1999-10-14 14:57:52  florian
+    - removed the hcodegen use in the new cg, use cgbase instead
+
+  Revision 1.163  1999/10/06 17:39:14  peter
     * fixed stabs writting for forward types
 
   Revision 1.162  1999/10/03 19:44:42  peter

+ 10 - 2
compiler/pexpr.pas

@@ -49,7 +49,12 @@ unit pexpr;
        globtype,systems,tokens,
        cobjects,globals,scanner,
        symconst,aasm,
-       hcodegen,types,verbose,strings,
+{$ifdef newcg}
+       cgbase,
+{$else}
+       hcodegen,
+{$endif}
+       types,verbose,strings,
 {$ifndef newcg}
        tccal,
 {$endif newcg}
@@ -2108,7 +2113,10 @@ _LECKKLAMMER : begin
 end.
 {
   $Log$
-  Revision 1.147  1999-09-28 11:03:54  peter
+  Revision 1.148  1999-10-14 14:57:52  florian
+    - removed the hcodegen use in the new cg, use cgbase instead
+
+  Revision 1.147  1999/09/28 11:03:54  peter
     * fixed result access in 'if result = XXX then'
     * fixed const cr=chr(13)
 

+ 11 - 2
compiler/pstatmnt.pas

@@ -41,7 +41,13 @@ unit pstatmnt;
     uses
        globtype,systems,tokens,
        strings,cobjects,globals,files,verbose,
-       symconst,symtable,aasm,pass_1,types,scanner,hcodegen,ppu
+       symconst,symtable,aasm,pass_1,types,scanner,
+{$ifdef newcg}
+       cgbase,
+{$else}
+       hcodegen,
+{$endif}
+       ppu
        ,pbase,pexpr,pdecl,cpubase,cpuasm
 {$ifdef i386}
        ,tgeni386
@@ -1318,7 +1324,10 @@ unit pstatmnt;
 end.
 {
   $Log$
-  Revision 1.103  1999-09-27 23:44:56  peter
+  Revision 1.104  1999-10-14 14:57:54  florian
+    - removed the hcodegen use in the new cg, use cgbase instead
+
+  Revision 1.103  1999/09/27 23:44:56  peter
     * procinfo is now a pointer
     * support for result setting in sub procedure
 

+ 10 - 2
compiler/ptconst.pas

@@ -43,7 +43,12 @@ unit ptconst;
        { processor specific stuff }
        cpubase,
        { codegen }
-       hcodegen,hcgdata;
+{$ifdef newcg}
+       cgbase,
+{$else}
+       hcodegen,
+{$endif}
+       hcgdata;
 
 
     { this procedure reads typed constants }
@@ -740,7 +745,10 @@ unit ptconst;
 end.
 {
   $Log$
-  Revision 1.53  1999-09-26 21:30:20  peter
+  Revision 1.54  1999-10-14 14:57:54  florian
+    - removed the hcodegen use in the new cg, use cgbase instead
+
+  Revision 1.53  1999/09/26 21:30:20  peter
     + constant pointer support which can happend with typecasting like
       const p=pointer(1)
     * better procvar parsing in typed consts