diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-07-29 09:15:32 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-07-31 09:39:16 -0700 |
commit | 13ee87c8b99e045d8610bf801f2f15544ca4f430 (patch) | |
tree | bd7d39a439ef9bb2767fb0b29e961a072c698715 /src/panfrost/midgard/disassemble.c | |
parent | 2037478702adab5a3863a120be821626191b2e3e (diff) |
pan/midgard: Document branch combination LUT
This took way longer to figure out than it should have..
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost/midgard/disassemble.c')
-rw-r--r-- | src/panfrost/midgard/disassemble.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/panfrost/midgard/disassemble.c b/src/panfrost/midgard/disassemble.c index 8387e38587c..a74280fc733 100644 --- a/src/panfrost/midgard/disassemble.c +++ b/src/panfrost/midgard/disassemble.c @@ -740,15 +740,18 @@ print_extended_branch_writeout_field(uint8_t *words) print_branch_op(br.op); - /* Condition repeated 8 times in all known cases. Check this. */ + /* Condition codes are a LUT in the general case, but simply repeated 8 times for single-channel conditions.. Check this. */ - unsigned cond = br.cond & 0x3; + bool single_channel = true; for (unsigned i = 0; i < 16; i += 2) { - assert(((br.cond >> i) & 0x3) == cond); + single_channel &= (((br.cond >> i) & 0x3) == (br.cond & 0x3)); } - print_branch_cond(cond); + if (single_channel) + print_branch_cond(br.cond & 0x3); + else + printf("lut%X", br.cond); if (br.unknown) printf(".unknown%d", br.unknown); |