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 e888c6bcc2ee6a9e2460a8efbe78a77c6b2f84b0..256942fb37d68db63c07508f2321f42deb2c733d 100644 (file)
@@ -1,3 +1,11 @@
+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.
index 9d5a92b83fdaaf165770d3bb377afbcbfa35ede5..339eb7489114ac79e7aa92b049e1d3100cc484a1 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 43b5e7fab215d2405dbcb33a5891741dd7d18cfe..39f37044ed29d83e9fda211812a6902834383ea0 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 0697488c8ac0d9834404ae8c07d6dd55193f289a..2afd5b2036744238d4f33a0a379f7cf75d368ce3 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 2fef2bd5d10327861ff2567afcbdf468d2534e10..6c84fbdb539cf4c6f8569f199c7f74fc8dbb9c89 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 c2c2913552d3313cdb5aee1a3f56cfa5756a20e3..025a85687782e2983b63e2f97497ef8d13529a37 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-*-*]
This page took 0.029071 seconds and 4 git commands to generate.