/* tc-tic54x.c -- Assembly code for the Texas Instruments TMS320C54X
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Contributed by Timothy Wall (twall@cygnus.com)
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,
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* Texas Instruments TMS320C54X machine specific gas.
Written by Timothy Wall (twall@alum.mit.edu).
COFF1 limits section names to 8 characters.
Some of the default behavior changed from COFF1 to COFF2. */
-#include <stdlib.h>
#include <limits.h>
-#include <errno.h>
#include "as.h"
#include "safe-ctype.h"
#include "sb.h"
abfd = bfd_openr (path, NULL);
if (!abfd)
{
- as_bad (_("Can't open macro library file '%s' for reading."), path);
- as_perror ("%s", path);
+ as_bad (_("can't open macro library file '%s' for reading: %s"),
+ path, bfd_errmsg (bfd_get_error ()));
ignore_rest_of_line ();
return;
}
if (beg < 1)
{
as_bad (_("Invalid subscript (use 1 to %d)"),
- strlen (value));
+ (int) strlen (value));
break;
}
if (*input_line_pointer == ',')
if (beg + len > strlen (value))
{
as_bad (_("Invalid length (use 0 to %d"),
- strlen (value) - beg);
+ (int) strlen (value) - beg);
break;
}
}
}
char *
-md_atof (type, literalP, sizeP)
- int type;
- char *literalP;
- int *sizeP;
-{
-#define MAX_LITTLENUMS 2
- LITTLENUM_TYPE words[MAX_LITTLENUMS];
- LITTLENUM_TYPE *word;
- /* Only one precision on the c54x. */
- int prec = 2;
- char *t = atof_ieee (input_line_pointer, type, words);
- if (t)
- input_line_pointer = t;
- *sizeP = 4;
-
+md_atof (int type, char *literalP, int *sizeP)
+{
/* Target data is little-endian, but floats are stored
big-"word"ian. ugh. */
- for (word = words; prec--;)
- {
- md_number_to_chars (literalP, (long) (*word++), sizeof (LITTLENUM_TYPE));
- literalP += sizeof (LITTLENUM_TYPE);
- }
-
- return 0;
+ return ieee_md_atof (type, literalP, sizeP, TRUE);
}
arelent *
If fixp->fx_addsy is non-NULL, we'll have to generate a reloc entry. */
void
-md_apply_fix3 (fixP, valP, seg)
+md_apply_fix (fixP, valP, seg)
fixS *fixP;
valueT * valP;
segT seg ATTRIBUTE_UNUSED;
return 0;
}
-#if defined OBJ_COFF
-
-short
-tc_coff_fix2rtype (fixP)
- fixS *fixP;
-{
- return (fixP->fx_r_type);
-}
-
-#endif /* OBJ_COFF */
-
/* Mostly little-endian, but longwords (4 octets) get MS word stored
first. */