isaspec: Add support for special {:align=} field

Make it possible to just do alignment handling without an
actual field to print.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14668>
This commit is contained in:
Christian Gmeiner 2022-01-23 15:48:27 +01:00 committed by Marge Bot
parent 42ae116ac7
commit 52b36cb790

View file

@ -560,6 +560,14 @@ display_field(struct decode_scope *scope, const char *field_name)
num_align = atoi(value);
}
/* Special case ':algin=' should only do alignment */
if (field_name == align) {
while (scope->state->line_column < num_align)
print(state, " ");
return;
}
/* Special case 'NAME' maps to instruction/bitset name: */
if (!strncmp("NAME", field_name, field_name_len)) {
if (options->field_cb) {