gas/
authorAlan Modra <amodra@gmail.com>
Thu, 10 Sep 2009 14:31:23 +0000 (14:31 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 10 Sep 2009 14:31:23 +0000 (14:31 +0000)
* config/tc-d10v.c: Include dwarf2dbg.h.
(write_long, write_1_short, write_2_short): Call dwarf2_emit_insn.
(d10v_frob_label): New function.
* config/tc-d10v.h (d10v_frob_label): Declare.
(tc_frob_label): Define as d10v_frob_label.
gas/testsuite/
* gas/lns/lns-common-1.s: Use two nops between each .loc.
* gas/lns/lns.exp: Don't exclude d10v.

gas/ChangeLog
gas/config/tc-d10v.c
gas/config/tc-d10v.h
gas/testsuite/ChangeLog
gas/testsuite/gas/lns/lns-common-1.s
gas/testsuite/gas/lns/lns.exp

index e888c6b..256942f 100644 (file)
@@ -1,5 +1,13 @@
 2009-09-10  Alan Modra  <amodra@bigpond.net.au>
 
+       * config/tc-d10v.c: Include dwarf2dbg.h.
+       (write_long, write_1_short, write_2_short): Call dwarf2_emit_insn.
+       (d10v_frob_label): New function.
+       * config/tc-d10v.h (d10v_frob_label): Declare.
+       (tc_frob_label): Define as d10v_frob_label.
+
+2009-09-10  Alan Modra  <amodra@bigpond.net.au>
+
        * config/tc-d30v.c (d30v_frob_label): Call dwarf2_emit_label.
        * config/tc-frv.c (frv_frob_label): Likewise.
 
index 9d5a92b..339eb74 100644 (file)
@@ -1,5 +1,6 @@
 /* tc-d10v.c -- Assembler code for the Mitsubishi D10V
-   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007
+   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006,
+   2007, 2009
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
@@ -24,6 +25,7 @@
 #include "subsegs.h"
 #include "opcode/d10v.h"
 #include "elf/ppc.h"
+#include "dwarf2dbg.h"
 
 const char comment_chars[]        = ";";
 const char line_comment_chars[]   = "#";
@@ -610,6 +612,7 @@ write_long (unsigned long insn, Fixups *fx)
   int i, where;
   char *f = frag_more (4);
 
+  dwarf2_emit_insn (4);
   insn |= FM11;
   number_to_chars_bigendian (f, insn, 4);
 
@@ -645,6 +648,7 @@ write_1_short (struct d10v_opcode *opcode,
   char *f = frag_more (4);
   int i, where;
 
+  dwarf2_emit_insn (4);
   if (opcode->exec_type & PARONLY)
     as_fatal (_("Instruction must be executed in parallel with another instruction."));
 
@@ -1059,6 +1063,7 @@ write_2_short (struct d10v_opcode *opcode1,
     }
 
   f = frag_more (4);
+  dwarf2_emit_insn (4);
   number_to_chars_bigendian (f, insn, 4);
 
   /* Process fixup chains.  fx refers to insn2 when j == 0, and to
@@ -1626,6 +1631,15 @@ d10v_cleanup (void)
   return 1;
 }
 
+void
+d10v_frob_label (symbolS *lab)
+{
+  d10v_cleanup ();
+  symbol_set_frag (lab, frag_now);
+  S_SET_VALUE (lab, (valueT) frag_now_fix ());
+  dwarf2_emit_label (lab);
+}
+
 /* Like normal .word, except support @word.
    Clobbers input_line_pointer, checks end-of-line.  */
 
index 43b5e7f..39f3704 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-d10v.h -- Header file for tc-d10v.c.
-   Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2007
+   Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2007, 2009
    Free Software Foundation, Inc.
    Written by Martin Hunt, Cygnus Support.
 
@@ -46,17 +46,11 @@ long md_pcrel_from_section (struct fix *, segT);
 #define md_number_to_chars          number_to_chars_bigendian
 
 int d10v_cleanup (void);
+void d10v_frob_label (symbolS *);
 #define md_after_pass_hook()        d10v_cleanup ()
 #define md_cleanup()                d10v_cleanup ()
 #define md_do_align(a,b,c,d,e)      d10v_cleanup ()
-#define tc_frob_label(sym)                             \
-  do                                                   \
-    {                                                  \
-      d10v_cleanup ();                                 \
-      symbol_set_frag (sym, frag_now);                 \
-      S_SET_VALUE (sym, (valueT) frag_now_fix ());     \
-    }                                                  \
-  while (0)
+#define tc_frob_label(sym)          d10v_frob_label (sym)
 
 #define tc_fix_adjustable(FIX) d10v_fix_adjustable(FIX)
 bfd_boolean d10v_fix_adjustable (struct fix *);
index 0697488..2afd5b2 100644 (file)
@@ -1,3 +1,8 @@
+2009-09-11  Alan Modra  <amodra@bigpond.net.au>
+
+       * gas/lns/lns-common-1.s: Use two nops between each .loc.
+       * gas/lns/lns.exp: Don't exclude d10v.
+
 2009-09-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
 
        * gas/sh/sh64/syntax-1.s: Regenerate.
index 2fef2bd..6c84fbd 100644 (file)
@@ -1,17 +1,25 @@
        .file 1 "foo.c"
        .loc 1 1
        nop
+       nop
        .loc 1 2 3
        nop
+       nop
        .loc 1 3 prologue_end
        nop
+       nop
        .loc 1 4 0 epilogue_begin
        nop
+       nop
        .loc 1 5 isa 1 basic_block
        nop
+       nop
        .loc 1 6 is_stmt 0
        nop
+       nop
        .loc 1 7 is_stmt 1
        nop
+       nop
        .loc 1 7 discriminator 1
        nop
+       nop
index c2c2913..025a856 100644 (file)
@@ -3,21 +3,13 @@ if ![is_elf_format] then {
 }
 
 run_list_test "lns-diag-1" ""
-
-# Does not work on targets that do not generate line number
-# information (d10v).
-if {![istarget d10v-*-*]} {
-    run_dump_test "lns-duplicate"
-}
+run_dump_test "lns-duplicate"
 
 # ??? Won't work on targets that don't have a bare "nop" insn.
 # Perhaps we could arrange for an include file or something that
 # defined a macro...
-# Nor does it work on targets that do not generate line number
-# information (d10v).
 if {
-        ![istarget d10v-*-*]
-     && ![istarget i370-*-*]
+        ![istarget i370-*-*]
      && ![istarget i960-*-*]
      && ![istarget mcore-*-*]
      && ![istarget or32-*-*]