* config/tc-bfin.c (md_assemble): Bump line counters if there is
authorJie Zhang <jie.zhang@analog.com>
Thu, 3 Sep 2009 16:32:42 +0000 (16:32 +0000)
committerJie Zhang <jie.zhang@analog.com>
Thu, 3 Sep 2009 16:32:42 +0000 (16:32 +0000)
EOL in the instruction.

testsuite/
* gas/bfin/line_number.l, gas/bfin/line_number.s: New test.
* gas/bfin/bfin.exp: Add the new test.

gas/ChangeLog
gas/config/tc-bfin.c
gas/testsuite/ChangeLog
gas/testsuite/gas/bfin/bfin.exp
gas/testsuite/gas/bfin/line_number.l [new file with mode: 0644]
gas/testsuite/gas/bfin/line_number.s [new file with mode: 0644]

index 8ea492817cdf091c2f9093b958a57dfde0af4d6f..254a5fb2bde8cde2179a7fe46d531d0c91010f86 100644 (file)
@@ -1,3 +1,8 @@
+2009-09-03  Jie Zhang  <jie.zhang@analog.com>
+
+       * config/tc-bfin.c (md_assemble): Bump line counters if there is
+       EOL in the instruction.
+
 2009-09-03  Jie Zhang  <jie.zhang@analog.com>
 
        * config/bfin-defs.h (IS_GENREG): Define.
index 958f63da25f1d7a2f2743f26c495251b490d0b76..4a02b6915e4e890174ca675aede1bec91ff00e3f 100644 (file)
@@ -712,6 +712,10 @@ md_assemble (char *line)
 #ifdef OBJ_ELF
   dwarf2_emit_insn (insn_size);
 #endif
+
+  while (*line++ != '\0')
+    if (*line == '\n')
+      bump_line_counters ();
 }
 
 /* Parse one line of instructions, and generate opcode for it.
index 0c8b3e44dbd7a40e17972591f0502cf9c307dfa0..90b55157547d3c037c725ba426c272ff28502d98 100644 (file)
@@ -1,3 +1,8 @@
+2009-09-03  Jie Zhang  <jie.zhang@analog.com>
+
+       * gas/bfin/line_number.l, gas/bfin/line_number.s: New test.
+       * gas/bfin/bfin.exp: Add the new test.
+
 2009-09-03  Jie Zhang  <jie.zhang@analog.com>
 
        * gas/bfin/expected_move_errors.s,
index 59eed655ea922b9a0f803476b6badde4e349f319..7a70a4c29b0fca29fdc1750d11b2b53211d9faec 100644 (file)
@@ -17,6 +17,7 @@ if [istarget bfin*-*-*] {
        run_dump_test "flow"
        run_dump_test "flow2"
        run_list_test "invalid_arith_mode" ""
+       run_list_test "line_number" ""
        run_dump_test "load"
        run_dump_test "logical"
        run_dump_test "logical2"
diff --git a/gas/testsuite/gas/bfin/line_number.l b/gas/testsuite/gas/bfin/line_number.l
new file mode 100644 (file)
index 0000000..964d809
--- /dev/null
@@ -0,0 +1,3 @@
+.*: Assembler messages:
+.*:4: Error: syntax error. Input text was illegal.
+.*:4: Error: 
diff --git a/gas/testsuite/gas/bfin/line_number.s b/gas/testsuite/gas/bfin/line_number.s
new file mode 100644 (file)
index 0000000..a5e47d3
--- /dev/null
@@ -0,0 +1,4 @@
+       R1 = ROT R0 BY 0 ||
+       R3 = [SP+12] ||
+       nop;
+       ILLEGAL;