Browse Source

* fixed offset support intel reader, the gotoffset variable was not
always reset
* moved check for local/para to be only used for varsym

peter 25 years ago
parent
commit
f40500579d
2 changed files with 23 additions and 9 deletions
  1. 11 4
      compiler/ra386att.pas
  2. 12 5
      compiler/ra386int.pas

+ 11 - 4
compiler/ra386att.pas

@@ -930,11 +930,13 @@ Begin
                 sym:=srsym;
                 sym:=srsym;
                 if assigned(sym) then
                 if assigned(sym) then
                  begin
                  begin
-                   if sym^.owner^.symtabletype in [localsymtable,parasymtable] then
-                     Message(asmr_e_no_local_or_para_allowed);
                    case srsym^.typ of
                    case srsym^.typ of
                      varsym :
                      varsym :
-                       hs:=pvarsym(srsym)^.mangledname;
+                       begin
+                         if sym^.owner^.symtabletype in [localsymtable,parasymtable] then
+                          Message(asmr_e_no_local_or_para_allowed);
+                         hs:=pvarsym(srsym)^.mangledname;
+                       end;
                      typedconstsym :
                      typedconstsym :
                        hs:=ptypedconstsym(srsym)^.mangledname;
                        hs:=ptypedconstsym(srsym)^.mangledname;
                      procsym :
                      procsym :
@@ -1992,7 +1994,12 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.73  2000-04-04 13:48:44  pierre
+  Revision 1.74  2000-04-29 12:51:33  peter
+    * fixed offset support intel reader, the gotoffset variable was not
+      always reset
+    * moved check for local/para to be only used for varsym
+
+  Revision 1.73  2000/04/04 13:48:44  pierre
     + TOperand.SetCorrectSize virtual method added
     + TOperand.SetCorrectSize virtual method added
       to be able to change the suffix according to the instruction
       to be able to change the suffix according to the instruction
       (FIADD word ptr w need a s as ATT suffix
       (FIADD word ptr w need a s as ATT suffix

+ 12 - 5
compiler/ra386int.pas

@@ -865,11 +865,13 @@ Begin
                 sym:=srsym;
                 sym:=srsym;
                 if assigned(sym) then
                 if assigned(sym) then
                  begin
                  begin
-                   if sym^.owner^.symtabletype in [localsymtable,parasymtable] then
-                     Message(asmr_e_no_local_or_para_allowed);
                    case srsym^.typ of
                    case srsym^.typ of
                      varsym :
                      varsym :
-                       hs:=pvarsym(srsym)^.mangledname;
+                       begin
+                         if sym^.owner^.symtabletype in [localsymtable,parasymtable] then
+                          Message(asmr_e_no_local_or_para_allowed);
+                         hs:=pvarsym(srsym)^.mangledname;
+                       end;
                      typedconstsym :
                      typedconstsym :
                        hs:=ptypedconstsym(srsym)^.mangledname;
                        hs:=ptypedconstsym(srsym)^.mangledname;
                      procsym :
                      procsym :
@@ -1066,8 +1068,8 @@ Begin
                 inc(opr.ref.offset,opr.val);
                 inc(opr.ref.offset,opr.val);
               end;
               end;
              Consume(AS_ID);
              Consume(AS_ID);
-             GotOffset:=false;
            end;
            end;
+          GotOffset:=false;
         end;
         end;
 
 
       AS_PLUS :
       AS_PLUS :
@@ -1814,7 +1816,12 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.63  2000-03-28 22:11:48  pierre
+  Revision 1.64  2000-04-29 12:51:34  peter
+    * fixed offset support intel reader, the gotoffset variable was not
+      always reset
+    * moved check for local/para to be only used for varsym
+
+  Revision 1.63  2000/03/28 22:11:48  pierre
    + add a warning if esi is base and index in object assembler code
    + add a warning if esi is base and index in object assembler code
 
 
   Revision 1.62  2000/03/27 21:18:55  pierre
   Revision 1.62  2000/03/27 21:18:55  pierre