Browse Source

* better line info for asm statements

pierre 27 years ago
parent
commit
9d31c53507
3 changed files with 18 additions and 6 deletions
  1. 5 2
      compiler/ra386att.pas
  2. 8 2
      compiler/ra386dir.pas
  3. 5 2
      compiler/ra386int.pas

+ 5 - 2
compiler/ra386att.pas

@@ -332,9 +332,9 @@ const
      c:=current_scanner^.asmgetchar;
      c:=current_scanner^.asmgetchar;
     { Possiblities for first token in a statement:                }
     { Possiblities for first token in a statement:                }
     {   Local Label, Label, Directive, Prefix or Opcode....       }
     {   Local Label, Label, Directive, Prefix or Opcode....       }
-    current_scanner^.gettokenpos;
     if firsttoken and not (c in [newline,#13,'{',';']) then
     if firsttoken and not (c in [newline,#13,'{',';']) then
     begin
     begin
+      current_scanner^.gettokenpos;
       firsttoken := FALSE;
       firsttoken := FALSE;
       { directive or local labe }
       { directive or local labe }
       if c = '.' then
       if c = '.' then
@@ -3675,7 +3675,10 @@ end.
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.8  1998-08-19 16:07:54  jonas
+  Revision 1.9  1998-08-21 08:45:49  pierre
+    * better line info for asm statements
+
+  Revision 1.8  1998/08/19 16:07:54  jonas
     * changed optimizer switches + cleanup of DestroyRefs in daopt386.pas
     * changed optimizer switches + cleanup of DestroyRefs in daopt386.pas
 
 
   Revision 1.7  1998/08/10 23:57:23  peter
   Revision 1.7  1998/08/10 23:57:23  peter

+ 8 - 2
compiler/ra386dir.pas

@@ -77,10 +77,12 @@ unit Ra386dir;
          code:=new(paasmoutput,init);
          code:=new(paasmoutput,init);
          while not(ende) do
          while not(ende) do
            begin
            begin
-              current_scanner^.gettokenpos;
+              { wrong placement
+              current_scanner^.gettokenpos; }
               case c of
               case c of
                  'A'..'Z','a'..'z','_' : begin
                  'A'..'Z','a'..'z','_' : begin
                       hs:='';
                       hs:='';
+                      current_scanner^.gettokenpos;
                       while ((ord(c)>=ord('A')) and (ord(c)<=ord('Z')))
                       while ((ord(c)>=ord('A')) and (ord(c)<=ord('Z')))
                          or ((ord(c)>=ord('a')) and (ord(c)<=ord('z')))
                          or ((ord(c)>=ord('a')) and (ord(c)<=ord('z')))
                          or ((ord(c)>=ord('0')) and (ord(c)<=ord('9')))
                          or ((ord(c)>=ord('0')) and (ord(c)<=ord('9')))
@@ -224,6 +226,7 @@ unit Ra386dir;
              #26 : Message(scan_f_end_of_file);
              #26 : Message(scan_f_end_of_file);
              else
              else
                begin
                begin
+                 current_scanner^.gettokenpos;
                  inc(byte(s[0]));
                  inc(byte(s[0]));
                  s[length(s)]:=c;
                  s[length(s)]:=c;
                  c:=current_scanner^.asmgetchar;
                  c:=current_scanner^.asmgetchar;
@@ -237,7 +240,10 @@ unit Ra386dir;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.4  1998-07-14 14:46:59  peter
+  Revision 1.5  1998-08-21 08:45:51  pierre
+    * better line info for asm statements
+
+  Revision 1.4  1998/07/14 14:46:59  peter
     * released NEWINPUT
     * released NEWINPUT
 
 
   Revision 1.3  1998/07/07 11:20:08  peter
   Revision 1.3  1998/07/07 11:20:08  peter

+ 5 - 2
compiler/ra386int.pas

@@ -335,9 +335,9 @@ var
       c := current_scanner^.asmgetchar;
       c := current_scanner^.asmgetchar;
     { Possiblities for first token in a statement:                }
     { Possiblities for first token in a statement:                }
     {   Local Label, Label, Directive, Prefix or Opcode....       }
     {   Local Label, Label, Directive, Prefix or Opcode....       }
-    current_scanner^.gettokenpos;
     if firsttoken and not (c in [newline,#13,'{',';']) then
     if firsttoken and not (c in [newline,#13,'{',';']) then
     begin
     begin
+      current_scanner^.gettokenpos;
       firsttoken := FALSE;
       firsttoken := FALSE;
       if c = '@' then
       if c = '@' then
       begin
       begin
@@ -3368,7 +3368,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.4  1998-07-14 14:47:00  peter
+  Revision 1.5  1998-08-21 08:45:53  pierre
+    * better line info for asm statements
+
+  Revision 1.4  1998/07/14 14:47:00  peter
     * released NEWINPUT
     * released NEWINPUT
 
 
   Revision 1.3  1998/07/07 11:20:09  peter
   Revision 1.3  1998/07/07 11:20:09  peter