From: Alyssa Rosenzweig Date: Sat, 19 Oct 2019 18:04:39 +0000 (-0400) Subject: pan/midgard: Implement OP_IS_STORE with table X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e981b69484ce6b60d3d0f886fef1af74c0ceb20c;p=mesa.git pan/midgard: Implement OP_IS_STORE with table ..rather than open-coding. Signed-off-by: Alyssa Rosenzweig --- diff --git a/src/panfrost/midgard/helpers.h b/src/panfrost/midgard/helpers.h index 6afaf1577ca..7633ae23b20 100644 --- a/src/panfrost/midgard/helpers.h +++ b/src/panfrost/midgard/helpers.h @@ -37,19 +37,6 @@ 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 \ diff --git a/src/panfrost/midgard/midgard_ops.h b/src/panfrost/midgard/midgard_ops.h index 3e9fff44836..2befc374ee2 100644 --- a/src/panfrost/midgard/midgard_ops.h +++ b/src/panfrost/midgard/midgard_ops.h @@ -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 */