diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-08-21 09:15:56 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-08-21 10:38:31 -0700 |
commit | 6189274f5751ed3595e42f044f4f8ce386f5a272 (patch) | |
tree | 64c7c203e3bd74d5fcfd7d740a6df3ca59eb1ecc /src/panfrost/midgard/compiler.h | |
parent | cda0ec67e6a615c10ac75e7345c8982637526d8c (diff) |
pan/midgard: Represent unused nodes by ~0
This allows nodes to be unsigned and prevents a class of weird
signedness bugs identified by Coverity.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost/midgard/compiler.h')
-rw-r--r-- | src/panfrost/midgard/compiler.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h index edf0c105a19..75f9e4a93fc 100644 --- a/src/panfrost/midgard/compiler.h +++ b/src/panfrost/midgard/compiler.h @@ -68,11 +68,11 @@ typedef struct midgard_branch { } midgard_branch; /* Instruction arguments represented as block-local SSA indices, rather than - * registers. Negative values mean unused. */ + * registers. ~0 means unused. */ typedef struct { - int src[3]; - int dest; + unsigned src[3]; + unsigned dest; bool inline_constant; } ssa_args; @@ -534,7 +534,7 @@ v_mov(unsigned src, midgard_vector_alu_src mod, unsigned dest) .type = TAG_ALU_4, .mask = 0xF, .ssa_args = { - .src = { SSA_UNUSED_1, src, -1 }, + .src = { SSA_UNUSED, src, SSA_UNUSED }, .dest = dest, }, .alu = { |