i965/disasm: Properly decode branch_ctrl (gen8+)
authorBen Widawsky <benjamin.widawsky@intel.com>
Tue, 18 Nov 2014 20:20:10 +0000 (12:20 -0800)
committerBen Widawsky <benjamin.widawsky@intel.com>
Thu, 20 Nov 2014 17:45:23 +0000 (09:45 -0800)
commitca39c46c3be82be0a36316e5da32b558c4837aea
treef63fcc2db854d2def54db916963e6d28c728b34a
parent56bf948e11dd43c671fa6731bb49b4b68f9fe025
i965/disasm: Properly decode branch_ctrl (gen8+)

Add support for decoding the new branch control bit. I saw two things wrong with
the existing code.

1. It didn't bother trying to decode the bit.
-  While we do not *intentionally* emit this bit today, I think it's interesting
   to see if we somehow ended up with the bit set. It may also be useful in the
   future.

2. It seemed to be the wrong bit.
-  The docs are pretty poor wrt which bit this actually occupies. To me, it
   /looks/ like it should be bit 28. I am not sure where Ken got 30 from. I
   verified it should be 28 by looking at the simulator code.

I also added the most basic support for GOTO simply so we don't need to remember
to change the function in the future.

v2:
Move the branch_ctrl check out of the if gen >= 6 check to make it more
readable. (Matt)
ENDIF doesn't have branch_ctrl (Matt + Ken)

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_defines.h
src/mesa/drivers/dri/i965/brw_disasm.c
src/mesa/drivers/dri/i965/brw_inst.h