Browse Source

* fixes to common code to get the alpha compiler compiled applied

florian 23 years ago
parent
commit
d5f0cbbf2b

+ 6 - 3
compiler/cgbase.pas

@@ -234,7 +234,7 @@ unit cgbase;
     {# From a constant numeric value, return the abstract code generator
     {# From a constant numeric value, return the abstract code generator
        size.
        size.
     }
     }
-    function int_cgsize(const l: aword): tcgsize;
+    function int_cgsize(const l: byte): tcgsize;
 
 
     {# return the inverse condition of opcmp }
     {# return the inverse condition of opcmp }
     function inverse_opcmp(opcmp: topcmp): topcmp;
     function inverse_opcmp(opcmp: topcmp): topcmp;
@@ -594,7 +594,7 @@ implementation
         end;
         end;
       end;
       end;
 
 
-    function int_cgsize(const l: aword): tcgsize;
+    function int_cgsize(const l: byte): tcgsize;
       begin
       begin
         case l of
         case l of
           1 :
           1 :
@@ -654,7 +654,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.29  2002-09-07 19:35:45  florian
+  Revision 1.30  2002-09-30 07:00:44  florian
+    * fixes to common code to get the alpha compiler compiled applied
+
+  Revision 1.29  2002/09/07 19:35:45  florian
     + tcg.direction is used now
     + tcg.direction is used now
 
 
   Revision 1.28  2002/09/07 15:25:01  peter
   Revision 1.28  2002/09/07 15:25:01  peter

+ 5 - 2
compiler/defbase.pas

@@ -1630,7 +1630,7 @@ implementation
                       end;
                       end;
                     recorddef :
                     recorddef :
                       begin
                       begin
-                        { tvarrec -> array of constconst }
+                        { tvarrec -> array of const }
                          if is_array_of_const(def_to) and
                          if is_array_of_const(def_to) and
                             is_equal(def_from,tarraydef(def_to).elementtype.def) then
                             is_equal(def_from,tarraydef(def_to).elementtype.def) then
                           begin
                           begin
@@ -1960,7 +1960,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.13  2002-09-22 14:02:34  carl
+  Revision 1.14  2002-09-30 07:00:44  florian
+    * fixes to common code to get the alpha compiler compiled applied
+
+  Revision 1.13  2002/09/22 14:02:34  carl
     * stack checking cannot be called before system unit is initialized
     * stack checking cannot be called before system unit is initialized
     * MC68020 define
     * MC68020 define
 
 

+ 11 - 3
compiler/fpcdefs.inc

@@ -27,6 +27,10 @@
   {$define USEEXCEPT}
   {$define USEEXCEPT}
 {$endif}
 {$endif}
 
 
+
+{ assume a processor with flags }
+{$define cpuflags}
+
 {$ifdef i386}
 {$ifdef i386}
   {$define x86}
   {$define x86}
 {$else}
 {$else}
@@ -34,14 +38,18 @@
 {$endif i386}
 {$endif i386}
 {$ifdef x86_64}
 {$ifdef x86_64}
   {$define x86}
   {$define x86}
-  {$define 64bit}
+  {$define cpu64bit}
 {$endif x86_64}
 {$endif x86_64}
 {$ifdef alpha}
 {$ifdef alpha}
-  {$define 64bit}
+  {$define cpu64bit}
+  {$undef cpuflags}
 {$endif alpha}
 {$endif alpha}
 {
 {
   $Log$
   $Log$
-  Revision 1.10  2002-09-29 23:19:05  florian
+  Revision 1.11  2002-09-30 07:00:45  florian
+    * fixes to common code to get the alpha compiler compiled applied
+
+  Revision 1.10  2002/09/29 23:19:05  florian
     + added define 64bit
     + added define 64bit
 
 
   Revision 1.9  2002/09/07 15:25:02  peter
   Revision 1.9  2002/09/07 15:25:02  peter

+ 9 - 2
compiler/ncgcal.pas

@@ -68,7 +68,7 @@ implementation
 {$ifdef i386}
 {$ifdef i386}
       cga,
       cga,
 {$endif i386}
 {$endif i386}
-      ncgutil,cgobj,tgobj,regvars,rgobj,rgcpu,cg64f32,cgcpu;
+      ncgutil,cgobj,tgobj,regvars,rgobj,rgcpu,cgcpu;
 
 
 {*****************************************************************************
 {*****************************************************************************
                              TCGCALLPARANODE
                              TCGCALLPARANODE
@@ -433,8 +433,10 @@ implementation
                  (not paramanager.ret_in_param(resulttype.def)) then
                  (not paramanager.ret_in_param(resulttype.def)) then
                begin
                begin
                  include(regs_to_push,accumulator);
                  include(regs_to_push,accumulator);
+{$ifndef cpu64bit}
                  if resulttype.def.size>sizeof(aword) then
                  if resulttype.def.size>sizeof(aword) then
                    include(regs_to_push,accumulatorhigh);
                    include(regs_to_push,accumulatorhigh);
+{$endif cpu64bit}
                end;
                end;
               rg.saveusedregisters(exprasmlist,pushed,regs_to_push);
               rg.saveusedregisters(exprasmlist,pushed,regs_to_push);
 
 
@@ -1186,6 +1188,7 @@ implementation
                     LOC_REGISTER:
                     LOC_REGISTER:
                       begin
                       begin
                          location_reset(location,LOC_REGISTER,cgsize);
                          location_reset(location,LOC_REGISTER,cgsize);
+{$ifndef cpu64bit}
                          if cgsize in [OS_64,OS_S64] then
                          if cgsize in [OS_64,OS_S64] then
                            begin
                            begin
                               cg64.a_reg_alloc(exprasmlist,resultloc.register64);
                               cg64.a_reg_alloc(exprasmlist,resultloc.register64);
@@ -1197,6 +1200,7 @@ implementation
                               cg64.a_load64_reg_reg(exprasmlist,resultloc.register64,location.register64);
                               cg64.a_load64_reg_reg(exprasmlist,resultloc.register64,location.register64);
                            end
                            end
                          else
                          else
+{$endif cpu64bit}
                            begin
                            begin
                               cg.a_reg_alloc(exprasmlist,resultloc.register);
                               cg.a_reg_alloc(exprasmlist,resultloc.register);
                               location.register:=rg.getexplicitregisterint(exprasmlist,resultloc.register);
                               location.register:=rg.getexplicitregisterint(exprasmlist,resultloc.register);
@@ -1488,7 +1492,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.23  2002-09-17 18:54:02  jonas
+  Revision 1.24  2002-09-30 07:00:45  florian
+    * fixes to common code to get the alpha compiler compiled applied
+
+  Revision 1.23  2002/09/17 18:54:02  jonas
     * a_load_reg_reg() now has two size parameters: source and dest. This
     * a_load_reg_reg() now has two size parameters: source and dest. This
       allows some optimizations on architectures that don't encode the
       allows some optimizations on architectures that don't encode the
       register size in the register name.
       register size in the register name.

+ 26 - 14
compiler/ncgflw.pas

@@ -95,7 +95,11 @@ implementation
       nld,ncon,
       nld,ncon,
       ncgutil,
       ncgutil,
       tgobj,rgobj,paramgr,
       tgobj,rgobj,paramgr,
-      regvars,cgobj,cgcpu,cg64f32;
+      regvars,cgobj,cgcpu
+{$ifndef cpu64bit}
+      ,cg64f32
+{$endif cpu64bit}
+      ;
 
 
     const
     const
       EXCEPT_BUF_SIZE = 12;
       EXCEPT_BUF_SIZE = 12;
@@ -492,6 +496,7 @@ implementation
                   case left.location.loc of
                   case left.location.loc of
                     LOC_FPUREGISTER :
                     LOC_FPUREGISTER :
                       goto do_jmp;
                       goto do_jmp;
+{$ifdef cpuflags}
                     LOC_FLAGS :
                     LOC_FLAGS :
                       begin
                       begin
                         cg.a_reg_alloc(exprasmlist,accumulator);
                         cg.a_reg_alloc(exprasmlist,accumulator);
@@ -499,6 +504,7 @@ implementation
                         cg.g_flags2reg(exprasmlist,OS_INT,left.location.resflags,accumulator);
                         cg.g_flags2reg(exprasmlist,OS_INT,left.location.resflags,accumulator);
                         goto do_jmp;
                         goto do_jmp;
                       end;
                       end;
+{$endif cpuflags}
                     LOC_JUMP :
                     LOC_JUMP :
                       begin
                       begin
                         cg.a_reg_alloc(exprasmlist,accumulator);
                         cg.a_reg_alloc(exprasmlist,accumulator);
@@ -533,20 +539,21 @@ implementation
                         cgsize:=def_cgsize(aktprocdef.rettype.def);
                         cgsize:=def_cgsize(aktprocdef.rettype.def);
                         cg.a_reg_alloc(exprasmlist,accumulator);
                         cg.a_reg_alloc(exprasmlist,accumulator);
                         allocated_acc := true;
                         allocated_acc := true;
-                        case cgsize of
-                          OS_64,OS_S64 :
-                            begin
-                              cg.a_reg_alloc(exprasmlist,accumulatorhigh);
-                              allocated_acchigh := true;
-                              cg64.a_load64_loc_reg(exprasmlist,left.location,
-                                  joinreg64(accumulator,accumulatorhigh));
-                            end
-                          else
-                            begin
+{$ifndef cpu64bit}
+
+                        if cgsize in [OS_64,OS_S64] then
+                          begin
+                             cg.a_reg_alloc(exprasmlist,accumulatorhigh);
+                             allocated_acchigh := true;
+                             cg64.a_load64_loc_reg(exprasmlist,left.location,
+                                 joinreg64(accumulator,accumulatorhigh));
+                           end
+                         else
+{$endif cpu64bit}
+                           begin
                               hreg:=rg.makeregsize(accumulator,cgsize);
                               hreg:=rg.makeregsize(accumulator,cgsize);
                               cg.a_load_loc_reg(exprasmlist,left.location,hreg);
                               cg.a_load_loc_reg(exprasmlist,left.location,hreg);
-                            end;
-                        end;
+                           end;
                      end;
                      end;
                   end;
                   end;
 
 
@@ -556,8 +563,10 @@ implementation
                   cg.a_jmp_always(exprasmlist,aktexit2label);
                   cg.a_jmp_always(exprasmlist,aktexit2label);
                   if allocated_acc then
                   if allocated_acc then
                     cg.a_reg_dealloc(exprasmlist,accumulator);
                     cg.a_reg_dealloc(exprasmlist,accumulator);
+{$ifndef cpu64bit}
                   if allocated_acchigh then
                   if allocated_acchigh then
                     cg.a_reg_dealloc(exprasmlist,accumulatorhigh);
                     cg.a_reg_dealloc(exprasmlist,accumulatorhigh);
+{$endif cpu64bit}
 {$ifndef i386}
 {$ifndef i386}
                   if (aktprocdef.rettype.def.deftype = floatdef) then
                   if (aktprocdef.rettype.def.deftype = floatdef) then
                     cg.a_reg_dealloc(exprasmlist,FPU_RESULT_REG);
                     cg.a_reg_dealloc(exprasmlist,FPU_RESULT_REG);
@@ -1238,7 +1247,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.42  2002-09-07 15:25:02  peter
+  Revision 1.43  2002-09-30 07:00:45  florian
+    * fixes to common code to get the alpha compiler compiled applied
+
+  Revision 1.42  2002/09/07 15:25:02  peter
     * old logs removed and tabs fixed
     * old logs removed and tabs fixed
 
 
   Revision 1.41  2002/09/01 18:47:00  peter
   Revision 1.41  2002/09/01 18:47:00  peter

+ 11 - 2
compiler/ncginl.pas

@@ -59,7 +59,11 @@ implementation
       cginfo,cgbase,pass_1,pass_2,
       cginfo,cgbase,pass_1,pass_2,
       cpubase,paramgr,
       cpubase,paramgr,
       nbas,ncon,ncal,ncnv,nld,
       nbas,ncon,ncal,ncnv,nld,
-      tgobj,ncgutil,cgobj,cg64f32,rgobj,rgcpu;
+      tgobj,ncgutil,cgobj,rgobj,rgcpu
+{$ifndef cpu64bit}
+      ,cg64f32
+{$endif cpu64bit}
+      ;
 
 
 
 
 {*****************************************************************************
 {*****************************************************************************
@@ -378,10 +382,12 @@ implementation
             end
             end
            else
            else
              begin
              begin
+{$ifndef cpu64bit}
                if cgsize in [OS_64,OS_S64] then
                if cgsize in [OS_64,OS_S64] then
                  cg64.a_op64_reg_loc(exprasmlist,addsubop[inlinenumber],
                  cg64.a_op64_reg_loc(exprasmlist,addsubop[inlinenumber],
                    joinreg64(hregister,hregisterhi),tcallparanode(left).left.location)
                    joinreg64(hregister,hregisterhi),tcallparanode(left).left.location)
                else
                else
+{$endif cpu64bit}
                  cg.a_op_reg_loc(exprasmlist,addsubop[inlinenumber],
                  cg.a_op_reg_loc(exprasmlist,addsubop[inlinenumber],
                    hregister,tcallparanode(left).left.location);
                    hregister,tcallparanode(left).left.location);
                  location_release(exprasmlist,tcallparanode(tcallparanode(left).right).left.location);
                  location_release(exprasmlist,tcallparanode(tcallparanode(left).right).left.location);
@@ -604,7 +610,10 @@ end.
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.14  2002-09-17 18:54:02  jonas
+  Revision 1.15  2002-09-30 07:00:46  florian
+    * fixes to common code to get the alpha compiler compiled applied
+
+  Revision 1.14  2002/09/17 18:54:02  jonas
     * a_load_reg_reg() now has two size parameters: source and dest. This
     * a_load_reg_reg() now has two size parameters: source and dest. This
       allows some optimizations on architectures that don't encode the
       allows some optimizations on architectures that don't encode the
       register size in the register name.
       register size in the register name.

+ 7 - 2
compiler/ncgld.pas

@@ -58,7 +58,7 @@ implementation
       aasmbase,aasmtai,aasmcpu,regvars,
       aasmbase,aasmtai,aasmcpu,regvars,
       cginfo,cgbase,pass_2,
       cginfo,cgbase,pass_2,
       cpubase,cpuinfo,cpupara,
       cpubase,cpuinfo,cpupara,
-      tgobj,ncgutil,cgobj,cg64f32,rgobj,rgcpu;
+      tgobj,ncgutil,cgobj,rgobj,rgcpu;
 
 
 {*****************************************************************************
 {*****************************************************************************
                              SecondLoad
                              SecondLoad
@@ -653,6 +653,7 @@ implementation
                   cg.a_load_const_loc(exprasmlist,0,left.location);
                   cg.a_load_const_loc(exprasmlist,0,left.location);
                   cg.a_label(exprasmlist,hlabel);
                   cg.a_label(exprasmlist,hlabel);
                 end;
                 end;
+{$ifdef cpuflags}
               LOC_FLAGS :
               LOC_FLAGS :
                 begin
                 begin
                   // this can be a wordbool or longbool too, no?
                   // this can be a wordbool or longbool too, no?
@@ -665,6 +666,7 @@ implementation
                       cg.g_flags2ref(exprasmlist,def_cgsize(left.resulttype.def),right.location.resflags,left.location.reference);
                       cg.g_flags2ref(exprasmlist,def_cgsize(left.resulttype.def),right.location.resflags,left.location.reference);
                     end;
                     end;
                 end;
                 end;
+{$endif cpuflags}
             end;
             end;
 
 
          end;
          end;
@@ -957,7 +959,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.31  2002-09-26 15:02:05  florian
+  Revision 1.32  2002-09-30 07:00:46  florian
+    * fixes to common code to get the alpha compiler compiled applied
+
+  Revision 1.31  2002/09/26 15:02:05  florian
     + support of passing variants to "array of const"
     + support of passing variants to "array of const"
 
 
   Revision 1.30  2002/09/17 18:54:02  jonas
   Revision 1.30  2002/09/17 18:54:02  jonas

+ 31 - 9
compiler/ncgutil.pas

@@ -31,6 +31,9 @@ interface
       cpubase,cpupara,
       cpubase,cpupara,
       aasmbase,aasmtai,aasmcpu,
       aasmbase,aasmtai,aasmcpu,
       cginfo,symbase,symdef,symtype,
       cginfo,symbase,symdef,symtype,
+{$ifndef cpu64bit}
+      cg64f32,
+{$endif cpu64bit}
       rgobj;
       rgobj;
 
 
     type
     type
@@ -101,7 +104,7 @@ implementation
     gdb,
     gdb,
 {$endif GDB}
 {$endif GDB}
     ncon,
     ncon,
-    tgobj,cgobj,cgcpu,cg64f32;
+    tgobj,cgobj,cgcpu;
 
 
 
 
 {*****************************************************************************
 {*****************************************************************************
@@ -194,12 +197,14 @@ implementation
                          location_release(list,p.location);
                          location_release(list,p.location);
                          cg.a_jmp_always(list,falselabel);
                          cg.a_jmp_always(list,falselabel);
                        end;
                        end;
+{$ifdef cpuflags}
                      LOC_FLAGS :
                      LOC_FLAGS :
                        begin
                        begin
                          cg.a_jmp_flags(list,p.location.resflags,
                          cg.a_jmp_flags(list,p.location.resflags,
                            truelabel);
                            truelabel);
                          cg.a_jmp_always(list,falselabel);
                          cg.a_jmp_always(list,falselabel);
                        end;
                        end;
+{$endif cpuflags}
                    end;
                    end;
                 end;
                 end;
            end
            end
@@ -269,8 +274,9 @@ implementation
                                      TLocation
                                      TLocation
 *****************************************************************************}
 *****************************************************************************}
 
 
+{$ifndef cpu64bit}
     { 32-bit version }
     { 32-bit version }
-    procedure location_force_reg32(list: TAAsmoutput;var l:tlocation;dst_size:TCGSize;maybeconst:boolean);
+    procedure location_force(list: TAAsmoutput;var l:tlocation;dst_size:TCGSize;maybeconst:boolean);
       var
       var
         hregister,
         hregister,
         hregisterhi : tregister;
         hregisterhi : tregister;
@@ -418,8 +424,10 @@ implementation
          end;
          end;
      end;
      end;
 
 
+{$else cpu64bit}
+
     { 64-bit version }
     { 64-bit version }
-    procedure location_force_reg64(list: TAAsmoutput;var l:tlocation;dst_size:TCGSize;maybeconst:boolean);
+    procedure location_force(list: TAAsmoutput;var l:tlocation;dst_size:TCGSize;maybeconst:boolean);
       var
       var
         hregister : tregister;
         hregister : tregister;
         hl : tasmlabel;
         hl : tasmlabel;
@@ -434,8 +442,11 @@ implementation
                hregister:=rg.getregisterint(list);
                hregister:=rg.getregisterint(list);
               { load value in low register }
               { load value in low register }
               case l.loc of
               case l.loc of
+{$ifdef cpuflags}
                 LOC_FLAGS :
                 LOC_FLAGS :
                   cg.g_flags2reg(list,OS_INT,l.resflags,hregister);
                   cg.g_flags2reg(list,OS_INT,l.resflags,hregister);
+{$endif cpuflags}
+
                 LOC_JUMP :
                 LOC_JUMP :
                   begin
                   begin
                     cg.a_label(list,truelabel);
                     cg.a_label(list,truelabel);
@@ -472,8 +483,10 @@ implementation
            hregister:=rg.makeregsize(hregister,dst_size);
            hregister:=rg.makeregsize(hregister,dst_size);
            { load value in new register }
            { load value in new register }
            case l.loc of
            case l.loc of
+{$ifdef cpuflags}
              LOC_FLAGS :
              LOC_FLAGS :
                cg.g_flags2reg(list,dst_size,l.resflags,hregister);
                cg.g_flags2reg(list,dst_size,l.resflags,hregister);
+{$endif cpuflags}
              LOC_JUMP :
              LOC_JUMP :
                begin
                begin
                  cg.a_label(list,truelabel);
                  cg.a_label(list,truelabel);
@@ -509,6 +522,7 @@ implementation
            l.register:=hregister;
            l.register:=hregister;
          end;
          end;
      end;
      end;
+{$endif cpu64bit}
 
 
     procedure location_force_reg(list: TAAsmoutput;var l:tlocation;dst_size:TCGSize;maybeconst:boolean);
     procedure location_force_reg(list: TAAsmoutput;var l:tlocation;dst_size:TCGSize;maybeconst:boolean);
       begin
       begin
@@ -518,10 +532,7 @@ implementation
            location_freetemp(list,l);
            location_freetemp(list,l);
            location_release(list,l);
            location_release(list,l);
          end;
          end;
-        if sizeof(aword) < 8 then
-          location_force_reg32(list, l, dst_size, maybeconst)
-        else
-          location_force_reg64(list, l, dst_size, maybeconst);
+        location_force(list, l, dst_size, maybeconst)
       end;
       end;
 
 
 
 
@@ -575,12 +586,14 @@ implementation
            case l.loc of
            case l.loc of
              LOC_REGISTER :
              LOC_REGISTER :
                begin
                begin
+{$ifndef cpu64bit}
                  if l.size in [OS_64,OS_S64] then
                  if l.size in [OS_64,OS_S64] then
                   begin
                   begin
                     tg.GetTemp(exprasmlist,8,tt_normal,s.ref);
                     tg.GetTemp(exprasmlist,8,tt_normal,s.ref);
                     cg64.a_load64_reg_ref(exprasmlist,joinreg64(l.registerlow,l.registerhigh),s.ref);
                     cg64.a_load64_reg_ref(exprasmlist,joinreg64(l.registerlow,l.registerhigh),s.ref);
                   end
                   end
                  else
                  else
+{$endif cpu64bit}
                   begin
                   begin
                     tg.GetTemp(exprasmlist,TCGSize2Size[l.size],tt_normal,s.ref);
                     tg.GetTemp(exprasmlist,TCGSize2Size[l.size],tt_normal,s.ref);
                     cg.a_load_reg_ref(exprasmlist,l.size,l.register,s.ref);
                     cg.a_load_reg_ref(exprasmlist,l.size,l.register,s.ref);
@@ -632,6 +645,7 @@ implementation
         case l.loc of
         case l.loc of
           LOC_REGISTER :
           LOC_REGISTER :
             begin
             begin
+{$ifndef cpu64bit}
               if l.size in [OS_64,OS_S64] then
               if l.size in [OS_64,OS_S64] then
                begin
                begin
                  l.registerlow:=rg.getregisterint(exprasmlist);
                  l.registerlow:=rg.getregisterint(exprasmlist);
@@ -639,6 +653,7 @@ implementation
                  cg64.a_load64_ref_reg(exprasmlist,s.ref,joinreg64(l.registerlow,l.registerhigh));
                  cg64.a_load64_ref_reg(exprasmlist,s.ref,joinreg64(l.registerlow,l.registerhigh));
                end
                end
               else
               else
+{$endif cpu64bit}
                begin
                begin
                  l.register:=rg.getregisterint(exprasmlist);
                  l.register:=rg.getregisterint(exprasmlist);
                  cg.a_load_ref_reg(exprasmlist,OS_INT,s.ref,l.register);
                  cg.a_load_ref_reg(exprasmlist,OS_INT,s.ref,l.register);
@@ -1109,6 +1124,7 @@ implementation
                begin
                begin
                  uses_acc:=true;
                  uses_acc:=true;
                  cg.a_reg_alloc(list,accumulator);
                  cg.a_reg_alloc(list,accumulator);
+{$ifndef cpu64bit}
                  if cgsize in [OS_64,OS_S64] then
                  if cgsize in [OS_64,OS_S64] then
                   begin
                   begin
                     uses_acchi:=true;
                     uses_acchi:=true;
@@ -1116,6 +1132,7 @@ implementation
                     cg64.a_load64_ref_reg(list,href,joinreg64(accumulator,accumulatorhigh));
                     cg64.a_load64_ref_reg(list,href,joinreg64(accumulator,accumulatorhigh));
                   end
                   end
                  else
                  else
+{$endif cpu64bit}
                   begin
                   begin
                     hreg:=rg.makeregsize(accumulator,cgsize);
                     hreg:=rg.makeregsize(accumulator,cgsize);
                     cg.a_load_ref_reg(list,cgsize,href,hreg);
                     cg.a_load_ref_reg(list,cgsize,href,hreg);
@@ -1154,9 +1171,11 @@ implementation
              orddef,
              orddef,
              enumdef :
              enumdef :
                begin
                begin
+{$ifndef cpu64bit}
                  if cgsize in [OS_64,OS_S64] then
                  if cgsize in [OS_64,OS_S64] then
                    cg64.a_load64_reg_ref(list,joinreg64(accumulator,accumulatorhigh),href)
                    cg64.a_load64_reg_ref(list,joinreg64(accumulator,accumulatorhigh),href)
                  else
                  else
+{$endif cpu64bit}
                   begin
                   begin
                     hreg:=rg.makeregsize(accumulator,cgsize);
                     hreg:=rg.makeregsize(accumulator,cgsize);
                     cg.a_load_reg_ref(list,cgsize,hreg,href);
                     cg.a_load_reg_ref(list,cgsize,hreg,href);
@@ -1459,7 +1478,7 @@ implementation
 
 
               { never call stack checking before the standard system unit
               { never call stack checking before the standard system unit
                 has not been initialized
                 has not been initialized
-              }  
+              }
               if (cs_check_stack in aktlocalswitches) and (aktprocdef.proctypeoption<>potype_proginit) then
               if (cs_check_stack in aktlocalswitches) and (aktprocdef.proctypeoption<>potype_proginit) then
                 cg.g_stackcheck(stackalloclist,stackframe);
                 cg.g_stackcheck(stackalloclist,stackframe);
             end;
             end;
@@ -1834,7 +1853,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.51  2002-09-22 14:02:35  carl
+  Revision 1.52  2002-09-30 07:00:46  florian
+    * fixes to common code to get the alpha compiler compiled applied
+
+  Revision 1.51  2002/09/22 14:02:35  carl
     * stack checking cannot be called before system unit is initialized
     * stack checking cannot be called before system unit is initialized
     * MC68020 define
     * MC68020 define
 
 

+ 6 - 3
compiler/ncnv.pas

@@ -943,7 +943,7 @@ implementation
         { remove obsolete type conversions }
         { remove obsolete type conversions }
         if is_equal(left.resulttype.def,resulttype.def) then
         if is_equal(left.resulttype.def,resulttype.def) then
           begin
           begin
-          { becuase is_equal only checks the basetype for sets we need to
+          { because is_equal only checks the basetype for sets we need to
             check here if we are loading a smallset into a normalset }
             check here if we are loading a smallset into a normalset }
             if (resulttype.def.deftype=setdef) and
             if (resulttype.def.deftype=setdef) and
                (left.resulttype.def.deftype=setdef) and
                (left.resulttype.def.deftype=setdef) and
@@ -999,7 +999,7 @@ implementation
                begin
                begin
                  if is_procsym_call(left) then
                  if is_procsym_call(left) then
                   begin
                   begin
-        currprocdef:=Tprocsym(Tcallnode(left).symtableprocentry).search_procdef_byprocvardef(Tprocvardef(resulttype.def));
+                    currprocdef:=Tprocsym(Tcallnode(left).symtableprocentry).search_procdef_byprocvardef(Tprocvardef(resulttype.def));
                     hp:=cloadnode.create_procvar(tprocsym(tcallnode(left).symtableprocentry),
                     hp:=cloadnode.create_procvar(tprocsym(tcallnode(left).symtableprocentry),
                         currprocdef,tcallnode(left).symtableproc);
                         currprocdef,tcallnode(left).symtableproc);
                     if (tcallnode(left).symtableprocentry.owner.symtabletype=objectsymtable) and
                     if (tcallnode(left).symtableprocentry.owner.symtabletype=objectsymtable) and
@@ -2043,7 +2043,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.81  2002-09-16 14:11:13  peter
+  Revision 1.82  2002-09-30 07:00:47  florian
+    * fixes to common code to get the alpha compiler compiled applied
+
+  Revision 1.81  2002/09/16 14:11:13  peter
     * add argument to equal_paras() to support default values or not
     * add argument to equal_paras() to support default values or not
 
 
   Revision 1.80  2002/09/07 20:40:23  carl
   Revision 1.80  2002/09/07 20:40:23  carl

+ 6 - 2
compiler/paramgr.pas

@@ -217,7 +217,7 @@ unit paramgr;
                   result.register64.reglo:=accumulator;
                   result.register64.reglo:=accumulator;
                 end
                 end
                else
                else
-                  result.register:=accumulator;
+               result.register:=accumulator;
              end;
              end;
            floatdef :
            floatdef :
              begin
              begin
@@ -331,7 +331,10 @@ end.
 
 
 {
 {
    $Log$
    $Log$
-   Revision 1.18  2002-09-09 09:10:51  florian
+   Revision 1.19  2002-09-30 07:00:47  florian
+     * fixes to common code to get the alpha compiler compiled applied
+
+   Revision 1.18  2002/09/09 09:10:51  florian
      + added generic tparamanager.getframepointerloc
      + added generic tparamanager.getframepointerloc
 
 
    Revision 1.17  2002/09/07 19:40:39  florian
    Revision 1.17  2002/09/07 19:40:39  florian
@@ -406,3 +409,4 @@ end.
      * start of the new generic parameter handling
      * start of the new generic parameter handling
 }
 }
 
 
+

+ 7 - 4
compiler/pexpr.pas

@@ -667,12 +667,12 @@ implementation
               { generate a methodcallnode or proccallnode }
               { generate a methodcallnode or proccallnode }
               { we shouldn't convert things like @tcollection.load }
               { we shouldn't convert things like @tcollection.load }
               if assigned(getprocvardef) then
               if assigned(getprocvardef) then
-               aprocdef:=Tprocsym(sym).search_procdef_byprocvardef(getprocvardef)
+                aprocdef:=Tprocsym(sym).search_procdef_byprocvardef(getprocvardef)
               else
               else
-               aprocdef:=nil;
+                aprocdef:=nil;
               p2:=cloadnode.create_procvar(sym,aprocdef,st);
               p2:=cloadnode.create_procvar(sym,aprocdef,st);
               if assigned(p1) then
               if assigned(p1) then
-               tloadnode(p2).set_mp(p1);
+                tloadnode(p2).set_mp(p1);
               p1:=p2;
               p1:=p2;
 
 
               { no postfix operators }
               { no postfix operators }
@@ -2254,7 +2254,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.81  2002-09-16 19:06:14  peter
+  Revision 1.82  2002-09-30 07:00:48  florian
+    * fixes to common code to get the alpha compiler compiled applied
+
+  Revision 1.81  2002/09/16 19:06:14  peter
     * allow ^ after nil
     * allow ^ after nil
 
 
   Revision 1.80  2002/09/07 15:25:07  peter
   Revision 1.80  2002/09/07 15:25:07  peter