third_party/cairo/src/drm/cairo-drm-intel-brw-eu-emit.c
void brw_CMP(struct brw_compile *p,
	     struct brw_reg dest,
	     uint32_t conditional,
	     struct brw_reg src0,
	     struct brw_reg src1)
{
    struct brw_instruction *insn = brw_next_instruction(p, BRW_OPCODE_CMP);

    insn->header.destreg__conditonalmod = conditional;
    brw_instruction_set_destination(insn, dest);
    brw_instruction_set_source0(insn, src0);
    brw_set_src1(insn, src1);

    /*    guess_execution_size(insn, src0); */


    /* Make it so that future instructions will use the computed flag
     * value until brw_set_predicate_control_flag_value() is called
     * again.
     */
    if (dest.file == BRW_ARCHITECTURE_REGISTER_FILE &&
	dest.nr == 0) {
	p->current->header.predicate_control = BRW_PREDICATE_NORMAL;
	p->flag_value = 0xff;
    }
}
/* To integrate with the above, it makes sense that the comparison
 * instruction should populate the flag register.  It might be simpler
 * just to use the flag reg for most WM tasks?
 */
To integrate with the above, it makes sense that the comparison
instruction should populate the flag register.
To integrate with the above it makes sense that the comparison instruction should populate the flag register .
void brw_CMP(struct brw_compile *p,
	     struct brw_reg dest,
	     uint32_t conditional,
	     struct brw_reg src0,
	     struct brw_reg src1)
{
    struct brw_instruction *insn = brw_next_instruction(p, BRW_OPCODE_CMP);
    insn->header.destreg__conditonalmod = conditional;
    brw_instruction_set_destination(insn, dest);
    brw_instruction_set_source0(insn, src0);
    brw_set_src1(insn, src1);
    if (dest.file == BRW_ARCHITECTURE_REGISTER_FILE &&
	dest.nr == 0) {
	p->current->header.predicate_control = BRW_PREDICATE_NORMAL;
	p->flag_value = 0xff;
    }
}
void brw_CMP ( struct brw_compile * p , struct brw_reg dest , uint32_t conditional , struct brw_reg src0 , struct brw_reg src1 ) { struct brw_instruction * insn = brw_next_instruction ( p , BRW_OPCODE_CMP ) ; insn -> header . destreg__conditonalmod = conditional ; brw_instruction_set_destination ( insn , dest ) ; brw_instruction_set_source0 ( insn , src0 ) ; brw_set_src1 ( insn , src1 ) ; if ( dest . file == BRW_ARCHITECTURE_REGISTER_FILE && dest . nr == 0 ) { p -> current -> header . predicate_control = BRW_PREDICATE_NORMAL ; p -> flag_value = 0xff ; } }
To integrate with the above, it makes sense that the comparison
 instruction should populate the flag register.
To integrate with the above it makes sense that the comparison instruction should populate the flag register .
/*    guess_execution_size(insn, src0); */ /* Make it so that future instructions will use the computed flag
     * value until brw_set_predicate_control_flag_value() is called
     * again.
     */