* config/tc-bfin.c (bfin_start_line_hook): Bump line counters
authorJie Zhang <jie.zhang@analog.com>
Tue, 23 May 2006 06:01:12 +0000 (06:01 +0000)
committerJie Zhang <jie.zhang@analog.com>
Tue, 23 May 2006 06:01:12 +0000 (06:01 +0000)
if needed.

gas/ChangeLog
gas/config/tc-bfin.c

index 073a12836358c94607a6ea200133c1f6735d1d4b..5232ad47ca39cdbd0583fe958a539a5ea29a6c69 100644 (file)
@@ -1,3 +1,8 @@
+2006-05-23  Jie Zhang  <jie.zhang@analog.com>
+
+       * config/tc-bfin.c (bfin_start_line_hook): Bump line counters
+       if needed.
+
 2006-05-23  Jie Zhang  <jie.zhang@analog.com>
 
        * config/bfin-defs.h (bfin_equals): Remove declaration.
index f70a94dc941c667293949db5248b0f26a20555c2..03e733a0de6510ce36f99a38ef9289f5c6a1d90d 100644 (file)
@@ -834,9 +834,14 @@ bfin_start_line_hook ()
   char *c1, *label_name;
   symbolS *line_label;
   char *c = input_line_pointer;
+  int cr_num = 0;
 
   while (ISSPACE (*c))
-    c++;
+    {
+      if (*c == '\n')
+       cr_num++;
+      c++;
+    }
 
   /* Look for Loop_Begin or Loop_End statements.  */
 
@@ -902,6 +907,12 @@ bfin_start_line_hook ()
   c1 = c;
   while (ISALPHA (*c) || ISDIGIT (*c) || *c == '_') c++;
 
+  if (input_line_pointer[-1] == '\n')
+    bump_line_counters ();
+
+  while (cr_num--)
+    bump_line_counters ();
+
   input_line_pointer = c;
   if (maybe_end)
     {
This page took 0.026787 seconds and 4 git commands to generate.