This allows us to generate the MAC (multiply-accumulate) instruction,
which can be used to implement some expressions in fewer instructions
than doing a series of MUL and ADDs.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
ALU1(CBIT)
ALU2(ADDC)
ALU2(SUBB)
+ALU2(MAC)
ROUND(RNDZ)
ROUND(RNDE)
assert(brw->gen >= 7);
brw_SUBB(p, dst, src[0], src[1]);
break;
+ case BRW_OPCODE_MAC:
+ brw_MAC(p, dst, src[0], src[1]);
+ break;
case BRW_OPCODE_BFE:
assert(brw->gen >= 7);
ALU3(MAD)
ALU2_ACC(ADDC)
ALU2_ACC(SUBB)
+ALU2(MAC)
/** Gen4 predicated IF. */
vec4_instruction *