From ea402eae031d8327cb37d43f8ef650a5f8fe5ff8 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 21 Dec 2020 16:23:03 -0500 Subject: [PATCH] pan/bi: Emit branch and table bits in opcode table Signed-off-by: Alyssa Rosenzweig Reviewed-by: Boris Brezillon Part-of: --- src/panfrost/bifrost/bi_opcodes.c.py | 4 +++- src/panfrost/bifrost/bi_opcodes.h.py | 2 ++ src/panfrost/bifrost/bifrost_isa.py | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/panfrost/bifrost/bi_opcodes.c.py b/src/panfrost/bifrost/bi_opcodes.c.py index 9e6b9e4e86f..7ef88da8f0a 100644 --- a/src/panfrost/bifrost/bi_opcodes.c.py +++ b/src/panfrost/bifrost/bi_opcodes.c.py @@ -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 };""" diff --git a/src/panfrost/bifrost/bi_opcodes.h.py b/src/panfrost/bifrost/bi_opcodes.h.py index 9e4febcd6d1..b807513e196 100644 --- a/src/panfrost/bifrost/bi_opcodes.h.py +++ b/src/panfrost/bifrost/bi_opcodes.h.py @@ -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; }; diff --git a/src/panfrost/bifrost/bifrost_isa.py b/src/panfrost/bifrost/bifrost_isa.py index e7378c70a43..f128f9d9479 100644 --- a/src/panfrost/bifrost/bifrost_isa.py +++ b/src/panfrost/bifrost/bifrost_isa.py @@ -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: