/* tc-c30.c -- Assembly code for the Texas Instruments TMS320C30
- Copyright 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2006, 2007
Free Software Foundation, Inc.
Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
GAS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
+ the Free Software Foundation; either version 3, or (at your option)
any later version.
GAS is distributed in the hope that it will be useful,
#include "as.h"
#include "safe-ctype.h"
#include "opcode/tic30.h"
-#ifdef ANSI_PROTOTYPES
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
/* Put here all non-digit non-letter characters that may occur in an
operand. */
"first", "second", "third", "fourth", "fifth"
};
-const int md_reloc_size = 0;
-
const char comment_chars[] = ";";
const char line_comment_chars[] = "*";
const char line_separator_chars[] = "";
struct tic30_insn insn;
static int found_parallel_insn;
-static char output_invalid_buf[8];
+static char output_invalid_buf[sizeof (unsigned char) * 2 + 6];
static char *
output_invalid (char c)
{
if (ISPRINT (c))
- sprintf (output_invalid_buf, "'%c'", c);
+ snprintf (output_invalid_buf, sizeof (output_invalid_buf),
+ "'%c'", c);
else
- sprintf (output_invalid_buf, "(0x%x)", (unsigned) c);
+ snprintf (output_invalid_buf, sizeof (output_invalid_buf),
+ "(0x%x)", (unsigned char) c);
return output_invalid_buf;
}