From a747708b9d59cbe0f3801cac6f39ae3159023cc1 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sun, 27 Feb 2022 15:22:03 -0500 Subject: [PATCH] pan/bi: Use should_skip in bi_builder generation To avoid further code duplication. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bi_builder.h.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/panfrost/bifrost/bi_builder.h.py b/src/panfrost/bifrost/bi_builder.h.py index b3ccafd..81b78b7 100644 --- a/src/panfrost/bifrost/bi_builder.h.py +++ b/src/panfrost/bifrost/bi_builder.h.py @@ -99,7 +99,7 @@ bi_instr * bi_${opcode.replace('.', '_').lower()}${to_suffix(ops[opcode])}(${sig I->src[${src}] = src${src}; % endfor % for mod in ops[opcode]["modifiers"]: -% if mod[0:-1] not in SKIP and mod not in SKIP: +% if not should_skip(mod): I->${mod} = ${mod}; % endif % endfor @@ -198,4 +198,6 @@ def arguments(op, temp_dest = True): modifier_signature(op) + op["immediates"]) -print(Template(COPYRIGHT + TEMPLATE).render(ops = ir_instructions, modifiers = modifier_lists, signature = signature, arguments = arguments, src_count = src_count, typesize = typesize, SKIP = SKIP)) +print(Template(COPYRIGHT + TEMPLATE).render(ops = ir_instructions, modifiers = + modifier_lists, signature = signature, arguments = arguments, src_count = + src_count, typesize = typesize, should_skip = should_skip)) -- 2.7.4