pan/midgard: Add LDST_ADDRESS property
Many load/store ops (used for globals, SSBOs, shared memory, etc) have the ability to compute addresses directly. Mark off which ones behave like this. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3978>
This commit is contained in:
committed by
Marge Bot
parent
1a2bb78840
commit
ee47ce6ac3
@@ -230,6 +230,9 @@ struct mir_tag_props {
|
||||
* its mask is 0 */
|
||||
#define LDST_SIDE_FX (1 << 4)
|
||||
|
||||
/* Computes an address according to indirects/zext/shift/etc */
|
||||
#define LDST_ADDRESS (1 << 5)
|
||||
|
||||
/* This file is common, so don't define the tables themselves. #include
|
||||
* midgard_op.h if you need that, or edit midgard_ops.c directly */
|
||||
|
||||
|
||||
@@ -207,12 +207,12 @@ struct mir_ldst_op_props load_store_opcode_props[256] = {
|
||||
[midgard_op_atomic_umax64] = {"atomic_umax64", M64 | LDST_SIDE_FX},
|
||||
[midgard_op_atomic_xchg64] = {"atomic_xchg64", M64 | LDST_SIDE_FX},
|
||||
|
||||
[midgard_op_ld_char] = {"ld_char", M32},
|
||||
[midgard_op_ld_char2] = {"ld_char2", M16},
|
||||
[midgard_op_ld_short] = {"ld_short", M32},
|
||||
[midgard_op_ld_char4] = {"ld_char4", M32},
|
||||
[midgard_op_ld_short4] = {"ld_short4", M32},
|
||||
[midgard_op_ld_int4] = {"ld_int4", M32},
|
||||
[midgard_op_ld_char] = {"ld_char", M32 | LDST_ADDRESS},
|
||||
[midgard_op_ld_char2] = {"ld_char2", M16 | LDST_ADDRESS},
|
||||
[midgard_op_ld_short] = {"ld_short", M32 | LDST_ADDRESS},
|
||||
[midgard_op_ld_char4] = {"ld_char4", M32 | LDST_ADDRESS},
|
||||
[midgard_op_ld_short4] = {"ld_short4", M32 | LDST_ADDRESS},
|
||||
[midgard_op_ld_int4] = {"ld_int4", M32 | LDST_ADDRESS},
|
||||
|
||||
[midgard_op_ld_attr_32] = {"ld_attr_32", M32},
|
||||
[midgard_op_ld_attr_32i] = {"ld_attr_32i", M32},
|
||||
@@ -234,11 +234,11 @@ struct mir_ldst_op_props load_store_opcode_props[256] = {
|
||||
[midgard_op_ld_ubo_short4] = {"ld_ubo_short4", M32},
|
||||
[midgard_op_ld_ubo_int4] = {"ld_ubo_int4", M32},
|
||||
|
||||
[midgard_op_st_char] = {"st_char", M32 | LDST_STORE},
|
||||
[midgard_op_st_char2] = {"st_char2", M16 | LDST_STORE},
|
||||
[midgard_op_st_char4] = {"st_char4", M32 | LDST_STORE},
|
||||
[midgard_op_st_short4] = {"st_short4", M32 | LDST_STORE},
|
||||
[midgard_op_st_int4] = {"st_int4", M32 | LDST_STORE},
|
||||
[midgard_op_st_char] = {"st_char", M32 | LDST_STORE | LDST_ADDRESS},
|
||||
[midgard_op_st_char2] = {"st_char2", M16 | LDST_STORE | LDST_ADDRESS},
|
||||
[midgard_op_st_char4] = {"st_char4", M32 | LDST_STORE | LDST_ADDRESS},
|
||||
[midgard_op_st_short4] = {"st_short4", M32 | LDST_STORE | LDST_ADDRESS},
|
||||
[midgard_op_st_int4] = {"st_int4", M32 | LDST_STORE | LDST_ADDRESS},
|
||||
|
||||
[midgard_op_st_vary_32] = {"st_vary_32", M32 | LDST_STORE},
|
||||
[midgard_op_st_vary_32i] = {"st_vary_32i", M32 | LDST_STORE},
|
||||
|
||||
@@ -31,6 +31,7 @@ extern struct mir_ldst_op_props load_store_opcode_props[256];
|
||||
extern struct mir_tag_props midgard_tag_props[16];
|
||||
|
||||
#define OP_IS_STORE(op) (load_store_opcode_props[op].props & LDST_STORE)
|
||||
#define OP_HAS_ADDRESS(op) (load_store_opcode_props[op].props & LDST_ADDRESS)
|
||||
|
||||
/* Is this opcode that of an integer (regardless of signedness)? Instruction
|
||||
* names authoritatively determine types */
|
||||
|
||||
Reference in New Issue
Block a user