• Home
  • Raw
  • Download

Lines Matching refs:atts

132 get_array_offset_count(const char **atts, uint32_t *offset, uint32_t *count,  in get_array_offset_count()  argument
135 for (int i = 0; atts[i]; i += 2) { in get_array_offset_count()
138 if (strcmp(atts[i], "count") == 0) { in get_array_offset_count()
139 *count = strtoul(atts[i + 1], &p, 0); in get_array_offset_count()
142 } else if (strcmp(atts[i], "start") == 0) { in get_array_offset_count()
143 *offset = strtoul(atts[i + 1], &p, 0); in get_array_offset_count()
144 } else if (strcmp(atts[i], "size") == 0) { in get_array_offset_count()
145 *size = strtoul(atts[i + 1], &p, 0); in get_array_offset_count()
154 const char **atts, in create_group() argument
174 for (int i = 0; atts[i]; i += 2) { in create_group()
176 if (strcmp(atts[i], "length") == 0) { in create_group()
177 group->dw_length = strtoul(atts[i + 1], &p, 0); in create_group()
178 } else if (strcmp(atts[i], "bias") == 0) { in create_group()
179 group->bias = strtoul(atts[i + 1], &p, 0); in create_group()
180 } else if (strcmp(atts[i], "engine") == 0) { in create_group()
182 char *tmp = ralloc_strdup(mem_ctx, atts[i + 1]); in create_group()
195 … fprintf(stderr, "unknown engine class defined for instruction \"%s\": %s\n", name, atts[i + 1]); in create_group()
207 get_array_offset_count(atts, in create_group()
218 create_enum(struct parser_context *ctx, const char *name, const char **atts) in create_enum() argument
230 get_register_offset(const char **atts, uint32_t *offset) in get_register_offset() argument
232 for (int i = 0; atts[i]; i += 2) { in get_register_offset()
235 if (strcmp(atts[i], "num") == 0) in get_register_offset()
236 *offset = strtoul(atts[i + 1], &p, 0); in get_register_offset()
314 create_field(struct parser_context *ctx, const char **atts) in create_field() argument
321 for (int i = 0; atts[i]; i += 2) { in create_field()
324 if (strcmp(atts[i], "name") == 0) { in create_field()
325 field->name = ralloc_strdup(field, atts[i + 1]); in create_field()
329 } else if (strcmp(atts[i], "start") == 0) { in create_field()
330 field->start = strtoul(atts[i + 1], &p, 0); in create_field()
331 } else if (strcmp(atts[i], "end") == 0) { in create_field()
332 field->end = strtoul(atts[i + 1], &p, 0); in create_field()
333 } else if (strcmp(atts[i], "type") == 0) { in create_field()
334 field->type = string_to_type(ctx, atts[i + 1]); in create_field()
335 } else if (strcmp(atts[i], "default") == 0 && in create_field()
338 field->default_value = strtoul(atts[i + 1], &p, 0); in create_field()
360 create_value(struct parser_context *ctx, const char **atts) in create_value() argument
364 for (int i = 0; atts[i]; i += 2) { in create_value()
365 if (strcmp(atts[i], "name") == 0) in create_value()
366 value->name = ralloc_strdup(value, atts[i + 1]); in create_value()
367 else if (strcmp(atts[i], "value") == 0) in create_value()
368 value->value = strtoul(atts[i + 1], NULL, 0); in create_value()
376 const char **atts, in create_and_append_field() argument
380 create_array_field(ctx, array) : create_field(ctx, atts); in create_and_append_field()
398 start_element(void *data, const char *element_name, const char **atts) in start_element() argument
406 for (int i = 0; atts[i]; i += 2) { in start_element()
407 if (strcmp(atts[i], "name") == 0) in start_element()
408 name = atts[i + 1]; in start_element()
409 else if (strcmp(atts[i], "gen") == 0) in start_element()
410 gen = atts[i + 1]; in start_element()
428 ctx->group = create_group(ctx, name, atts, NULL, false); in start_element()
430 ctx->group = create_group(ctx, name, atts, NULL, true); in start_element()
432 ctx->group = create_group(ctx, name, atts, NULL, true); in start_element()
433 get_register_offset(atts, &ctx->group->register_offset); in start_element()
435 struct intel_group *group = create_group(ctx, "", atts, ctx->group, false); in start_element()
439 ctx->last_field = create_and_append_field(ctx, atts, NULL); in start_element()
441 ctx->enoom = create_enum(ctx, name, atts); in start_element()
450 ctx->values[ctx->n_values++] = create_value(ctx, atts); in start_element()