Lines Matching refs:dfm

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