diff options
author | Rob Clark <[email protected]> | 2019-09-02 10:08:37 -0700 |
---|---|---|
committer | Rob Clark <[email protected]> | 2019-09-06 00:13:44 +0000 |
commit | e59bfc820bdf8531c941150de2ea56fb83b6b28f (patch) | |
tree | a92d456a1f16969ad56c1d1051400efd795cda21 /src/freedreno/ir3/ir3.c | |
parent | f94f22e87a64dcaaafba3e1a0d160385adce4807 (diff) |
freedreno/ir3: assert that only single address
An instruction can reference only a single address register value.
Add an assert to catch bugs.
Also, address value should also be local to the same block as the
instruction.
(The one spot where changing the instruction address is actually legit
needs to clear the address first.)
Signed-off-by: Rob Clark <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/freedreno/ir3/ir3.c')
-rw-r--r-- | src/freedreno/ir3/ir3.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/freedreno/ir3/ir3.c b/src/freedreno/ir3/ir3.c index 5c049a5936f..feec723abd0 100644 --- a/src/freedreno/ir3/ir3.c +++ b/src/freedreno/ir3/ir3.c @@ -1041,6 +1041,10 @@ ir3_instr_set_address(struct ir3_instruction *instr, { if (instr->address != addr) { struct ir3 *ir = instr->block->shader; + + debug_assert(!instr->address); + debug_assert(instr->block == addr->block); + instr->address = addr; array_insert(ir, ir->indirects, instr); } |