/* 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.
#include "cgen.h"
#include "elf/common.h"
#include "elf/iq2000.h"
-#include "libbfd.h"
#include "sb.h"
#include "macro.h"
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;
\f
const char *md_shortopts = "";
struct option md_longopts[] =
formal_entry ** p = ¯o->formals;
macro->formal_count = 0;
- macro->formal_hash = hash_new ();
+ macro->formal_hash = str_htab_create ();
while (*arguments != NULL)
{
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;
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;
}
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));
}
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;
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
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;
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;