Lines Matching defs:spec
79 struct v3d_spec *spec;
100 v3d_spec_find_struct(struct v3d_spec *spec, const char *name)
102 for (int i = 0; i < spec->nstructs; i++)
103 if (strcmp(spec->structs[i]->name, name) == 0)
104 return spec->structs[i];
110 v3d_spec_find_register(struct v3d_spec *spec, uint32_t offset)
112 for (int i = 0; i < spec->nregisters; i++)
113 if (spec->registers[i]->register_offset == offset)
114 return spec->registers[i];
120 v3d_spec_find_register_by_name(struct v3d_spec *spec, const char *name)
122 for (int i = 0; i < spec->nregisters; i++) {
123 if (strcmp(spec->registers[i]->name, name) == 0)
124 return spec->registers[i];
131 v3d_spec_find_enum(struct v3d_spec *spec, const char *name)
133 for (int i = 0; i < spec->nenums; i++)
134 if (strcmp(spec->enums[i]->name, name) == 0)
135 return spec->enums[i];
226 group->spec = ctx->spec;
295 else if (g = v3d_spec_find_struct(ctx->spec, s), g != NULL)
297 else if (e = v3d_spec_find_enum(ctx->spec, s), e != NULL)
452 ctx->spec->ver = major * 10 + minor;
495 struct v3d_spec *spec = ctx->spec;
513 spec->commands[spec->ncommands++] = group;
517 * match the spec. Shift the fields up now.
525 spec->structs[spec->nstructs++] = group;
527 spec->registers[spec->nregisters++] = group;
536 assert(spec->ncommands < ARRAY_SIZE(spec->commands));
537 assert(spec->nstructs < ARRAY_SIZE(spec->structs));
538 assert(spec->nregisters < ARRAY_SIZE(spec->registers));
557 spec->enums[spec->nenums++] = e;
619 struct v3d_spec *spec = calloc(1, sizeof(struct v3d_spec));
620 if (!spec)
644 free(spec);
654 free(spec);
661 ctx.spec = spec;
680 free(spec);
687 return ctx.spec;
690 return spec;
695 v3d_spec_find_instruction(struct v3d_spec *spec, const uint8_t *p)
699 for (int i = 0; i < spec->ncommands; i++) {
700 struct v3d_group *group = spec->commands[i];
907 v3d_spec_find_struct(iter->group->spec,