aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/midgard
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-10-31 14:57:54 -0400
committerAlyssa Rosenzweig <[email protected]>2019-11-04 15:36:08 -0500
commit12d071024b13593e9cc4149d0420946cbd7d869f (patch)
treefad5e0c45a20419607b8f9ac63acccdc32e699ba /src/panfrost/midgard
parent762623381df3f6b9ae02b9c1c4528f867a93d425 (diff)
pan/midgard: Extend default_phys_reg to !32-bit
We can pass through a size. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost/midgard')
-rw-r--r--src/panfrost/midgard/midgard_ra.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/panfrost/midgard/midgard_ra.c b/src/panfrost/midgard/midgard_ra.c
index 87eedfd7c2e..2589aa5f41a 100644
--- a/src/panfrost/midgard/midgard_ra.c
+++ b/src/panfrost/midgard/midgard_ra.c
@@ -98,12 +98,12 @@ offset_swizzle(unsigned *swizzle, unsigned reg_offset, unsigned srcsize, unsigne
/* Helper to return the default phys_reg for a given register */
static struct phys_reg
-default_phys_reg(int reg)
+default_phys_reg(int reg, midgard_reg_mode size)
{
struct phys_reg r = {
.reg = reg,
.offset = 0,
- .size = 4
+ .size = mir_bytes_for_mode(size)
};
return r;
@@ -117,11 +117,11 @@ index_to_reg(compiler_context *ctx, struct ra_graph *g, unsigned reg, midgard_re
{
/* Check for special cases */
if (reg == ~0)
- return default_phys_reg(REGISTER_UNUSED);
+ return default_phys_reg(REGISTER_UNUSED, size);
else if (reg >= SSA_FIXED_MINIMUM)
- return default_phys_reg(SSA_REG_FROM_FIXED(reg));
+ return default_phys_reg(SSA_REG_FROM_FIXED(reg), size);
else if (!g)
- return default_phys_reg(REGISTER_UNUSED);
+ return default_phys_reg(REGISTER_UNUSED, size);
/* Special cases aside, we pick the underlying register */
int virt = ra_get_node_reg(g, reg);