The offsets used for branches need some extra bits twiddled, so add a
field to the clause to indicate this is happening. This is not ambiguous
since a clause can only have a single branch.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5260>
for (unsigned i = 0; i < clause->constant_count; ++i)
fprintf(fp, "%" PRIx64 " ", clause->constants[i]);
+ if (clause->branch_constant)
+ fprintf(fp, "*");
+
fprintf(fp, "\n");
}
}
uint64_t constants[8];
unsigned constant_count;
+ /* Branches encode a constant offset relative to the program counter
+ * with some magic flags. By convention, if there is a branch, its
+ * constant will be last. Set this flag to indicate this is required.
+ */
+ bool branch_constant;
+
/* What type of high latency instruction is here, basically */
unsigned clause_type;
} bi_clause;