Răsfoiți Sursa

* fixed size of const parameters in asm readers

peter 25 ani în urmă
părinte
comite
34e840268a

+ 5 - 2
compiler/cg386ld.pas

@@ -178,7 +178,7 @@ implementation
                                      begin
                                         if use_esp_stackframe then
                                           dec(p^.location.reference.offset,
-                                            pvarsym(p^.symtableentry)^.getsize)
+                                            pvarsym(p^.symtableentry)^.getvaluesize)
                                         else
                                           p^.location.reference.offset:=-p^.location.reference.offset;
                                      end;
@@ -1000,7 +1000,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.107  2000-05-14 18:50:35  florian
+  Revision 1.108  2000-05-18 17:05:15  peter
+    * fixed size of const parameters in asm readers
+
+  Revision 1.107  2000/05/14 18:50:35  florian
     + Int64/QWord stuff for array of const added
 
   Revision 1.106  2000/04/03 12:23:02  pierre

+ 6 - 3
compiler/cgai386.pas

@@ -3127,8 +3127,8 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
 
     begin
        if (psym(p)^.typ=varsym) and
-         (pvarsym(p)^.getsize>ls) then
-         ls:=pvarsym(p)^.getsize;
+         (pvarsym(p)^.getvaluesize>ls) then
+         ls:=pvarsym(p)^.getvaluesize;
     end;
 
   procedure alignstack(alist : paasmoutput);
@@ -3968,7 +3968,10 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
 end.
 {
   $Log$
-  Revision 1.103  2000-05-17 11:06:11  pierre
+  Revision 1.104  2000-05-18 17:05:15  peter
+    * fixed size of const parameters in asm readers
+
+  Revision 1.103  2000/05/17 11:06:11  pierre
    add a comment about ENTER and linux
 
   Revision 1.102  2000/05/14 18:49:04  florian

+ 5 - 3
compiler/ra386att.pas

@@ -144,7 +144,6 @@ const
   );
 var
   str2opentry: pstr2opentry;
-  i    : tasmop;
   cond : string[4];
   cnd  : tasmcond;
   len,
@@ -2001,7 +2000,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.78  2000-05-12 21:57:02  pierre
+  Revision 1.79  2000-05-18 17:05:16  peter
+    * fixed size of const parameters in asm readers
+
+  Revision 1.78  2000/05/12 21:57:02  pierre
     + use of a dictionary object
       for faster opcode searching in assembler readers
       implemented by Kovacs Attila Zoltan
@@ -2097,4 +2099,4 @@ end.
     * string constants are now handle correctly and also allowed in
       constant expressions
 
-}
+}

+ 5 - 2
compiler/ra386int.pas

@@ -1833,7 +1833,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.69  2000-05-12 21:57:02  pierre
+  Revision 1.70  2000-05-18 17:05:16  peter
+    * fixed size of const parameters in asm readers
+
+  Revision 1.69  2000/05/12 21:57:02  pierre
     + use of a dictionary object
       for faster opcode searching in assembler readers
       implemented by Kovacs Attila Zoltan
@@ -1947,4 +1950,4 @@ end.
     * string constants are now handle correctly and also allowed in
       constant expressions
 
-}
+}

+ 5 - 2
compiler/rautils.pas

@@ -1512,7 +1512,10 @@ end;
 end.
 {
   $Log$
-  Revision 1.42  2000-05-11 09:56:22  pierre
+  Revision 1.43  2000-05-18 17:05:16  peter
+    * fixed size of const parameters in asm readers
+
+  Revision 1.42  2000/05/11 09:56:22  pierre
     * fixed several compare problems between longints and
       const > $80000000 that are treated as int64 constanst
       by Delphi reported by Kovacs Attila Zoltan
@@ -1593,4 +1596,4 @@ end.
   Revision 1.20  1999/07/29 20:54:06  peter
     * write .size also
 
-}
+}

+ 19 - 5
compiler/symsym.inc

@@ -421,9 +421,11 @@
 
 
     procedure tprocsym.deref;
+{$ifdef DONOTCHAINOPERATORS}
       var
         t    : ttoken;
         last,pd : pprocdef;
+{$endif DONOTCHAINOPERATORS}
       begin
          resolvedef(pdef(definition));
 {$ifdef DONOTCHAINOPERATORS}
@@ -1116,14 +1118,23 @@
 
 
     function tvarsym.getsize : longint;
+      begin
+        if assigned(vartype.def) then
+          getsize:=vartype.def^.size
+        else
+          getsize:=0;
+      end;
+
+
+    function tvarsym.getvaluesize : longint;
       begin
         if assigned(vartype.def) and
            (varspez=vs_value) and
            ((vartype.def^.deftype<>arraydef) or
             (Parraydef(vartype.def)^.highrange>=Parraydef(vartype.def)^.lowrange)) then
-          getsize:=vartype.def^.size
+          getvaluesize:=vartype.def^.size
         else
-          getsize:=0;
+          getvaluesize:=0;
       end;
 
 
@@ -1205,7 +1216,7 @@
              if (vo_is_thread_var in varoptions) then
                l:=4
              else
-               l:=getsize;
+               l:=getvaluesize;
              case owner^.symtabletype of
                stt_exceptsymtable:
                  { can contain only one symbol, address calculated later }
@@ -2151,7 +2162,10 @@
 
 {
   $Log$
-  Revision 1.145  2000-05-03 14:34:05  pierre
+  Revision 1.146  2000-05-18 17:05:17  peter
+    * fixed size of const parameters in asm readers
+
+  Revision 1.145  2000/05/03 14:34:05  pierre
    * fix the unitsym chain
 
   Revision 1.144  2000/04/27 10:06:04  pierre
@@ -2261,4 +2275,4 @@
     * -CX is create smartlink
     * -CD is create dynamic, but does nothing atm.
 
-}
+}

+ 5 - 1
compiler/symsymh.inc

@@ -178,6 +178,7 @@
           function  mangledname : string;virtual;
           procedure insert_in_data;virtual;
           function  getsize : longint;
+          function  getvaluesize : longint;
           function  getpushsize : longint;
 {$ifdef GDB}
           function  stabstring : pchar;virtual;
@@ -318,7 +319,10 @@
 
 {
   $Log$
-  Revision 1.49  2000-05-03 14:34:05  pierre
+  Revision 1.50  2000-05-18 17:05:17  peter
+    * fixed size of const parameters in asm readers
+
+  Revision 1.49  2000/05/03 14:34:05  pierre
    * fix the unitsym chain
 
   Revision 1.48  2000/04/27 10:06:04  pierre