* config/tc-dlx.c (s_proc): Don't use asprintf.
[deliverable/binutils-gdb.git] / gas / config / tc-dlx.c
index 65e4b552f33d1e25efc7e59683a6c592cf1f49df..a629533b93cc4bd1b239f601a4bee98ea5c49a8b 100644 (file)
@@ -1,5 +1,5 @@
-/* tc-ldx.c -- Assemble for the DLX
-   Copyright 2002, 2003, 2004, 2005, 2007, 2009
+/* tc-dlx.c -- Assemble for the DLX
+   Copyright 2002, 2003, 2004, 2005, 2007, 2009, 2010, 2012
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
@@ -21,8 +21,8 @@
 
 /* Initially created by Kuang Hwa Lin, 3/20/2002.  */
 
-#include "safe-ctype.h"
 #include "as.h"
+#include "safe-ctype.h"
 #include "tc-dlx.h"
 #include "opcode/dlx.h"
 
@@ -245,7 +245,12 @@ s_proc (int end_p)
          /* Missing entry point, use function's name with the leading
             char prepended.  */
          if (leading_char)
-           asprintf (&label, "%c%s", leading_char, name);
+           {
+             unsigned len = strlen (name) + 1;
+             label = xmalloc (len + 1);
+             label[0] = leading_char;
+             memcpy (label + 1, name, len);
+           }
          else
            label = name;
        }
@@ -657,7 +662,6 @@ machine_ip (char *str)
   char *s;
   const char *args;
   struct machine_opcode *insn;
-  char *argsStart;
   unsigned long opcode;
   expressionS the_operand;
   expressionS *operand = &the_operand;
@@ -706,7 +710,6 @@ machine_ip (char *str)
       return;
     }
 
-  argsStart = s;
   opcode = insn->opcode;
   memset (&the_insn, '\0', sizeof (the_insn));
   the_insn.reloc = NO_RELOC;
@@ -909,6 +912,8 @@ md_assemble (char *str)
   know (str);
   machine_ip (str);
   toP = frag_more (4);
+  dwarf2_emit_insn (4);
+
   /* Put out the opcode.  */
   md_number_to_chars (toP, the_insn.opcode, 4);
 
This page took 0.040055 seconds and 4 git commands to generate.