pan/bi: Emit branch and table bits in opcode table

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723>
This commit is contained in:
Alyssa Rosenzweig 2020-12-21 16:23:03 -05:00 committed by Marge Bot
parent 674ec5dc3f
commit ea402eae03
3 changed files with 7 additions and 2 deletions

View file

@ -31,12 +31,14 @@ struct bi_op_props bi_opcode_props[BI_NUM_OPCODES] = {
sr_read = int(add["staging"] in ["r", "rw"] if add else False)
sr_write = int(add["staging"] in ["w", "rw"] if add else False)
last = int(bool(add["last"]) if add else False)
table = int(bool(add["table"]) if add else False)
branch = int(opcode.startswith('BRANCH'))
has_fma = int("*" + opcode in instructions)
has_add = int("+" + opcode in instructions)
%>
[BI_OPCODE_${opcode.replace('.', '_').upper()}] = {
"${opcode}", BIFROST_MESSAGE_${message}, BI_SR_COUNT_${sr_count},
${sr_read}, ${sr_write}, ${last}, ${has_fma}, ${has_add},
${sr_read}, ${sr_write}, ${last}, ${branch}, ${table}, ${has_fma}, ${has_add},
},
% endfor
};"""

View file

@ -73,6 +73,8 @@ struct bi_op_props {
bool sr_read : 1;
bool sr_write : 1;
bool last : 1;
bool branch : 1;
bool table : 1;
bool fma : 1;
bool add : 1;
};

View file

@ -134,7 +134,8 @@ def parse_instruction(ins, include_pseudo):
'unused': ins.attrib.get('unused', False),
'pseudo': ins.attrib.get('pseudo', False),
'message': ins.attrib.get('message', 'none'),
'last': ins.attrib.get('last', False)
'last': ins.attrib.get('last', False),
'table': ins.attrib.get('table', False),
}
if 'exact' in ins.attrib: