summaryrefslogtreecommitdiff
path: root/gas/config/tc-bfin.c
diff options
context:
space:
mode:
authorJie Zhang <jie.zhang@analog.com>2006-05-23 06:01:12 +0000
committerJie Zhang <jie.zhang@analog.com>2006-05-23 06:01:12 +0000
commit9db51b6b2baf067ca80ebe419b3d7b8fbacb0660 (patch)
tree700e0468d6e7a943120105cc017a2276f0d794eb /gas/config/tc-bfin.c
parentd37b01a730dd2a4af090bb0c45b96fe2d6ae952c (diff)
downloadbinutils-redhat-9db51b6b2baf067ca80ebe419b3d7b8fbacb0660.tar.gz
* config/tc-bfin.c (bfin_start_line_hook): Bump line counters
if needed.
Diffstat (limited to 'gas/config/tc-bfin.c')
-rw-r--r--gas/config/tc-bfin.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gas/config/tc-bfin.c b/gas/config/tc-bfin.c
index f70a94dc94..03e733a0de 100644
--- a/gas/config/tc-bfin.c
+++ b/gas/config/tc-bfin.c
@@ -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)
{