X-Git-Url: https://oss.titaniummirror.com/gitweb?p=msp430-binutils.git;a=blobdiff_plain;f=gas%2Fconfig%2Ftc-maxq.c;fp=gas%2Fconfig%2Ftc-maxq.c;h=cd4dd42743458109f7df5f3f65fab6790dbe8277;hp=4cf72ebdd93a8093d2825b32c3ceca94b7268186;hb=88750007d7869f178f0ba528f41efd3b74c424cf;hpb=6df9443a374e2b81278c61b8afc0a1eef7db280b diff --git a/gas/config/tc-maxq.c b/gas/config/tc-maxq.c index 4cf72eb..cd4dd42 100644 --- a/gas/config/tc-maxq.c +++ b/gas/config/tc-maxq.c @@ -1,6 +1,6 @@ /* tc-maxq.c -- assembler code for a MAXQ chip. - Copyright 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + Copyright 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by HCL Technologies Pvt. Ltd. @@ -276,7 +276,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp) /* Set howto to a garbage value so that we can keep going. */ rel->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_32); - assert (rel->howto != NULL); + gas_assert (rel->howto != NULL); } return rel; @@ -379,51 +379,13 @@ md_estimate_size_before_relax (fragS *fragP, segT segment) return 0; } -/* Equal to MAX_PRECISION in atof-ieee.c */ -#define MAX_LITTLENUMS 6 - -/* 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 = 2; - /* The size of Double has been changed to 2 words ie 32 bits. */ - /* 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; + if (type == 'd') + /* The size of Double has been changed to 2 words ie 32 bits. */ + type = 'f'; + return ieee_md_atof (type, litP, sizeP, FALSE); } void @@ -2882,7 +2844,7 @@ md_begin (void) { hash_err = hash_insert (op_hash, (optab - 1)->name, - (PTR) core_optab); + (void *) core_optab); } } else if (max_version == bfd_mach_maxq20) @@ -2892,7 +2854,7 @@ md_begin (void) #endif hash_err = hash_insert (op_hash, (optab - 1)->name, - (PTR) core_optab); + (void *) core_optab); #if MAXQ10S } } @@ -2922,7 +2884,7 @@ md_begin (void) { case bfd_mach_maxq10: if ((reg_tab->arch == MAXQ10) || (reg_tab->arch == MAX)) - hash_err = hash_insert (reg_hash, reg_tab->reg_name, (PTR) reg_tab); + hash_err = hash_insert (reg_hash, reg_tab->reg_name, (void *) reg_tab); break; case bfd_mach_maxq20: @@ -2930,7 +2892,7 @@ md_begin (void) { #endif hash_err = - hash_insert (reg_hash, reg_tab->reg_name, (PTR) reg_tab); + hash_insert (reg_hash, reg_tab->reg_name, (void *) reg_tab); #if MAXQ10S } break; @@ -2948,7 +2910,7 @@ md_begin (void) for (reg_tab = new_reg_table; reg_tab < (new_reg_table + num_of_reg - 1); reg_tab++) { - hash_err = hash_insert (reg_hash, reg_tab->reg_name, (PTR) reg_tab); + hash_err = hash_insert (reg_hash, reg_tab->reg_name, (void *) reg_tab); if (hash_err) as_fatal (_("Internal Error : Can't Hash %s : %s"), @@ -2962,7 +2924,7 @@ md_begin (void) memtab < mem_table + ARRAY_SIZE (mem_table); memtab++) { - hash_err = hash_insert (mem_hash, memtab->name, (PTR) memtab); + hash_err = hash_insert (mem_hash, memtab->name, (void *) memtab); if (hash_err) as_fatal (_("Internal Error : Can't Hash %s : %s"), memtab->name, hash_err); @@ -2974,7 +2936,7 @@ md_begin (void) bittab < bit_table + ARRAY_SIZE (bit_table); bittab++) { - hash_err = hash_insert (bit_hash, bittab->name, (PTR) bittab); + hash_err = hash_insert (bit_hash, bittab->name, (void *) bittab); if (hash_err) as_fatal (_("Internal Error : Can't Hash %s : %s"), bittab->name, hash_err); @@ -2987,7 +2949,7 @@ md_begin (void) memsyntab++) { hash_err = - hash_insert (mem_syntax_hash, memsyntab->name, (PTR) memsyntab); + hash_insert (mem_syntax_hash, memsyntab->name, (void *) memsyntab); if (hash_err) as_fatal (_("Internal Error : Can't Hash %s : %s"), memsyntab->name, hash_err);