Browse Source

+ Alignement field added to TParaLocation (=4 as 32 bits archs)

mazen 22 years ago
parent
commit
7668192be0

+ 6 - 8
compiler/powerpc/cpubase.pas

@@ -297,13 +297,8 @@ uses
            LOC_REFERENCE,LOC_REGISTER or LOC_FPUREGISTER
          }
          loc  : TCGLoc;
-         { The stack pointer must be decreased by this value before
-           the parameter is copied to the given destination.
-           This allows to "encode" pushes with tparalocation.
-           On the PowerPC, this field is unsed but it is there
-           because several generic code accesses it.
-         }
-         sp_fixup : longint;
+         {Word alignment on stack 4 --> 32 bit}
+         Alignment:Byte;
          case TCGLoc of
             LOC_REFERENCE : (reference : tparareference);
             LOC_FPUREGISTER, LOC_CFPUREGISTER, LOC_MMREGISTER, LOC_CMMREGISTER,
@@ -730,7 +725,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.69  2003-10-01 20:34:49  peter
+  Revision 1.70  2003-10-08 14:11:36  mazen
+  + Alignement field added to TParaLocation (=4 as 32 bits archs)
+
+  Revision 1.69  2003/10/01 20:34:49  peter
     * procinfo unit contains tprocinfo
     * cginfo renamed to cgbase
     * moved cgmessage to verbose

+ 5 - 1
compiler/powerpc/cpupara.pas

@@ -237,6 +237,7 @@ unit cpupara;
                 end;
               { make sure all alignment bytes are 0 as well }
               fillchar(paraloc,sizeof(paraloc),0);
+              paraloc.Alignment:=4;
               case loc of
                  LOC_REGISTER:
                    begin
@@ -357,7 +358,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.47  2003-10-01 20:34:49  peter
+  Revision 1.48  2003-10-08 14:11:36  mazen
+  + Alignement field added to TParaLocation (=4 as 32 bits archs)
+
+  Revision 1.47  2003/10/01 20:34:49  peter
     * procinfo unit contains tprocinfo
     * cginfo renamed to cgbase
     * moved cgmessage to verbose

+ 6 - 8
compiler/sparc/cpubase.pas

@@ -239,13 +239,8 @@ type
            LOC_REFERENCE,LOC_REGISTER or LOC_FPUREGISTER
          }
          loc  : TCGLoc;
-         { The stack pointer must be decreased by this value before
-           the parameter is copied to the given destination.
-           This allows to "encode" pushes with tparalocation.
-           On the PowerPC, this field is unsed but it is there
-           because several generic code accesses it.
-         }
-         sp_fixup : longint;
+         {Word alignment on stack 4 --> 32 bit}
+         Alignment:Byte;
          case TCGLoc of
             LOC_REFERENCE : (reference : tparareference; low_in_reg: boolean; lowreg : tregister);
             LOC_FPUREGISTER, LOC_CFPUREGISTER, LOC_MMREGISTER, LOC_CMMREGISTER,
@@ -605,7 +600,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.52  2003-10-01 20:34:50  peter
+  Revision 1.53  2003-10-08 14:11:36  mazen
+  + Alignement field added to TParaLocation (=4 as 32 bits archs)
+
+  Revision 1.52  2003/10/01 20:34:50  peter
     * procinfo unit contains tprocinfo
     * cginfo renamed to cgbase
     * moved cgmessage to verbose

+ 6 - 2
compiler/sparc/cpupara.pas

@@ -159,7 +159,8 @@ implementation
         hp:=TParaItem(p.para.First);
         while assigned(hp) do
           begin
-            fillchar(paraloc,sizeof(tparalocation),0);
+            fillchar(paraloc,sizeof(paraloc),0);
+            paraloc.Alignment:=4;
             if push_addr_param(hp.paratyp,hp.paratype.def,p.proccalloption) or (hp.paratyp in [vs_var,vs_out]) then
               paraloc.size:=OS_ADDR
             else
@@ -293,7 +294,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.31  2003-10-01 20:34:50  peter
+  Revision 1.32  2003-10-08 14:11:36  mazen
+  + Alignement field added to TParaLocation (=4 as 32 bits archs)
+
+  Revision 1.31  2003/10/01 20:34:50  peter
     * procinfo unit contains tprocinfo
     * cginfo renamed to cgbase
     * moved cgmessage to verbose