isaspec: Add prototypes for expr evaluators

Add function prototypes for generated expr evaluators, to avoid a use-
before-declaration issue if an expression references a derived field.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13787>
This commit is contained in:
Rob Clark 2021-11-14 12:00:07 -08:00 committed by Marge Bot
parent aa93896156
commit fac9d22773
1 changed files with 8 additions and 0 deletions

View File

@ -464,6 +464,14 @@ ${s.expr_name(leaf.get_root(), expr)}(struct encode_state *s, struct bitset_para
## note, we can't just iterate all the expressions, but we need to find
## the context in which they are used to know the correct src type
%for root in s.encode_roots():
% for leaf in s.encode_leafs(root):
% for expr in s.bitset_used_exprs(leaf):
static inline int64_t ${s.expr_name(leaf.get_root(), expr)}(struct encode_state *s, struct bitset_params *p, ${leaf.get_root().encode.type} src);
% endfor
% endfor
%endfor
%for root in s.encode_roots():
<%
rendered_exprs = []