-static const obj_info_t obj_info[] = {
-#define ARCH_OBJ(name,listed_in_isa) { #name, listed_in_isa, sizeof(arch_ ## name ## _t) },
-#include "bearch_obj.def"
-#undef ARCH_OBJ
- { 0 }
-};
-
-/**
- * Insert an arch object to the global arch obj storage.
- *
- * If the object has already been created there, nothing is done and
- * the old object is created.
- *
- * @param kind The kind of the arch object.
- * @param isa The isa the object belongs to or NULL if it is the isa
- * itself.
- * @param name The name of the object.
- * @return A pointer to the object.
- */
-static INLINE void *_arch_data_insert(arch_kind_t kind, arch_isa_t *isa,
- const char *name, size_t size)
-{
- arch_data_t *ad = get_arch_data();
- const obj_info_t *info = &obj_info[kind];
- arch_header_t *header = obstack_alloc(&ad->obst, size);
- arch_header_t *res = NULL;
-
- memset(header, 0, size);
- header->name = name;
- header->kind = kind;
- header->isa = isa;
- header->is_new = 1;
-
- res = pset_insert(ad->header_set, header, hash_header(header));
-
- /*
- * If the object is newly created and thus not yet present
- * in the set, add it to the isa
- * The inserted object was no isa, list it in the isa if this is
- * desired.
- */
- if(res->is_new && isa && info->listed_in_isa) {
- list_add(&res->list, &isa->heads[kind]);
- }
-
- /* if it was in the set, remove it from the obstack */
- if(!res->is_new)
- obstack_free(&ad->obst, header);
-
- /* Mark the object as NOT new. */
- res->is_new = 0;
-
- return res;
-}
-
-#define arch_data_insert(type_suffix, isa, name) \
- _arch_data_insert(arch_kind_ ## type_suffix, isa, name, sizeof(arch_ ## type_suffix ## _t))
-
-static INLINE void *_arch_data_find(arch_kind_t kind, const arch_isa_t *isa, const char *name)