Lines Matching refs:dfm

113 	inj_defnmem_t *dfm = inj_zalloc(sizeof (inj_defnmem_t));
115 dfm->dfm_type = type;
116 dfm->dfm_lineno = yylineno;
118 return (dfm);
124 inj_defnmem_t *dfm = inj_defn_mem_create_common(type);
126 dfm->dfm_str = str;
128 return (dfm);
134 inj_defnmem_t *dfm = inj_defn_mem_create_common(type);
136 dfm->dfm_list = list->defn_members;
140 return (dfm);
144 inj_defn_create(inj_defnmem_t *dfm)
150 inj_list_append(&defn->defn_members, dfm);
156 inj_defn_addmem(inj_defn_t *defn, inj_defnmem_t *dfm)
158 inj_list_append(&defn->defn_members, dfm);
172 array_dim_check(inj_declmem_t *dlm, inj_defnmem_t *dfm)
177 for (dfnelems = 0, l = inj_list_next(&dfm->dfm_list); l != NULL;
182 dfm->dfm_lineno, dfnelems, dlm->dlm_arrdim);
207 inj_defnmem_t *dfm, nvlist_t *nvl)
211 if (dfm->dfm_type != DEFNMEM_IMM && dfm->dfm_type != DEFNMEM_IDENT)
214 if (inj_strtoll(dfm->dfm_str, intr->ei_width, &val) < 0)
243 inj_defnmem_t *dfm, nvlist_t *nvl)
247 if (dfm->dfm_type != DEFNMEM_IMM && dfm->dfm_type != DEFNMEM_IDENT)
250 if (inj_strtoull(dfm->dfm_str, intr->ei_width, &val) < 0)
280 inj_defnmem_t *dfm, nvlist_t *nvl)
311 if (dfm->dfm_type != DEFNMEM_ARRAY)
320 nelems = array_dim_check(dlm, dfm);
330 for (i = 1, elem = inj_list_next(&dfm->dfm_list); elem != NULL;
335 dfm->dfm_lineno, i);
346 dfm->dfm_lineno, i, (errno == ERANGE ?
372 dfm->dfm_lineno, i, (errno == ERANGE ?
419 inj_defn_memcmp_bool(inj_declmem_t *dlm, inj_defnmem_t *dfm, nvlist_t *nvl)
423 if (dfm->dfm_type != DEFNMEM_IDENT)
426 if (bool2val(dfm->dfm_str, &val) < 0)
437 inj_defn_memcmp_bool_array(inj_declmem_t *dlm, inj_defnmem_t *dfm,
446 if (dfm->dfm_type != DEFNMEM_ARRAY)
449 nelems = array_dim_check(dlm, dfm);
453 for (i = 0, elem = inj_list_next(&dfm->dfm_list); elem != NULL;
457 dfm->dfm_lineno, i + 1);
477 inj_defn_memcmp_strenum(inj_declmem_t *dlm, inj_defnmem_t *dfm, nvlist_t *nvl)
484 if (dfm->dfm_type != defnmemtype)
488 (char *)dfm->dfm_str)) != 0)
495 inj_defn_memcmp_strenum_array(inj_declmem_t *dlm, inj_defnmem_t *dfm,
509 if (dfm->dfm_type != DEFNMEM_ARRAY)
512 nelems = array_dim_check(dlm, dfm);
516 for (i = 0, elem = inj_list_next(&dfm->dfm_list); elem != NULL;
520 dfm->dfm_lineno, i + 1);
529 dfm->dfm_lineno, elem->dfm_str);
557 inj_defn_memcmp_sub_list(inj_declmem_t *dlm, inj_defnmem_t *dfm)
560 inj_defnmem_t *subdfm = inj_list_next(&dfm->dfm_list);
567 inj_defn_memcmp_sub_defined(inj_declmem_t *dlm, inj_defnmem_t *dfm)
572 if ((subdefn = inj_defn_lookup(dfm->dfm_str, dlm->dlm_type)) == NULL) {
573 yyerror(" %d: reference to undefined %s %s\n", dfm->dfm_lineno,
574 inj_mem2str(dlm->dlm_type), dfm->dfm_str);
580 yyerror(" %d: %s %s is not a(n) %s\n", dfm->dfm_lineno,
581 inj_mem2str(dlm->dlm_type), dfm->dfm_str,
591 inj_item2str(subdefn->defn_decl->decl_type), dfm->dfm_str);
598 inj_defn_memcmp_sub_makenvl(inj_declmem_t *dlm, inj_defnmem_t *dfm)
600 inj_defnmemtype_t dftype = dfm->dfm_type;
605 new = inj_defn_memcmp_sub_list(dlm, dfm);
608 new = inj_defn_memcmp_sub_defined(dlm, dfm);
617 inj_defn_memcmp_sub(inj_declmem_t *dlm, inj_defnmem_t *dfm, nvlist_t *nvl)
621 if ((new = inj_defn_memcmp_sub_makenvl(dlm, dfm)) == NULL)
633 inj_defn_memcmp_sub_array(inj_declmem_t *dlm, inj_defnmem_t *dfm, nvlist_t *nvl)
641 if (dfm->dfm_type != DEFNMEM_ARRAY)
644 nelems = array_dim_check(dlm, dfm);
648 for (i = 0, elem = inj_list_next(&dfm->dfm_list); elem != NULL;
672 inj_defn_validate_memlist(inj_declmem_t *dlm, inj_defnmem_t *dfm)
682 for (nmem = 1; dlm != NULL && dfm != NULL;
683 dlm = inj_list_next(dlm), dfm = inj_list_next(dfm), nmem++) {
693 rc = inj_defn_memcmp_intr_array(intr, dlm, dfm,
696 rc = inj_defn_memcmp_signed(intr, dlm, dfm,
708 rc = inj_defn_memcmp_intr_array(intr, dlm, dfm,
711 rc = inj_defn_memcmp_unsigned(intr, dlm, dfm,
718 rc = inj_defn_memcmp_bool_array(dlm, dfm, nvl);
720 rc = inj_defn_memcmp_bool(dlm, dfm, nvl);
725 rc = inj_defn_memcmp_strenum_array(dlm, dfm,
728 rc = inj_defn_memcmp_strenum(dlm, dfm, nvl);
733 rc = inj_defn_memcmp_strenum_array(dlm, dfm,
736 rc = inj_defn_memcmp_strenum(dlm, dfm, nvl);
744 rc = inj_defn_memcmp_sub_array(dlm, dfm, nvl);
746 rc = inj_defn_memcmp_sub(dlm, dfm, nvl);
755 yyerror(" %d: %s for member %s\n", dfm->dfm_lineno,
769 while (dfm != NULL) {
770 dfm = inj_list_next(dfm);
798 inj_defnmem_t *dfm;
811 dfm = inj_list_next(&defn->defn_members);
813 if ((defn->defn_nvl = inj_defn_validate_memlist(dlm, dfm)) == NULL) {