/* tc-wasm32.c -- Assembler code for the wasm32 target.
- Copyright (C) 2017 Free Software Foundation, Inc.
+ Copyright (C) 2017-2021 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
/* Opcode hash table. */
-static struct hash_control *wasm32_hash;
+static htab_t wasm32_hash;
struct option md_longopts[] =
{
{
struct wasm32_opcode_s *opcode;
- wasm32_hash = hash_new ();
+ wasm32_hash = str_htab_create ();
/* Insert unique names into hash table. This hash table then
provides a quick index to the first opcode with a particular name
in the opcode table. */
for (opcode = wasm32_opcodes; opcode->name; opcode++)
- hash_insert (wasm32_hash, opcode->name, (char *) opcode);
+ str_hash_insert (wasm32_hash, opcode->name, opcode, 0);
linkrelax = 0;
flag_sectname_subst = 1;
valueT
md_section_align (asection * seg, valueT addr)
{
- int align = bfd_get_section_alignment (stdoutput, seg);
+ int align = bfd_section_alignment (seg);
return ((addr + (1 << align) - 1) & -(1 << align));
}
if (!op[0])
as_bad (_("can't find opcode "));
- opcode = (struct wasm32_opcode_s *) hash_find (wasm32_hash, op);
+ opcode = (struct wasm32_opcode_s *) str_hash_find (wasm32_hash, op);
if (opcode == NULL)
{