mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-30 12:40:41 +02:00
pan/bi: Add collect and split instructions
These move-like instructions will be generated during instruction selection and lowered before/after register allocation. These need special printer support until we get dynamic sources/destinations. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16585>
This commit is contained in:
parent
afd88d1380
commit
298d20f805
2 changed files with 29 additions and 4 deletions
|
|
@ -8823,4 +8823,10 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+COLLECT.i32" pseudo="true"/>
|
||||
|
||||
<ins name="+SPLIT.i32" pseudo="true">
|
||||
<src start="0"/>
|
||||
</ins>
|
||||
|
||||
</bifrost>
|
||||
|
|
|
|||
|
|
@ -160,11 +160,19 @@ bi_${mod}_as_str(enum bi_${mod} ${mod})
|
|||
void
|
||||
bi_print_instr(const bi_instr *I, FILE *fp)
|
||||
{
|
||||
bi_foreach_dest(I, d) {
|
||||
if (bi_is_null(I->dest[d])) break;
|
||||
if (d > 0) fprintf(fp, ", ");
|
||||
if (I->op == BI_OPCODE_SPLIT_I32) {
|
||||
for (unsigned d = 0; d < I->nr_dests; ++d) {
|
||||
if (d > 0) fprintf(fp, ", ");
|
||||
|
||||
bi_print_index(fp, I->dest[d]);
|
||||
bi_print_index(fp, I->dest[d]);
|
||||
}
|
||||
} else {
|
||||
bi_foreach_dest(I, d) {
|
||||
if (bi_is_null(I->dest[d])) break;
|
||||
if (d > 0) fprintf(fp, ", ");
|
||||
|
||||
bi_print_index(fp, I->dest[d]);
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(fp, " = %s", bi_opcode_props[I->op].name);
|
||||
|
|
@ -172,6 +180,17 @@ bi_print_instr(const bi_instr *I, FILE *fp)
|
|||
if (I->table)
|
||||
fprintf(fp, ".table%u", I->table);
|
||||
|
||||
if (I->op == BI_OPCODE_COLLECT_I32) {
|
||||
for (unsigned i = 0; i < I->nr_srcs; ++i) {
|
||||
if (i > 0)
|
||||
fputs(", ", fp);
|
||||
else
|
||||
fputs(" ", fp);
|
||||
|
||||
bi_print_index(fp, I->src[i]);
|
||||
}
|
||||
}
|
||||
|
||||
switch (I->op) {
|
||||
% for opcode in ops:
|
||||
<%
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue