pan/midgard: Implement OP_IS_STORE with table
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Sat, 19 Oct 2019 18:04:39 +0000 (14:04 -0400)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Sun, 20 Oct 2019 12:02:31 +0000 (12:02 +0000)
..rather than open-coding.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/panfrost/midgard/helpers.h
src/panfrost/midgard/midgard_ops.h

index 6afaf1577ca30b37cf7aff00fd30c1a8b0bc9608..7633ae23b204a421da571d2bbf5b9afa4f6d43c6 100644 (file)
                op == midgard_op_st_vary_32i \
        )
 
-#define OP_IS_STORE_R26(op) (\
-                OP_IS_STORE_VARY(op) || \
-                op == midgard_op_st_char || \
-                op == midgard_op_st_char2 || \
-                op == midgard_op_st_char4 || \
-                op == midgard_op_st_short4 || \
-                op == midgard_op_st_int4 \
-        )
-
-#define OP_IS_STORE(op) (\
-                OP_IS_STORE_R26(op) \
-       )
-
 #define OP_IS_PROJECTION(op) ( \
                 op == midgard_op_ldst_perspective_division_z || \
                 op == midgard_op_ldst_perspective_division_w \
index 3e9fff44836f7c05218294ec4d5eaee1d5b0d6fb..2befc374ee2dccf1c40023f26dad96e126827f8e 100644 (file)
@@ -26,6 +26,8 @@
 extern struct mir_op_props alu_opcode_props[256];
 extern struct mir_ldst_op_props load_store_opcode_props[256];
 
+#define OP_IS_STORE(op) (load_store_opcode_props[op].props & LDST_STORE)
+
 /* Is this opcode that of an integer (regardless of signedness)? Instruction
  * names authoritatively determine types */