/* tc-mt.c -- Assembler for the Morpho Technologies mt .
- Copyright (C) 2005 Free Software Foundation.
+ Copyright (C) 2005, 2006, 2007 Free Software Foundation.
This file is part of GAS, the GNU Assembler.
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,
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <stdio.h>
#include "as.h"
#include "dwarf2dbg.h"
#include "subsegs.h"
};
/* MT architecture we are using for this output file. */
-static enum mt_architectures mt_arch = ms1_64_001;
+static enum mt_architectures mt_arch = ms1_16_002;
int
md_parse_option (int c ATTRIBUTE_UNUSED, char * arg)
switch (c)
{
case OPTION_MARCH:
- if (strcasecmp (arg, "MS1-64-001") == 0)
+ if (strcmp (arg, "ms1-64-001") == 0)
{
mt_flags = (mt_flags & ~EF_MT_CPU_MASK) | EF_MT_CPU_MRISC;
mt_mach = bfd_mach_ms1;
mt_mach_bitmask = 1 << MACH_MS1;
mt_arch = ms1_64_001;
}
- else if (strcasecmp (arg, "MS1-16-002") == 0)
+ else if (strcmp (arg, "ms1-16-002") == 0)
{
mt_flags = (mt_flags & ~EF_MT_CPU_MASK) | EF_MT_CPU_MRISC;
mt_mach = bfd_mach_ms1;
mt_mach_bitmask = 1 << MACH_MS1;
mt_arch = ms1_16_002;
}
- else if (strcasecmp (arg, "MS1-16-003") == 0)
+ else if (strcmp (arg, "ms1-16-003") == 0)
{
mt_flags = (mt_flags & ~EF_MT_CPU_MASK) | EF_MT_CPU_MRISC2;
mt_mach = bfd_mach_mrisc2;
mt_mach_bitmask = 1 << MACH_MS1_003;
mt_arch = ms1_16_003;
}
- else if (strcasecmp (arg, "MS2") == 0)
+ else if (strcmp (arg, "ms2") == 0)
{
mt_flags = (mt_flags & ~EF_MT_CPU_MASK) | EF_MT_CPU_MS2;
mt_mach = bfd_mach_mrisc2;
md_show_usage (FILE * stream)
{
fprintf (stream, _("MT specific command line options:\n"));
- fprintf (stream, _(" -march=ms1-64-001 allow ms1-64-001 instructions (default) \n"));
- fprintf (stream, _(" -march=ms1-16-002 allow ms1-16-002 instructions \n"));
- fprintf (stream, _(" -march=ms1-16-003 allow ms1-16-003 instructions \n"));
+ fprintf (stream, _(" -march=ms1-64-001 allow ms1-64-001 instructions\n"));
+ fprintf (stream, _(" -march=ms1-16-002 allow ms1-16-002 instructions (default)\n"));
+ fprintf (stream, _(" -march=ms1-16-003 allow ms1-16-003 instructions\n"));
fprintf (stream, _(" -march=ms2 allow ms2 instructions \n"));
- fprintf (stream, _(" -nosched disable scheduling restrictions \n"));
+ fprintf (stream, _(" -nosched disable scheduling restrictions\n"));
}
\f
number_to_chars_bigendian (buf, val, n);
}
-/* Turn a string in input_line_pointer into a floating point constant of type
- type, and store the appropriate bytes in *litP. The number of LITTLENUMS
- emitted is stored in *sizeP . An error message is returned, or NULL on OK. */
-
-/* Equal to MAX_PRECISION in atof-ieee.c. */
-#define MAX_LITTLENUMS 6
-
char *
-md_atof (type, litP, sizeP)
- char type;
- char * litP;
- int * sizeP;
+md_atof (int type, char * litP, int * sizeP)
{
- int prec;
- LITTLENUM_TYPE words [MAX_LITTLENUMS];
- LITTLENUM_TYPE * wordP;
- char * t;
-
- switch (type)
- {
- case 'f':
- case 'F':
- case 's':
- case 'S':
- prec = 2;
- break;
-
- case 'd':
- case 'D':
- case 'r':
- case 'R':
- prec = 4;
- break;
-
- /* FIXME: Some targets allow other format chars for bigger sizes here. */
-
- default:
- * sizeP = 0;
- return _("Bad call to md_atof()");
- }
-
- t = atof_ieee (input_line_pointer, type, words);
- if (t)
- input_line_pointer = t;
- * sizeP = prec * sizeof (LITTLENUM_TYPE);
-
- /* This loops outputs the LITTLENUMs in REVERSE order;
- in accord with the mt endianness. */
- for (wordP = words; prec--;)
- {
- md_number_to_chars (litP, (valueT) (*wordP++), sizeof (LITTLENUM_TYPE));
- litP += sizeof (LITTLENUM_TYPE);
- }
-
- return 0;
+ return ieee_md_atof (type, litP, sizeP, FALSE);
}
/* See whether we need to force a relocation into the output file. */