-/* 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.
/* 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"
/* 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;
}
char *s;
const char *args;
struct machine_opcode *insn;
- char *argsStart;
unsigned long opcode;
expressionS the_operand;
expressionS *operand = &the_operand;
return;
}
- argsStart = s;
opcode = insn->opcode;
memset (&the_insn, '\0', sizeof (the_insn));
the_insn.reloc = NO_RELOC;
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);