/* tc-mn10200.c -- Assembler code for the Matsushita 10200
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1996-2015 Free Software Foundation, Inc.
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, 51 Franklin Street - Fifth Floor,
Boston, MA 02110-1301, USA. */
-#include <stdio.h>
#include "as.h"
#include "safe-ctype.h"
#include "subsegs.h"
char *
md_atof (int type, char *litp, int *sizep)
{
- int prec;
- LITTLENUM_TYPE words[4];
- char *t;
- int i;
-
- switch (type)
- {
- case 'f':
- prec = 2;
- break;
-
- case 'd':
- prec = 4;
- break;
-
- 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 * 2;
-
- for (i = prec - 1; i >= 0; i--)
- {
- md_number_to_chars (litp, (valueT) words[i], 2);
- litp += 2;
- }
-
- return NULL;
+ return ieee_md_atof (type, litp, sizep, FALSE);
}
void
break;
case 0xff:
opcode = 0xfe;
+ break;
case 0xe8:
opcode = 0xe9;
break;
break;
case 0xff:
opcode = 0xfe;
+ break;
case 0xe8:
opcode = 0xe9;
break;
md_begin (void)
{
char *prev_name = "";
- register const struct mn10200_opcode *op;
+ const struct mn10200_opcode *op;
mn10200_hash = hash_new ();
abort ();
/* Write out the instruction. */
+ dwarf2_emit_insn (0);
if (relaxable && fc > 0)
{
/* On a 64-bit host the size of an 'int' is not the same
for (i = 0; i < fc; i++)
{
const struct mn10200_operand *operand;
+ int reloc_size;
operand = &mn10200_operands[fixups[i].opindex];
if (fixups[i].reloc != BFD_RELOC_UNUSED)
{
reloc_howto_type *reloc_howto;
- int size;
int offset;
fixS *fixP;
if (!reloc_howto)
abort ();
- size = bfd_get_reloc_size (reloc_howto);
+ reloc_size = bfd_get_reloc_size (reloc_howto);
- if (size < 1 || size > 4)
+ if (reloc_size < 1 || reloc_size > 4)
abort ();
- offset = 4 - size;
+ offset = 4 - reloc_size;
fixP = fix_new_exp (frag_now, f - frag_now->fr_literal + offset,
- size,
+ reloc_size,
&fixups[i].exp,
reloc_howto->pc_relative,
fixups[i].reloc);
next instruction, not from the start of the current
instruction. */
if (reloc_howto->pc_relative)
- fixP->fx_offset += size;
+ fixP->fx_offset += reloc_size;
}
else
{
- int reloc, pcrel, reloc_size, offset;
+ int reloc, pcrel, offset;
fixS *fixP;
reloc = BFD_RELOC_NONE;