pvr: Add support for optional instruction params

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20430>
This commit is contained in:
Simon Perretta 2023-01-18 15:41:23 +00:00 committed by Marge Bot
parent d187418f63
commit 6187f1fd8c
2 changed files with 9 additions and 0 deletions

View file

@ -508,6 +508,9 @@ enum rogue_io {
/* Predicate register. */
ROGUE_IO_P0,
/* For optional instruction arguments. */
ROGUE_IO_NONE,
ROGUE_IO_COUNT,
};
@ -531,6 +534,11 @@ static inline bool rogue_io_is_ft(enum rogue_io io)
return (io >= ROGUE_IO_FT0 && io <= ROGUE_IO_FTE);
}
static inline bool rogue_io_is_none(enum rogue_io io)
{
return io == ROGUE_IO_NONE;
}
typedef struct rogue_io_info {
const char *str;
} rogue_io_info;

View file

@ -288,6 +288,7 @@ const rogue_io_info rogue_io_infos[ROGUE_IO_COUNT] = {
[ROGUE_IO_FT4] = { .str = "ft4", },
[ROGUE_IO_FT5] = { .str = "ft5", },
[ROGUE_IO_P0] = { .str = "p0", },
[ROGUE_IO_NONE] = { .str = "_", },
};
#define SM(src_mod) BITFIELD64_BIT(ROGUE_ALU_SRC_MOD_##src_mod)