aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gas/config/tc-i386.c11
-rw-r--r--gas/config/tc-i386.h3
-rw-r--r--gas/hash.h2
3 files changed, 13 insertions, 3 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 9cd33a9..d40a71a 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -2947,7 +2947,7 @@ md_begin (void)
/* Setup for loop. */
optab = i386_optab;
- core_optab = XNEW (templates);
+ core_optab = notes_alloc (sizeof (*core_optab));
core_optab->start = optab;
while (1)
@@ -2964,7 +2964,7 @@ md_begin (void)
if (optab->name == NULL)
break;
- core_optab = XNEW (templates);
+ core_optab = notes_alloc (sizeof (*core_optab));
core_optab->start = optab;
}
}
@@ -3099,6 +3099,13 @@ i386_print_statistics (FILE *file)
htab_print_statistics (file, "i386 opcode", op_hash);
htab_print_statistics (file, "i386 register", reg_hash);
}
+
+void
+i386_md_end (void)
+{
+ htab_delete (op_hash);
+ htab_delete (reg_hash);
+}
#ifdef DEBUG386
diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h
index 5d6fc75..a6e096e 100644
--- a/gas/config/tc-i386.h
+++ b/gas/config/tc-i386.h
@@ -216,6 +216,9 @@ extern void i386_cons_align (int);
void i386_print_statistics (FILE *);
#define tc_print_statistics i386_print_statistics
+void i386_md_end (void);
+#define md_end i386_md_end
+
extern unsigned int i386_frag_max_var (fragS *);
#define md_frag_max_var i386_frag_max_var
diff --git a/gas/hash.h b/gas/hash.h
index 21f4a6d..29e8825 100644
--- a/gas/hash.h
+++ b/gas/hash.h
@@ -99,7 +99,7 @@ static inline htab_t
str_htab_create (void)
{
return htab_create_alloc (16, hash_string_tuple, eq_string_tuple,
- NULL, xcalloc, free);
+ free, xcalloc, free);
}
#endif /* HASH_H */