-/**
- * 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]);