X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gas%2Fconfig%2Ftc-iq2000.c;h=8a9b88f9f4f466b19681733c87e63b75eafe5c98;hb=24cc21fe5b8a88dc1ecde9006ece10145fef1035;hp=f150e19d028805563f9ac25ff676c98343854e08;hpb=325801bda4678d100721414300eb1170bfbc2e24;p=binutils-gdb.git diff --git a/gas/config/tc-iq2000.c b/gas/config/tc-iq2000.c index f150e19d028..8a9b88f9f4f 100644 --- a/gas/config/tc-iq2000.c +++ b/gas/config/tc-iq2000.c @@ -1,5 +1,5 @@ /* tc-iq2000.c -- Assembler for the Sitera IQ2000. - Copyright (C) 2003-2016 Free Software Foundation, Inc. + Copyright (C) 2003-2022 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -27,7 +27,6 @@ #include "cgen.h" #include "elf/common.h" #include "elf/iq2000.h" -#include "libbfd.h" #include "sb.h" #include "macro.h" @@ -107,7 +106,7 @@ struct iq2000_hi_fixup static struct iq2000_hi_fixup * iq2000_hi_fixup_list; /* Macro hash table, which we will add to. */ -extern struct hash_control *macro_hash; +extern struct htab *macro_hash; const char *md_shortopts = ""; struct option md_longopts[] = @@ -247,7 +246,7 @@ iq2000_add_macro (const char * name, formal_entry ** p = ¯o->formals; macro->formal_count = 0; - macro->formal_hash = hash_new (); + macro->formal_hash = str_htab_create (); while (*arguments != NULL) { @@ -273,8 +272,8 @@ iq2000_add_macro (const char * name, sb_add_string (& formal->name, *arguments); /* Add to macro's hash table. */ - hash_jam (macro->formal_hash, sb_terminate (& formal->name), formal); - + str_hash_insert (macro->formal_hash, + sb_terminate (&formal->name), formal, 1); formal->index = macro->formal_count; macro->formal_count++; *p = formal; @@ -286,7 +285,7 @@ iq2000_add_macro (const char * name, sb_add_string (¯o_name, name); namestr = sb_terminate (¯o_name); - hash_jam (macro_hash, namestr, macro); + str_hash_insert (macro_hash, namestr, macro, 1); macro_defined = 1; } @@ -431,7 +430,7 @@ md_assemble (char * str) valueT md_section_align (segT segment, valueT size) { - int align = bfd_get_section_alignment (stdoutput, segment); + int align = bfd_section_alignment (segment); return ((size + (1 << align) - 1) & -(1 << align)); } @@ -727,10 +726,10 @@ md_operand (expressionS * exp) const char * md_atof (int type, char * litP, int * sizeP) { - return ieee_md_atof (type, litP, sizeP, TRUE); + return ieee_md_atof (type, litP, sizeP, true); } -bfd_boolean +bool iq2000_fix_adjustable (fixS * fixP) { bfd_reloc_code_real_type reloc_type; @@ -747,21 +746,21 @@ iq2000_fix_adjustable (fixS * fixP) reloc_type = fixP->fx_r_type; if (fixP->fx_addsy == NULL) - return TRUE; + return true; /* Prevent all adjustments to global symbols. */ if (S_IS_EXTERNAL (fixP->fx_addsy)) - return FALSE; + return false; if (S_IS_WEAK (fixP->fx_addsy)) - return FALSE; + return false; /* We need the symbol name for the VTABLE entries. */ if ( reloc_type == BFD_RELOC_VTABLE_INHERIT || reloc_type == BFD_RELOC_VTABLE_ENTRY) - return FALSE; + return false; - return TRUE; + return true; } static void @@ -818,7 +817,7 @@ s_iq2000_end (int x ATTRIBUTE_UNUSED) else p = NULL; - if ((bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) != 0) + if ((bfd_section_flags (now_seg) & SEC_CODE) != 0) maybe_text = 1; else maybe_text = 0; @@ -917,7 +916,7 @@ s_iq2000_ent (int aent) if (ISDIGIT (*input_line_pointer) || *input_line_pointer == '-') get_number (); - if ((bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) != 0) + if ((bfd_section_flags (now_seg) & SEC_CODE) != 0) maybe_text = 1; else maybe_text = 0;