X-Git-Url: https://oss.titaniummirror.com/gitweb?p=msp430-binutils.git;a=blobdiff_plain;f=gas%2Fconfig%2Ftc-crx.c;fp=gas%2Fconfig%2Ftc-crx.c;h=e95aa05f55ea77fa590e2c682e8921af6466078f;hp=08656f976857a2f6a90dbbc94b1d231ab0e58d0d;hb=d5da4f291af551c0b8b79e1d4a9b173d60e5c10e;hpb=7b5ea4fcdf2819e070665ab5610f8b48e3867c10 diff --git a/gas/config/tc-crx.c b/gas/config/tc-crx.c index 08656f9..e95aa05 100644 --- a/gas/config/tc-crx.c +++ b/gas/config/tc-crx.c @@ -1,5 +1,5 @@ /* tc-crx.c -- Assembler code for the CRX CPU core. - Copyright 2004, 2007 Free Software Foundation, Inc. + Copyright 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by Tomer Levi, NSC, Israel. Originally written for GAS 2.12 by Tomer Levi, NSC, Israel. @@ -351,7 +351,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS * fixP) } } - assert ((int) fixP->fx_r_type > 0); + gas_assert ((int) fixP->fx_r_type > 0); reloc->howto = bfd_reloc_type_lookup (stdoutput, fixP->fx_r_type); if (reloc->howto == (reloc_howto_type *) NULL) @@ -362,7 +362,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS * fixP) bfd_get_reloc_code_name (fixP->fx_r_type)); return NULL; } - assert (!fixP->fx_pcrel == !reloc->howto->pc_relative); + gas_assert (!fixP->fx_pcrel == !reloc->howto->pc_relative); return reloc; } @@ -463,58 +463,10 @@ md_show_usage (FILE *stream ATTRIBUTE_UNUSED) return; } -/* 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. */ - 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; - - if (! target_big_endian) - { - for (i = prec - 1; i >= 0; i--) - { - md_number_to_chars (litP, (valueT) words[i], 2); - litP += 2; - } - } - else - { - for (i = 0; i < prec; i++) - { - md_number_to_chars (litP, (valueT) words[i], 2); - litP += 2; - } - } - - return NULL; + return ieee_md_atof (type, litP, sizeP, target_big_endian); } /* Apply a fixS (fixup of an instruction or data that we didn't have @@ -586,7 +538,7 @@ md_begin (void) const char *mnemonic = crx_instruction[i].mnemonic; hashret = hash_insert (crx_inst_hash, mnemonic, - (PTR) &crx_instruction[i]); + (void *) &crx_instruction[i]); if (hashret != NULL && *hashret != '\0') as_fatal (_("Can't hash `%s': %s\n"), crx_instruction[i].mnemonic, @@ -614,7 +566,7 @@ md_begin (void) for (regtab = crx_regtab; regtab < (crx_regtab + NUMREGS); regtab++) { - hashret = hash_insert (reg_hash, regtab->name, (PTR) regtab); + hashret = hash_insert (reg_hash, regtab->name, (void *) regtab); if (hashret) as_fatal (_("Internal Error: Can't hash %s: %s"), regtab->name, @@ -632,7 +584,8 @@ md_begin (void) for (copregtab = crx_copregtab; copregtab < (crx_copregtab + NUMCOPREGS); copregtab++) { - hashret = hash_insert (copreg_hash, copregtab->name, (PTR) copregtab); + hashret = hash_insert (copreg_hash, copregtab->name, + (void *) copregtab); if (hashret) as_fatal (_("Internal Error: Can't hash %s: %s"), copregtab->name,