pan/bi: Pipe last flag into opcode tables
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 21 Dec 2020 20:54:31 +0000 (15:54 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 29 Jan 2021 16:55:44 +0000 (16:55 +0000)
Only ADD unit for now.

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>

src/panfrost/bifrost/bi_opcodes.c.py
src/panfrost/bifrost/bi_opcodes.h.py
src/panfrost/bifrost/bifrost_isa.py

index 3df12c9..9e6b9e4 100644 (file)
@@ -30,12 +30,13 @@ struct bi_op_props bi_opcode_props[BI_NUM_OPCODES] = {
         sr_count = add["staging_count"].upper() if add else "0"
         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)
         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}, ${has_fma}, ${has_add},
+        ${sr_read}, ${sr_write}, ${last}, ${has_fma}, ${has_add},
     },
 % endfor
 };"""
index d7d6a9e..9e4febc 100644 (file)
@@ -72,6 +72,7 @@ struct bi_op_props {
         enum bi_sr_count sr_count : 3;
         bool sr_read : 1;
         bool sr_write : 1;
+        bool last : 1;
         bool fma : 1;
         bool add : 1;
 };
index ca46d66..e7378c7 100644 (file)
@@ -134,6 +134,7 @@ 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)
     }
 
     if 'exact' in ins.attrib: